Index: extensions/iPiwigo/www/extensions/LICENSE.txt
===================================================================
--- extensions/iPiwigo/www/extensions/LICENSE.txt	(revision 9188)
+++ extensions/iPiwigo/www/extensions/LICENSE.txt	(revision 9188)
@@ -0,0 +1,22 @@
+Copyright (c) 2010 Sam Shull http://www.google.com/profiles/brickysam26
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+
Index: extensions/iPiwigo/www/extensions/jqt.autotitles.js
===================================================================
--- extensions/iPiwigo/www/extensions/jqt.autotitles.js	(revision 9188)
+++ extensions/iPiwigo/www/extensions/jqt.autotitles.js	(revision 9188)
@@ -0,0 +1,51 @@
+/*
+
+            _/    _/_/    _/_/_/_/_/                              _/       
+               _/    _/      _/      _/_/    _/    _/    _/_/_/  _/_/_/    
+          _/  _/  _/_/      _/    _/    _/  _/    _/  _/        _/    _/   
+         _/  _/    _/      _/    _/    _/  _/    _/  _/        _/    _/    
+        _/    _/_/  _/    _/      _/_/      _/_/_/    _/_/_/  _/    _/     
+       _/                                                                  
+    _/
+
+    Created by David Kaneda <http://www.davidkaneda.com>
+    Documentation and issue tracking on Google Code <http://code.google.com/p/jqtouch/>
+    
+    Special thanks to Jonathan Stark <http://jonathanstark.com/>
+    and pinch/zoom <http://www.pinchzoom.com/>
+    
+    (c) 2009 by jQTouch project members.
+    See LICENSE.txt for license.
+
+*/
+
+(function($) {
+    if ($.jQTouch)
+    {
+        $.jQTouch.addExtension(function AutoTitles(jQT){
+            
+            var titleSelector='.toolbar h1';
+
+            $(function(){
+                $('body').bind('pageAnimationStart', function(e, data){
+                    if (data.direction === 'in'){
+                        var $title = $(titleSelector, $(e.target));
+                        var $ref = $(e.target).data('referrer');
+                        if ($title.length && $ref){
+                            $title.html($ref.text());
+                        }
+                    }
+                });
+            });
+            
+            function setTitleSelector(ts){
+                titleSelector=ts;
+            }
+            
+            return {
+                setTitleSelector: setTitleSelector
+            }
+
+        });
+    }
+})(jQuery);
Index: extensions/iPiwigo/www/extensions/jqt.floaty.js
===================================================================
--- extensions/iPiwigo/www/extensions/jqt.floaty.js	(revision 9188)
+++ extensions/iPiwigo/www/extensions/jqt.floaty.js	(revision 9188)
@@ -0,0 +1,92 @@
+/*
+
+            _/    _/_/    _/_/_/_/_/                              _/       
+               _/    _/      _/      _/_/    _/    _/    _/_/_/  _/_/_/    
+          _/  _/  _/_/      _/    _/    _/  _/    _/  _/        _/    _/   
+         _/  _/    _/      _/    _/    _/  _/    _/  _/        _/    _/    
+        _/    _/_/  _/    _/      _/_/      _/_/_/    _/_/_/  _/    _/     
+       _/                                                                  
+    _/
+
+    Created by David Kaneda <http://www.davidkaneda.com>
+    Documentation and issue tracking on Google Code <http://code.google.com/p/jqtouch/>
+    
+    Special thanks to Jonathan Stark <http://jonathanstark.com/>
+    and pinch/zoom <http://www.pinchzoom.com/>
+    
+    (c) 2009 by jQTouch project members.
+    See LICENSE.txt for license.
+
+*/
+
+(function($) {
+    if ($.jQTouch)
+    {
+        $.jQTouch.addExtension(function Floaty(jQT){
+            
+            $.fn.makeFloaty = function(options){
+                var defaults = {
+                    align: 'top',
+                    spacing: 20,
+                    time: '.3s'
+                }
+                var settings = $.extend({}, defaults, options);
+                settings.align = (settings.align == 'top') ? 'top' : 'bottom';
+                
+                return this.each(function(){
+                    var $el = $(this);
+                    
+                    $el.css({
+                        '-webkit-transition': 'top ' + settings.time + ' ease-in-out',
+                        'display': 'block',
+                        'min-height': '0 !important'
+                    }).data('settings', settings);
+                    
+                    $(document).bind('scroll', function(){
+                        if ($el.data('floatyVisible') === true)
+                        {
+                            $el.scrollFloaty();
+                        }
+                    });
+                    $el.scrollFloaty();
+                });
+            }
+
+            $.fn.scrollFloaty = function(){
+                return this.each(function(){
+                    var $el = $(this);
+                    var settings = $el.data('settings');
+                    var wHeight = $('html').attr('clientHeight'); // WRONG
+                    
+                    var newY = window.pageYOffset +
+                        ((settings.align == 'top') ? 
+                            settings.spacing : wHeight - settings.spacing - $el.get(0).offsetHeight);
+                    
+                    $el.css('top', newY).data('floatyVisible', true);
+                });
+            }
+
+            $.fn.hideFloaty = function(){
+                return this.each(function(){
+                    var $el = $(this);
+                    var oh = $el.get(0).offsetHeight;
+                    
+                    $el.css('top', -oh-10).data('floatyVisible', false);
+                });
+            }
+            
+            $.fn.toggleFloaty = function(){
+                return this.each(function(){
+                    var $el = $(this);
+                    if ($el.data('floatyVisible') === true){
+                        $el.hideFloaty();
+                    }
+                    else
+                    {
+                        $el.scrollFloaty();
+                    }
+                });
+            }
+        });
+    }
+})(jQuery);
Index: extensions/iPiwigo/www/extensions/jqt.location.js
===================================================================
--- extensions/iPiwigo/www/extensions/jqt.location.js	(revision 9188)
+++ extensions/iPiwigo/www/extensions/jqt.location.js	(revision 9188)
@@ -0,0 +1,68 @@
+/*
+
+            _/    _/_/    _/_/_/_/_/                              _/       
+               _/    _/      _/      _/_/    _/    _/    _/_/_/  _/_/_/    
+          _/  _/  _/_/      _/    _/    _/  _/    _/  _/        _/    _/   
+         _/  _/    _/      _/    _/    _/  _/    _/  _/        _/    _/    
+        _/    _/_/  _/    _/      _/_/      _/_/_/    _/_/_/  _/    _/     
+       _/                                                                  
+    _/
+
+    Created by David Kaneda <http://www.davidkaneda.com>
+    Documentation and issue tracking on Google Code <http://code.google.com/p/jqtouch/>
+    
+    Special thanks to Jonathan Stark <http://jonathanstark.com/>
+    and pinch/zoom <http://www.pinchzoom.com/>
+    
+    (c) 2009 by jQTouch project members.
+    See LICENSE.txt for license.
+
+*/
+
+(function($) {
+    if ($.jQTouch)
+    {
+        $.jQTouch.addExtension(function Location(){
+            
+            var latitude, longitude, callback;
+            
+            function checkGeoLocation() {
+                return navigator.geolocation;
+            }
+            function updateLocation(fn) {
+                if (checkGeoLocation())
+                {
+                    callback = fn;
+                    navigator.geolocation.getCurrentPosition(savePosition);
+                    return true;
+                } else {
+                    console.log('Device not capable of geo-location.');
+                    fn(false);
+                    return false;
+                }                
+            }
+            function savePosition(position) {
+                latitude = position.coords.latitude;
+                longitude = position.coords.longitude;
+                if (callback) {
+                    callback(getLocation());
+                }
+            }
+            function getLocation() {
+                if (latitude && longitude) {
+                    return {
+                        latitude: latitude,
+                        longitude: longitude
+                    }
+                } else {
+                    console.log('No location available. Try calling updateLocation() first.');
+                    return false;
+                }
+            }
+            return {
+                updateLocation: updateLocation,
+                getLocation: getLocation
+            }
+        });
+    }
+})(jQuery);
Index: extensions/iPiwigo/www/extensions/jqt.offline.js
===================================================================
--- extensions/iPiwigo/www/extensions/jqt.offline.js	(revision 9188)
+++ extensions/iPiwigo/www/extensions/jqt.offline.js	(revision 9188)
@@ -0,0 +1,97 @@
+/*
+
+            _/    _/_/    _/_/_/_/_/                              _/       
+               _/    _/      _/      _/_/    _/    _/    _/_/_/  _/_/_/    
+          _/  _/  _/_/      _/    _/    _/  _/    _/  _/        _/    _/   
+         _/  _/    _/      _/    _/    _/  _/    _/  _/        _/    _/    
+        _/    _/_/  _/    _/      _/_/      _/_/_/    _/_/_/  _/    _/     
+       _/                                                                  
+    _/
+
+    Created by David Kaneda <http://www.davidkaneda.com>
+    Documentation and issue tracking on Google Code <http://code.google.com/p/jqtouch/>
+    
+    Special thanks to Jonathan Stark <http://jonathanstark.com/>
+
+    Lots of this code is specifically derived from Jonathan's book,
+    "Building iPhone Apps with HTML, CSS, and JavaScript"
+    
+    (c) 2009 by jQTouch project members.
+    See LICENSE.txt for license.
+
+*/
+
+(function($) {
+    if ($.jQTouch)
+    {
+        $.jQTouch.addExtension(function Offline(){
+            
+            // Convenience array of status values
+            var cacheStatusValues = [];
+            cacheStatusValues[0] = 'uncached';
+            cacheStatusValues[1] = 'idle';
+            cacheStatusValues[2] = 'checking';
+            cacheStatusValues[3] = 'downloading';
+            cacheStatusValues[4] = 'updateready';
+            cacheStatusValues[5] = 'obsolete';
+
+            // Listeners for all possible events
+            var cache = window.applicationCache;
+            cache.addEventListener('cached', logEvent, false);
+            cache.addEventListener('checking', logEvent, false);
+            cache.addEventListener('downloading', logEvent, false);
+            cache.addEventListener('error', logEvent, false);
+            cache.addEventListener('noupdate', logEvent, false);
+            cache.addEventListener('obsolete', logEvent, false);
+            cache.addEventListener('progress', logEvent, false);
+            cache.addEventListener('updateready', logEvent, false);
+
+            // Log every event to the console
+            function logEvent(e) {
+                var online, status, type, message;
+                online = (isOnline()) ? 'yes' : 'no';
+                status = cacheStatusValues[cache.status];
+                type = e.type;
+                message = 'online: ' + online;
+                message+= ', event: ' + type;
+                message+= ', status: ' + status;
+                if (type == 'error' && navigator.onLine) {
+                    message+= ' There was an unknown error, check your Cache Manifest.';
+                }
+                console.log(message);
+            }
+            
+            function isOnline() {
+                return navigator.onLine;
+            }
+            
+            if (!$('html').attr('manifest')) {
+                console.log('No Cache Manifest listed on the <html> tag.')
+            }
+
+            // Swap in newly download files when update is ready
+            cache.addEventListener('updateready', function(e){
+                    // Don't perform "swap" if this is the first cache
+                    if (cacheStatusValues[cache.status] != 'idle') {
+                        cache.swapCache();
+                        console.log('Swapped/updated the Cache Manifest.');
+                    }
+                }
+            , false);
+
+            // These two functions check for updates to the manifest file
+            function checkForUpdates(){
+                cache.update();
+            }
+            function autoCheckForUpdates(){
+                setInterval(function(){cache.update()}, 10000);
+            }
+
+            return {
+                isOnline: isOnline,
+                checkForUpdates: checkForUpdates,
+                autoCheckForUpdates: autoCheckForUpdates
+            }
+        });
+    }
+})(jQuery);
Index: extensions/iPiwigo/www/extensions/jqt.photo.css
===================================================================
--- extensions/iPiwigo/www/extensions/jqt.photo.css	(revision 9188)
+++ extensions/iPiwigo/www/extensions/jqt.photo.css	(revision 9188)
@@ -0,0 +1,98 @@
+/**
+ *
+ *
+ *    @author Sam Shull <http://www.google.com/profiles/brickysam26>
+ *    @copyright 2010 Sam Shull <http://www.google.com/profiles/brickysam26>
+ *
+ *    Special Thanks to Steve Simitzis <http://saturn5.com>
+ *
+ *    @license <http://www.opensource.org/licenses/mit-license.html>
+ *
+ *    Permission is hereby granted, free of charge, to any person obtaining a copy
+ *    of this software and associated documentation files (the "Software"), to deal
+ *    in the Software without restriction, including without limitation the rights
+ *    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ *    copies of the Software, and to permit persons to whom the Software is
+ *    furnished to do so, subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included in
+ *    all copies or substantial portions of the Software.
+ *    
+ *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ *    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ *    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ *    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *    THE SOFTWARE.
+ *
+ *
+ */
+#jqt .jqt-photo.jqt-photo-toolbar-hidden .toolbar{opacity:0;display:none;}
+
+#jqt .jqt-photo .jqt-photo-image-slide .jqt-photo-not-loaded{background:#000 url(photo-images/loading.gif) no-repeat center center;}
+
+#jqt .jqt-photo .jqt-photo-image-slide .jqt-photo-img{max-width:100%;max-height:100%;vertical-align:middle;border:none;outline:none;background:#000;}
+#jqt .jqt-photo .jqt-photo-image-slide img.jqt-photo-presized{max-width:auto;max-height:auto;}
+
+#jqt .jqt-photo .jqt-photo-image-slide > div{position:relative;}
+
+#jqt .jqt-photo .jqt-photo-image-slide > div .jqt-photo-caption{position:absolute;line-height:20px;vertical-align:top;width:100%;z-index:10;
+	text-align:center;color:#FFF;}
+
+#jqt .jqt-photo .jqt-photo-table{height:100%;background:#000;}
+
+#jqt .jqt-photo{height:100%;width:100%;overflow:hidden;background:#000;color:#FFF;}
+
+#jqt .jqt-photo.animating{display:block;}
+
+#jqt .jqt-photo .jqt-photo-image-slide > div{display:box;box-orient:horizontal;box-orient:vertical;box-align:stretch;box-pack:center;
+	display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-orient:vertical;-webkit-box-align:stretch;-webkit-box-pack:center;
+	border-spacing:0 10px 0 0;overflow:hidden;text-align:center;}
+
+/* animations are part off jqtouch */
+#jqt .jqt-photo.jqt-photo-toolbar-animation-in .toolbar{opacity:1;}
+#jqt .jqt-photo.jqt-photo-toolbar-animation-out .toolbar{opacity:0;}
+
+/* toolbar */
+#jqt .jqt-photo .toolbar{width:100%;position:absolute;top:0;z-index:20;background:transparent url(photo-images/toolbar.png) repeat-x;
+    -webkit-transition-duration:.65s;-webkit-transition-property:opacity;}
+#jqt .jqt-photo .toolbar .back{-webkit-border-image:url(photo-images/btnBack.png) 0 5 0 15;}
+
+#jqt .jqt-photo .toolbar-bottom{padding:0;font-size:30px;text-align:center;vertical-align:top;}
+#jqt .jqt-photo .toolbar-bottom div{display:inline-block;padding:0;width:50px;height:100%;}
+
+/* slideshow no images - doesn't look right * /
+#jqt .jqt-photo .toolbar-bottom{line-height:100%;vertical-align:middle;font-size:1.5em;}
+#jqt .jqt-photo .jqt-photo-play:before{content:"\25B6";}
+#jqt .jqt-photo .jqt-photo-prev:before,
+#jqt .jqt-photo .jqt-photo-next:before{content:"\27A1";}
+#jqt .jqt-photo .jqt-photo-prev{-webkit-transform:matrix(-1,0,0,1,0,0);}/* webkit doesnt support leftward arrow, so we flip the rightward arrow * /
+#jqt .jqt-photo .jqt-photo-pause:before{content:"\2759\2759";}
+#jqt .jqt-photo .toolbar-bottom .jqt-photo-pause{display:none;}
+
+
+/* slideshow images */
+#jqt .jqt-photo .jqt-photo-prev{background:url(photo-images/navPrev.png) no-repeat center center;}
+#jqt .jqt-photo .jqt-photo-play{background:url(photo-images/navPlay.png) no-repeat center center;}
+#jqt .jqt-photo .jqt-photo-next{background:url(photo-images/navNext.png) no-repeat center center;}
+#jqt .jqt-photo .toolbar-bottom .jqt-photo-pause{display:none;background:url(photo-images/navPause.png) no-repeat center center;}
+
+/* hovers */
+#jqt .jqt-photo .jqt-photo-prev.hover{
+	background:-webkit-gradient(radial, 50% 50%, 2, 50% 50%, 25, from(rgba(255,255,255,1)), to(rgba(255,255,255,0))) no-repeat center center,
+	url(photo-images/navPrev.png) no-repeat center center;}
+#jqt .jqt-photo .jqt-photo-play.hover{
+	background:-webkit-gradient(radial, 50% 50%, 2, 50% 50%, 25, from(rgba(255,255,255,1)), to(rgba(255,255,255,0))) no-repeat center center,
+	url(photo-images/navPlay.png) no-repeat center center;}
+#jqt .jqt-photo .jqt-photo-next.hover{
+	background:-webkit-gradient(radial, 50% 50%, 2, 50% 50%, 25, from(rgba(255,255,255,1)), to(rgba(255,255,255,0))) no-repeat center center,
+	url(photo-images/navNext.png) no-repeat center center;}
+#jqt .jqt-photo .toolbar-bottom .jqt-photo-pause.hover{
+	background:-webkit-gradient(radial, 50% 50%, 2, 50% 50%, 25, from(rgba(255,255,255,1)), to(rgba(255,255,255,0))) no-repeat center center,
+	url(photo-images/navPause.png) no-repeat center center;}
+
+/* */
+#jqt .jqt-photo.jqt-photo-playing .jqt-photo-pause{display:inline-block;}
+#jqt .jqt-photo.jqt-photo-playing .jqt-photo-play{display:none;}
+
Index: extensions/iPiwigo/www/extensions/jqt.photo.js
===================================================================
--- extensions/iPiwigo/www/extensions/jqt.photo.js	(revision 9188)
+++ extensions/iPiwigo/www/extensions/jqt.photo.js	(revision 9188)
@@ -0,0 +1,2189 @@
+/*!*
+ *    Provides event handling for iPhone like photo gallery (without thumbnail portion)
+ *
+ *    @author Sam Shull <http://www.google.com/profiles/brickysam26>
+ *    @copyright 2010 Sam Shull <http://samshull.blogspot.com/>
+ *
+ *    Special Thanks to Steve Simitzis <http://saturn5.com>
+ *
+ *    @license <http://www.opensource.org/licenses/mit-license.html>
+ *
+ *    Permission is hereby granted, free of charge, to any person obtaining a copy
+ *    of this software and associated documentation files (the "Software"), to deal
+ *    in the Software without restriction, including without limitation the rights
+ *    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ *    copies of the Software, and to permit persons to whom the Software is
+ *    furnished to do so, subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included in
+ *    all copies or substantial portions of the Software.
+ *    
+ *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ *    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ *    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ *    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *    THE SOFTWARE.
+ *
+ *    Custom Events handled by each gallery:
+ *
+ *        jqt-photo-slideto            - slide to a given index (e, [index = int [, options = Object [, slides = jQuery ] ] ] )
+ *        jqt-photo-goto            - jump to a given index (e, [index = int [, options = Object [, slides = jQuery ] ] ] )
+ *        jqt-photo-play                - start the slideshow from the given point
+ *        jqt-photo-pause                - stop the slideshow
+ *        jqt-photo-prev                - go to the previous slide
+ *        jqt-photo-next                - go to the next slide
+ *        jqt-photo-hide-toolbars        - hide the visibility of the toolbars
+ *        jqt-photo-show-toolbars        - show the visibility of the toolbars
+ *        jqt-photo-toggle-toolbars    - toggle the visibility of the toolbars
+ */
+(function($){
+    //we need this in the algorithm
+    if (!"WebKitCSSMatrix" in this) {
+        return null;
+    }
+    
+    /**
+     *
+     *
+     *
+     */
+    var undefined, 
+        
+        /**
+         *    keep track of the registered galleries for updates on resize
+         *
+         *    @var Array<Element>
+         */
+        galleries = [],
+        
+        /**
+         *    Does the browser support Touch
+         *
+         *    @var Boolean
+         */
+        supportsTouch = "Touch" in this,
+        
+        /**
+         *    event types
+         *
+         *    @var Object
+         */
+        events = supportsTouch ? {
+            start: "touchstart",
+            move: "touchmove",
+            end: "touchend"
+        } : {
+            start: "mousedown",
+            move: "mousemove",
+            end: "mouseup"
+        },
+        
+        controlPoints,
+        
+        /**
+         *    keep track of whether or not the parsed class rule has been inserted
+         *
+         *    @var Boolean
+         */
+        parseRuleSet = false,
+        
+        //bring into context
+        
+        /**
+         *    
+         *
+         *    @var Window
+         */
+        window = this,
+        
+        /**
+         *    
+         *
+         *    @var Document
+         */
+        document = window.document,
+        
+        /**
+         *    
+         *
+         *    @var Object
+         */
+        Math = window.Math,
+        
+        //simplify access to these functions
+        
+        /**
+         *    
+         *
+         *    @var Function
+         */
+        min = Math.min,
+        
+        /**
+         *    
+         *
+         *    @var Function
+         */
+        floor = Math.floor,
+        
+        /**
+         *    
+         *
+         *    @var Function
+         */
+        sqrt = Math.sqrt,
+        
+        /**
+         *    
+         *
+         *    @var Function
+         */
+        pow = Math.pow,
+        
+        /**
+         *    
+         *
+         *    @var Function
+         */
+        abs = Math.abs,
+        
+        /**
+         *    current orientation
+         *
+         *    @var String
+         */
+        orientation = abs(window.orientation) == 90 ? "landscape" : "portrait",
+        
+        /**
+         *    The default options
+         *
+         *    @var Object
+         */
+        defaults = {
+            /**
+             *    A list of the images to be displayed in the gallery
+             *
+             *    @var Array<Object>
+             */
+            data: [],
+            
+            /**
+             *    displays in title bar 
+             *    - supports format 
+             *        {0} = current index
+             *        {1} = total number of slides
+             *
+             *    @var String
+             */
+            galleryName: "{0} of {1}",
+            
+            /**
+             *    where to start the slides in the gallery - reset on pageAnimation out
+             *
+             *    @var Number
+             */
+            defaultIndex: 0,
+            
+            /**
+             *    properties to animate
+             *
+             *    @var Number
+             */
+            transitionProperty: "-webkit-transform",
+            
+            /**
+             *    timing function
+             *
+             *    @var String
+             */
+            timingFunction: "cubic-bezier(0,0,.25,1)",
+            
+            /**
+             *    the reset transform of the table
+             *
+             *    @var String
+             */
+            transform: "translate3d({0}px,0,0)",
+            
+            /**
+             *    The template to be used for transforming the IMG tag
+             *
+             *    @var String
+             */
+            imageTransform: "scale({0}) translate3d({1}px, {2}px, 0)",
+            
+            /**
+             *    Maximum number of slides to keep in DOM at on time - before current slide
+             *
+             *    @var Number
+             */
+            maxSlidesBefore: 2,
+            
+            /**
+             *    Maximum number of slides to keep in DOM at on time - after current slide
+             *
+             *    @var Number
+             */
+            maxSlidesAfter: 2,
+            
+            /**
+             *    default delay between transitions for slideshow
+             *
+             *    @var Number
+             */
+            slideDelay: 5000,
+            
+            /**
+             *    default speed for slide change
+             *
+             *    @var Number
+             */
+            scrollSpeed: 500,
+            
+            /**
+             *    default speed for scale resizing - used on scaleEnd
+             *
+             *    @var Number
+             */
+            scaleSpeed: 500,
+            
+            /**
+             *    should we try to dynamically render the CSS rules
+             *
+             *    @var Boolean
+             */
+            useDynamicStyleSheet: true,
+            
+            /**
+             *    should a slideshow repeat by default
+             *
+             *    @var Boolean
+             */
+            repeatSlideShow: false,
+            
+            /**
+             *    selector for the parent of the gallery
+             *
+             *    @var String
+             */
+            appendTo: "#jqt",
+            
+            /**
+             *    the attribute name for storing the index of the slide in the data
+             *
+             *    @var String
+             */
+            dataAttribute: "data-index",
+            
+            /**
+             *    tags to ignore
+             *
+             *    @var Array
+             */
+            tagNames: "A,INPUT,SELECT,TEXTAREA",
+            
+            //only used by template generator
+            
+            /**
+             *    link to return
+             *
+             *    @var String
+             */
+            backLink: '<a class="back">Back</a>',
+            
+            /**
+             *    a blank image tag's template
+             *
+             *    @var String
+             */
+            blankImage: '<img class="jqt-photo-img"/>',
+            
+            /**
+             *    an individual slides template
+             *
+             *    @var String
+             */
+            slideTemplate: '<td class="jqt-photo-image-slide">\
+                                <div class="jqt-photo-not-loaded">\
+                                    <img class="jqt-photo-img"/>\
+                                    <div class="jqt-photo-caption"></div>\
+                                </div>\
+                            </td>',
+            
+            /**
+             *    CSS Rule for removing the max-width/max-height properties from the images
+             *
+             *    @var String
+             */
+            parsedClassTemplate: "#jqt .jqt-photo .jqt-photo-image-slide > .{0}{max-width:auto;max-height:auto;}",
+            
+            /**
+             *    the overall psuedo page template of a gallery
+             *
+             *    @var String
+             */
+            galleryTemplate: '<div class="jqt-photo">\
+                                    <div class="toolbar toolbar-top"><\/div>\
+                                    <table class="jqt-photo-table">\
+                                        <tr class="jqt-photo-slide-list"><\/tr>\
+                                    <\/table>\
+                                    <div class="toolbar toolbar-bottom">\
+                                        <div class="jqt-photo-prev"></div>\
+                                        <div class="jqt-photo-pause"></div>\
+                                        <div class="jqt-photo-play"></div>\
+                                        <div class="jqt-photo-next"></div>\
+                                    <\/div>\
+                                <\/div>',
+            
+            //psuedo events
+            
+            /**
+             *    Handle the pageAnimationEnd event fired by jQTouch
+             *    Resets the positions and scales
+             *
+             *    @var Function
+             */
+            pageAnimationEnd: pageAnimationEnd,
+            
+            /**
+             *    Handle the pageAnimationStart event fired by jQTouch
+             *    Resets the positions and scales
+             *
+             *    @var Function
+             */
+            pageAnimationStart: pageAnimationStart,
+            
+            /**
+             *    Handle the transition of slides in a gallery
+             *
+             *    @var Function
+             */
+            slideTo: slideTo,
+            
+            /**
+             *    Begin a slideshow on a gallery
+             *
+             *    @var Function
+             */
+            play: play,
+            
+            /**
+             *    End a slideshow on a gallery
+             *
+             *    @var Function
+             */
+            pause: pause,
+            
+            /**
+             *    Go to the next slide in the list
+             *
+             *    @var Function
+             */
+            next: next,
+            
+            /**
+             *    Go to the previous slide in the list
+             *
+             *    @var Function
+             */
+            prev: prev,
+            
+            /**
+             *    Go to a specific or implied slide
+             *
+             *    @var Function
+             */
+            goTo: goTo,
+            
+            /**
+             *    Reveal the toolbars
+             *
+             *    @var Function
+             */
+            showToolbars: showToolbars,
+            
+            /**
+             *    Hide the toolbars
+             *
+             *    @var Function
+             */
+            hideToolbars: hideToolbars,
+            
+            /**
+             *    Show/Hide the toolbars where appropriate
+             *
+             *    @var Function
+             */
+            toggleToolbars: toggleToolbars,
+            
+            //mouse events
+            
+            /**
+             *    Handle a touchstart event on the gallery
+             *
+             *    @var Function
+             */
+            touchStart: touchStart,
+            
+            /**
+             *    Handle a drag start event (triggered by touchstart) - one-finger
+             *
+             *    @var Function
+             */
+            dragStart: dragStart,
+            
+            /**
+             *    Event handler - move - one-finger
+             *
+             *    @var Function
+             */
+            drag: drag,
+            
+            /**
+             *    Event handler - end - one-finger
+             *
+             *    @var Function
+             */
+            dragEnd: dragEnd,
+            
+            /**
+             *    Event handler - start - two-fingers
+             *
+             *    @var Function
+             */
+            scaleStart: scaleStart,
+            
+            /**
+             *    Event handler - move - two-fingers
+             *
+             *    @var Function
+             */
+            scale: scale,
+            
+            /**
+             *    Event handler - end - two-fingers
+             *
+             *    @var Function
+             */
+            scaleEnd: scaleEnd,
+            
+            /**
+             *    An event handler for the IMG load event
+             *
+             *    @var Function
+             */
+            loader: loader,
+            
+            /**
+             *    Function provided for generating the slides
+             *
+             *    @var Function
+             */
+            createSlide: createSlide,
+            
+            /**
+             *    Function provided for maintaining the sliding window of slides
+             *
+             *    @var Function
+             */
+            rearrange: rearrange,
+            
+            //classes
+            
+            /**
+             *    Keep track of preloaded images
+             *
+             *    @var String
+             */
+            presizedClass: "jqt-photo-presized",
+            
+            /**
+             *    keep track of images that have data
+             *
+             *    @var String
+             */
+            parsedClass: "jqt-photo-parsed",
+            
+            /**
+             *    Class name for identifying the current slide
+             *
+             *    @var String
+             */
+            currentClass: "jqt-photo-current",
+            
+            /**
+             *    Class name for designating that a slideshow is in progress 
+             *    (and cause pause icon to show, not play icon)
+             *
+             *    @var String
+             */
+            playingClass: "jqt-photo-playing",
+            
+            /**
+             *    Class name for designating that an image is not currently loaded
+             *
+             *    @var String
+             */
+            notLoadedClass: "jqt-photo-not-loaded",
+            
+            /**
+             *    Class name for initiating an animation to show the toolbars
+             *
+             *    @var String
+             */
+            toolbarAnimationInClass: "jqt-photo-toolbar-animation-in",
+            
+            /**
+             *    Class name for initiating an animation to hide the toolbars
+             *
+             *    @var String
+             */
+            toolbarAnimationOutClass: "jqt-photo-toolbar-animation-out",
+            
+            /**
+             *    Class name for hiding toolbars - applied outside of animation
+             *
+             *    @var String
+             */
+            toolbarHideClass: "jqt-photo-toolbar-hidden",
+            
+            //selectors
+            
+            /**
+             *    The selector for the container of the slides
+             *
+             *    @var String
+             */
+            tableSelector: ".jqt-photo-table",
+            
+            /**
+             *    The selector for the caption of a slide
+             *
+             *    @var String
+             */
+            captionSelector: ".jqt-photo-caption",
+            
+            /**
+             *    The selector of a slide container
+             *
+             *    @var String
+             */
+            slideSelector: ".jqt-photo-image-slide",
+            
+            /**
+             *    The selector of the scalable element, relative to a slide
+             *
+             *    @var String
+             */
+            imageSelector: "img.jqt-photo-img",
+            
+            /**
+             *    The selector of the title element
+             *
+             *    @var String
+             */
+            titleSelector: ".toolbar-top h1",
+            
+            /**
+             *    The selector of row that contains the images
+             *
+             *    @var String
+             */
+            listSelector: ".jqt-photo-slide-list",
+            
+            /**
+             *    The selector of the Play Icon
+             *
+             *    @var String
+             */
+            playSelector: ".jqt-photo-play",
+            
+            /**
+             *    The selector of the Pause Icon
+             *
+             *    @var String
+             */
+            pauseSelector: ".jqt-photo-pause",
+            
+            /**
+             *    The selector of the Next Icon
+             *
+             *    @var String
+             */
+            nextSelector: ".jqt-photo-next",
+            
+            /**
+             *    The selector of the Previous Icon
+             *
+             *    @var String
+             */
+            prevSelector: ".jqt-photo-prev",
+            
+            /**
+             *    The selector of a gallery element
+             *
+             *    @var String
+             */
+            gallerySelector: ".jqt-photo"
+        },
+        
+        /**
+         *    Calculate the desired position of the caption elements within the galleries
+         *
+         *    @var Function
+         */
+        caption = function(vars){return (window.innerHeight - vars.caption) + "px";},
+        
+        /**
+         *    Calculate the desired height of the galleries and the slides
+         *
+         *    @var Function
+         */
+        height = function(){return window.innerHeight + "px";},
+        
+        /**
+         *    Calculate the desired width of the galleries and the slides
+         *
+         *    @var Function
+         */
+        width = function(){return window.innerWidth + "px"},
+        
+        /**
+         *    Calculate the desired position of the bottom toolbar elements within the galleries
+         *
+         *    @var Function
+         */
+        toolbar = function(vars){return (window.innerHeight - vars.toolbar) + "px";},
+        
+        /**
+         *    The default CSS rules for dynamic insertion
+         *
+         *    @var Object
+         */
+        cssRules = {
+        
+            /**
+             *    Variables used by the CSS "macros" for dynamically calculating positions and dimensions
+             *
+             *    @var Object
+             */
+            variables : {
+                caption: 90,
+                toolbar: 45
+            },
+        
+            /**
+             *    Default CSS rules
+             *
+             *    @var Object
+             */
+            defaults: {
+                "#jqt .jqt-photo .toolbar-bottom" : {
+                    top: toolbar
+                },
+                "#jqt .jqt-photo .jqt-photo-image-slide > div" : {
+                    width: width,
+                    height: height,
+                    "line-height": height
+                },
+                "#jqt .jqt-photo .jqt-photo-image-slide .jqt-photo-caption" : {
+                    top: caption,
+                }
+            },
+        
+            /**
+             *    Portrait view CSS rules
+             *
+             *    @var Object
+             */
+            portrait: {
+                "#jqt.portrait .jqt-photo" : {
+                    height: height,
+                    width: width,
+                },
+                "#jqt.portrait .jqt-photo .toolbar-bottom" : {
+                    top: toolbar
+                },
+                "#jqt.portrait .jqt-photo .jqt-photo-image-slide > div" : {
+                    width: width,
+                    height: height,
+                    "line-height": height,
+                },
+                "#jqt .jqt-photo .jqt-photo-image-slide .jqt-photo-caption" : {
+                    top: caption,
+                }
+            },
+        
+            /**
+             *    Landscape view CSS rules
+             *
+             *    @var Object
+             */
+            landscape: {
+                "#jqt.landscape .jqt-photo" : {
+                    height: height,
+                    width: width,
+                },
+                "#jqt.landscape .jqt-photo .toolbar-bottom" : {
+                    top: toolbar,
+                },
+                "#jqt.landscape .jqt-photo .jqt-photo-table" : {
+                    height: height,
+                },
+                "#jqt.landscape .jqt-photo .jqt-photo-image-slide > div" : {
+                    height: height,
+                    width: width,
+                    "line-height": height,
+                },
+                "#jqt.landscape .jqt-photo .jqt-photo-image-slide .jqt-photo-caption" : {
+                    top: caption,
+                }
+            }
+        };
+    
+    /*
+     *    jQTouch extension
+     */
+    if ($.jQTouch) {
+        //bind the extension
+        $.jQTouch.addExtension(function(jqt) {   
+            /*/event handler
+            function binder (event, info) {
+                if (info.page.is(defaults.gallerySelector)) {
+                    info.page.jqtPhoto();
+                }
+            }
+              
+            //attach
+            $(document.body).bind("pageInserted", binder);
+            
+            //attach to appropriate containers on DOMREADY
+            $(function() {
+                $(defaults.gallerySelector)
+                    .each(function() {
+                        binder(null, {page: $(this)});
+                    });
+            });
+            */
+            return {
+                generateGallery: generateGallery, 
+                /**
+                 *    Jump to the index of a slide in a gallery
+                 *
+                 *    @param jQuery | String (selector) | Element gallery
+                 *    @param Number index
+                 *    @param String | Object animation
+                 *    @param Boolean reverse
+                 *    @return jQuery
+                 */
+                goToSlide: function (gallery, index, animation, reverse) {
+                    //trigger this first
+                    var g = $(gallery), options = g.data("jqt-photo-options"),slides = g.find(options.slideSelector);
+                     
+                    if (slides.index("."+options.currentClass) != index) {
+                        slides.removeClass(options.currentClass).eq(index).addClass(options.currentClass);
+                    }
+                    
+                    if (!g.hasClass("current")) {
+                        jqt.goTo(g, animation || "slide", reverse);
+                    }
+                    
+                    g.triggerHandler("jqt-photo-show-toolbars");
+                    
+                    return g;
+                }
+            };
+        });
+    }
+    
+    /**
+     *    Generate a gallery and attach it to the #jqt element,
+     *    additionally updates scaling data, so you don't have to
+     *
+     *    <code>
+     *        images = [{src:"/somewhere1.jpg",caption:"Not Yet Implemented",width:200,height:200},
+     *                  {src:"/somewhere2.jpg",caption:"Not Yet Implemented"}];
+     *    </code>
+     *
+     *    @param String id
+     *    @param Array<Object> images
+     *    @param Object options - @see defaults
+     *    @return jQuery
+     */
+    function generateGallery (id, images, options) {
+        options = $.extend({}, defaults, options);
+        
+        options.data = images;
+        
+        if (!parseRuleSet) {
+            parseRuleSet = true;
+            var sheet = document.styleSheets[document.styleSheets.length-1];
+			sheet.insertRule(
+                format(options.parsedClassTemplate, options.parsedClass), 
+                sheet.cssRules.length
+            );
+        }
+        
+        options.gallery = $(options.galleryTemplate).appendTo(options.appendTo);
+        
+        var list = options.list = options.gallery.find(options.listSelector),
+            lower = options.defaultIndex - options.maxSlidesBefore,
+            upper = options.defaultIndex + options.maxSlidesAfter,
+            toolbar = options.gallery.attr("id", id)
+                        .find(".toolbar-top")
+                        .append(
+                            $("<h1></h1>").html(
+                                format(options.galleryName, options.defaultIndex + 1, images.length)
+                            )
+                        );
+        
+        if (options.backLink) {
+            toolbar.append(options.backLink);
+        }
+        
+        $.each(images, function(i, data) {
+            list.append(options.createSlide(data, i, options, i >= lower && i <= upper));
+        });
+        
+        return jqtPhoto(options.gallery[0], options);
+    }
+    
+    /*
+     *
+     *    jQuery Extensions
+     *
+     */
+    
+    /**
+     *    A jQuery prototype extension for enabling the photo gallery
+     *    on a given set of elements
+     *
+     *    @param Object options
+     *    @return jQuery
+     */
+    $.fn.jqtPhoto = function(options) {
+        options = $.extend({}, defaults, options || {});
+        return this.each(function(){jqtPhoto(this, options)});
+    };
+    
+    /**
+     *    A static jQuery extension for setting and retrieving the jQT-Photo defaults
+     *
+     *    
+     */
+    $.jqtPhoto = {
+        generateGallery: generateGallery,
+    
+        /**
+         *    Change and/or retrieve the default options
+         *
+         *    @param Object options - optional
+         *    @return Object
+         */
+        defaults: function(options) {
+            if (options) {
+                defaults = $.extend(defaults, options);
+            }
+            
+            return $.extend({}, defaults);
+        },
+    
+        /**
+         *    Change and/or retrieve the default CSS
+         *
+         *    @param Object options - optional
+         *    @return Object
+         */
+        defaultCSS: function(options) {
+            if (options !== undefined) {
+                cssRules = $.extend(true, cssRules, options);
+            }
+            
+            return $.extend({}, cssRules);
+        }
+    };
+    
+    /*
+     *
+     *    Functions
+     *
+     */
+    
+    /**
+     *    Intialize the photo gallery
+     *
+     *    @param Element | String | jQuery element
+     *    @param Object options
+     *    @return jQuery
+     */
+    function jqtPhoto (element, options) {
+        var $elem = $(element),
+            slides = attachEvents($elem, options).find(options.slideSelector),
+            images = slides.find(options.imageSelector);
+        
+        options.list = $elem.find(options.listSelector);
+        
+        options.table = tableData($elem.data("jqt-photo-options", options), options);
+        
+        options.blankImage = parseImageData($elem, $(options.blankImage).load(options.loader), options);
+        
+        if (!slides.filter("."+options.currentClass).length) {
+            if (!slides.filter(format("[{0}={1}]", options.dataAttribute, options.defaultIndex)).addClass(options.currentClass).length) {
+                slides.eq(0).addClass(options.currentClass);
+            }
+        }
+        
+        $elem.find(options.tableSelector).css({
+            webkitTransitionProperty: options.transitionProperty,
+            webkitTransitionTimingFunction: options.timingFunction,
+            webkitTransitionDuration: options.defaultDuration + "s",
+            webkitTransform: format(options.transform, -slides.filter("."+options.currentClass).attr("offsetLeft") || 0)
+        });
+        
+        parseImageData($elem, images, options);
+        
+        galleries = galleries.concat($.makeArray($elem));
+        
+        return $elem;
+    }
+    
+    /**
+     *    Record the initial start position of the image list element
+     *
+     *    @param jQuery target
+     *    @param Object options
+     *    @return null
+     */
+    function tableData (target, options) {
+        var table = target.find(options.tableSelector),
+            transform = window.getComputedStyle(table[0]).webkitTransform,
+            matrix = new WebKitCSSMatrix(transform);
+        
+        return table.data("jqt-photo-position", {x: Number(matrix.m41 || 0), gallery: target});
+    }
+    
+    /**
+     *    Attach event listeners to the gallery
+     *
+     *    To Do: refractor event listeners into delegate
+     *
+     *    @param jQuery target
+     *    @param Object options
+     *    @return jQuery
+     */
+    function attachEvents (target, options) {
+        
+        return target
+                .each(function(){this.addEventListener(events.start, options.touchStart, false)})
+                .bind("jqt-photo-slideto", options.slideTo)
+                .bind("jqt-photo-goto", options.goTo)
+                .bind("jqt-photo-play", options.play)
+                .bind("jqt-photo-pause", options.pause)
+                .bind("jqt-photo-prev", options.prev)
+                .bind("jqt-photo-next", options.next)
+                .bind("jqt-photo-hide-toolbars", options.hideToolbars)
+                .bind("jqt-photo-show-toolbars", options.showToolbars)
+                .bind("jqt-photo-toggle-toolbars", options.toggleToolbars)
+                .bind("pageAnimationEnd", options.pageAnimationEnd)
+                .bind("pageAnimationStart", options.pageAnimationStart);
+    }
+    
+    /**
+     *    Record initial slide data
+     *
+     *    @param jQuery images
+     *    @param Object options
+     *    @return jQuery
+     */
+    function parseImageData (target, images, options) {
+        return images.each(function() {
+            var t = $(this).addClass(options.parsedClass),
+                matrix = new WebKitCSSMatrix(window.getComputedStyle(this).webkitTransform),
+                scale = Number(matrix.m11),
+                data = t.data("jqt-photo-info") || {}, 
+                c = {
+                    scale: scale,
+                    top: Number(matrix.m42),
+                    left: Number(matrix.m41),
+                    width: t.width() * scale,
+                    height: t.height() * scale,
+                    parent: t.parent()
+                };
+            
+            data.galleryOptions = options;
+            data.gallery = data.gallery || target;
+            
+            data[orientation] = {current: c, original: $.extend({}, c)};
+            
+            t.data("jqt-photo-info", data);
+        });
+    }
+    
+    /**
+     *    Distributive handling for touchstart events
+     *
+     *    To Do: refractor to use all event based triggers
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @return Boolean
+     */
+    function touchStart (event) {
+        var target = $(event.target.nodeType == 3 ? event.target.parentNode : event.target), 
+            $this = $(this),
+            options = $this.data("jqt-photo-options"),
+            tt = supportsTouch ? event.targetTouches : {length: !event.ctrlKey ? 1 : 2};
+        
+        if (target.is(options.tagNames)) {
+            return null;
+        }
+        
+        if (target.is(options.playSelector)) {
+            if (!$this.hasClass(options.playingClass) && options.play) {
+                return options.play.call(this, event);
+            }
+            
+            return true;
+            
+        } else if (target.is(options.pauseSelector)) {
+            if ($this.hasClass(options.playingClass) && options.pause) {
+                return options.pause.call(this, event);
+            }
+            
+            return true;
+            
+        } else if (target.is(options.nextSelector) && options.next) {
+            return options.next.call(this, event);
+            
+        } else if (target.is(options.prevSelector) && options.prev) {
+            return options.prev.call(this, event);
+            
+        } else if (tt.length == 2 && target.closest(options.imageSelector).length && options.scaleStart) {
+            if ($this.hasClass(options.playingClass) && options.pause) {
+                options.pause.call(this);
+            }
+            
+            return options.scaleStart.call(this, event);
+            
+        } else if (tt.length == 1 && options.dragStart) {
+            if ($this.hasClass(options.playingClass) && options.pause) {
+                options.pause.call(this, event);
+            }
+            
+            return options.dragStart.call(this, event);
+        }
+        
+        return true;
+    }
+        
+    /**
+     *    Initialize a drag event
+     *
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @return Boolean
+     */
+    function dragStart (event) {
+        event.preventDefault();
+        window.scrollTo(0,0);
+        
+        var $this = $(this),
+            options = $this.data("jqt-photo-options"),
+            table = $this.find(options.tableSelector).css("webkitTransitionDuration", "0s"),
+            position = table.data("jqt-photo-position"),
+            target = $(event.target).closest(options.imageSelector),
+            data = target.data("jqt-photo-info") || false,
+            offset = !!data && data[orientation] || false,
+            current = !!offset && offset.current || {},
+            tt = supportsTouch ? event.targetTouches[0] : event;
+        
+        this.addEventListener(events.move, options.drag, false);
+        this.addEventListener(events.end, options.dragEnd, false);
+        
+        $this
+            .data("jqt-photo-event", {
+                table: table,
+                position: {current: position.x, original: position.x},
+                target: target.css("webkitTransitionDuration", "0s"),
+                options: options,
+                slides: table.find(options.slideSelector),
+                moved: false,
+                x: tt.pageX,
+                y: tt.pageY,
+                left: current.left || 0,
+                top: current.top || 0,
+                timeStamp: +new Date
+            });
+            
+        return true;
+    }
+    
+    /**
+     *    Perform a drag event
+     *
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @return Boolean
+     */
+    function drag (event) {
+        event.preventDefault();
+        
+        var $this = $(this),
+            original = $this.data("jqt-photo-event"),
+            table = original.table,
+            position = original.position,
+            target = original.target,
+            info = target.data("jqt-photo-info"),
+            data = !!info && info[orientation] || false,
+            current = data.current || false,
+            tt = supportsTouch ? event.targetTouches[0] : event,
+            distanceX = original.x - tt.pageX,
+            distanceY = original.y - tt.pageY,
+            w, h, x, y, l, t, d, 
+            s = current.scale;
+        
+        original.moved = true;
+        
+        //image
+        if (data) {
+            $this.triggerHandler("jqt-photo-hide-toolbars", [original.options]);
+            
+            if (distanceX) {
+                x = target.width() * s;
+                w = current.parent.width();
+                l = original.left;
+                
+                if (x > w) {
+                    l -= distanceX / s;
+                    distanceX = 0;
+                    d = ((x - w) / s) / 2;
+                    
+                    if (l > d) {
+                        distanceX = d - l;
+                        l = d;
+                    } else if (l < -d) {
+                        distanceX = -(l + d);
+                        l = -d;
+                    }
+                }
+                
+                current.left = floor(l);
+            }
+            
+            if (distanceY) {
+                y = target.height() * s;
+                h = current.parent.height(),
+                t = original.top;
+                
+                if (y > h) {
+                    t -= distanceY / s;
+                }
+                
+                current.top = floor(t);
+            }
+            
+            target.css({
+                webkitTransitionDuration: "0s",
+                webkitTransform: format(original.options.imageTransform, s, current.left, current.top)
+            });
+        }
+        
+        //table
+        position.current = position.original - distanceX;
+        table.css({
+                webkitTransitionDuration: "0s",
+                webkitTransform: format(original.options.transform, position.current)
+        });
+        
+        return true;
+    }
+    
+    /**
+     *    End and clean up a drag event
+     *
+     *
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @return Boolean
+     */
+    function dragEnd (event) {
+        var $this = $(this),
+            original = $this.data("jqt-photo-event"),
+            table = original.table,
+            tablePosition = table.data("jqt-photo-position"),
+            position = original.position,
+            target = original.target,
+            info = target.data("jqt-photo-info"),
+            data = !!info && info[orientation] || false,
+            current = data.current || false,
+            slides = original.slides,
+            h, x, y, t, d, n, w,
+            s = current.scale;
+        
+        this.removeEventListener(events.move, original.options.drag, false);
+        this.removeEventListener(events.end, original.options.dragEnd, false);
+        
+        if (!original.moved) {
+            $this.trigger("jqt-photo-toggle-toolbars");
+            return dispatchClick(event.target);
+        }
+        
+        event.preventDefault();
+        
+        //image
+        if (data) {
+            y = target.height() * s;
+            h = current.parent.height(),
+            t = current.top;
+            
+            if (y > h) {
+                d = ((y - h) / s) / 2;
+                
+                if (t > d) {
+                    t = d;
+                } else if (t < -d) {
+                    t = -d;
+                }
+            }
+            
+            current.top = floor(t);
+            
+            target.css({
+                webkitTransitionDuration: original.options.scaleSpeed + "ms",
+                webkitTransform: format(original.options.imageTransform, s, current.left, current.top)
+            });
+        }
+        
+        d = (+new Date() - original.timeStamp);
+        
+        //table
+        if (position.current > 0) {
+            tablePosition.x = 0;
+            
+        } else if (position.current < (slides.eq(slides.length-1).width() - table.outerWidth())) {
+            tablePosition.x = (slides.eq(slides.length-1).width() - table.outerWidth());
+            
+        } else {
+            n = tablePosition.x < position.current ? -1 : 1;
+            x = slides.filter("."+original.options.currentClass);
+            t = abs(x.attr("offsetLeft") + position.current);
+            w = x.width() / 3;
+            
+            if (t > w) {
+                $this.triggerHandler("jqt-photo-slideto", [slides.index(x[0]) + n, (d > 1000 ? 1000 : d), original.options, slides]);
+                return true;
+            }
+        }
+        
+        table.css({
+            webkitTransitionDuration: (d > 1000 ? 1000 : d) + "ms",
+            webkitTransform: format(original.options.transform, tablePosition.x)
+        });
+        
+        return true;
+    }
+    
+    /**
+     *    Initialize a scaling event
+     *
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @return Boolean
+     */
+    function scaleStart (event) {
+        event.preventDefault();
+        window.scrollTo(0,0);
+        
+        var $this = $(this),
+            options = $this.data("jqt-photo-options"),
+            tt = supportsTouch ? 
+                    event.targetTouches : 
+                    [
+                        {pageX: controlPoints.x - event.pageX, pageY: controlPoints.y - event.pageY},
+                        event
+                    ];
+        
+        this.addEventListener(events.move, options.scale, false);
+        this.addEventListener(events.end, options.scaleEnd, false);
+        
+        try{
+            this.removeEventListener(events.move, options.drag, false);
+            this.removeEventListener(events.end, options.dragEnd, false);
+        }catch(e){}
+        
+        $this.data("jqt-photo-event", {
+                target: $(event.target).closest(options.imageSelector).css("webkitTransitionDuration", "0s"),
+                options: options,
+                distance: sqrt(
+                    pow((tt[1].pageX - tt[0].pageX), 2)
+                    + pow((tt[1].pageY - tt[0].pageY), 2)
+                )
+            })
+            .find(".image-list")
+            .css("webkitTransitionDuration", "0s");//end any transform on this table
+            
+        return true;
+    }
+    
+    /**
+     *    Perform a scaling event
+     *
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @return Boolean
+     */
+    function scale (event) {
+        if (event.targetTouches.length != 2) {
+            return true;
+        }
+        
+        event.preventDefault();
+        
+        var $this = $(this),
+            original = $this.data("jqt-photo-event"),
+            target = original.target,
+            info = target.data("jqt-photo-info"),
+            data = !!info && info[orientation] || false,
+            tt = event.targetTouches,
+            distance = sqrt(
+                pow((tt[1].pageX - tt[0].pageX), 2) +
+                pow((tt[1].pageY - tt[0].pageY), 2)
+            ),
+            difference = distance - original.distance,
+            percentChange = (difference / original.distance) / 2,
+            current = data.current,
+            transform;
+        
+        if (!current) {
+            parseImageData($this, target, original.options);
+            info = target.data("jqt-photo-info");
+            data = !!info && info[orientation] || false;
+            current = data.current;
+        }
+        
+        $this.triggerHandler("jqt-photo-hide-toolbars", [original.options]);
+        
+        transform = format(original.options.imageTransform, 
+                        (current.scale = (current.scale + (current.scale * percentChange))), 
+                        current.left, 
+                        current.top                        
+                   );
+        
+        original.distance = distance;
+            
+        target.css({webkitTransitionDuration: "0s", webkitTransform: transform});
+        
+        return true;
+    }
+    
+    /**
+     *    End a scaling event
+     *
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @return Boolean
+     */
+    function scaleEnd (event) {
+        event.preventDefault();
+        
+        var $this = $(this),
+            original = $this.data("jqt-photo-event"),
+            info = original.target.data("jqt-photo-info"),
+            data = !!info && info[orientation] || false,
+            current = data.current;
+        
+        this.removeEventListener(events.move, original.options.scale, false);
+        this.removeEventListener(events.end, original.options.scaleEnd, false);
+        
+        if (!current) {
+            parseImageData($this, original.target, original.options);
+            info = original.target.data("jqt-photo-info");
+            data = !!info && info[orientation] || false;
+            current = data.current;
+        }
+        
+        if (current.scale < data.original.scale) {
+            current.scale = data.original.scale;
+            current.left = data.original.left;
+            current.top = data.original.top;
+        }
+        
+        original.target.css({
+            webkitTransitionDuration: original.options.scaleSpeed + "ms",
+            webkitTransform: format(original.options.imageTransform, current.scale, current.left, current.top)
+        });
+        
+        return true;
+    }
+    
+    /**
+     *    Dispatch a click event on a given target, in the event 
+     *    a single-target touch event did not result in movement
+     *
+     *    @param Element target
+     *    @return Boolean
+     */
+    function dispatchClick (target) {
+        var theEvent = target.ownerDocument.createEvent("MouseEvents");
+        theEvent.initEvent("click", true, true);
+        target.dispatchEvent(theEvent);
+        return true;
+    }
+    
+    /**
+     *    Begin a slideshow
+     *
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @param Number index
+     *    @return Boolean
+     */
+    function play (event, index) {
+        event.preventDefault && event.preventDefault();
+        
+        var $this = $(this),
+            options = $this.data("jqt-photo-options"),
+            slides = $this.find(options.slideSelector),
+            n = index === undefined || index < 0 
+                ? Number(slides.filter("."+options.currentClass).attr(options.dataAttribute))
+                : abs(index);
+                
+        addHover($this.addClass(options.playingClass), $this.find(options.pauseSelector)[0]);
+        
+        if (n != index) {
+            $this.triggerHandler("jqt-photo-goto", [n, 0, options, slides]);
+        }
+        
+        $this.data("jqt-photo-slide-timer", setInterval(function(){slideInterval($this, slides, options)}, options.slideDelay));
+            //.triggerHandler("jqt-photo-hide-toolbars", [options]);
+        
+        return true;
+    }
+    
+    /**
+     *    Handler for slideshow intervals
+     *
+     *
+     *
+     *    @param jQuery target
+     *    @param jQuery slides
+     *    @param Object options
+     *    @return null
+     */
+    function slideInterval (target, slides, options) {
+        //current index + 1
+        var index = Number(target.find(options.slideSelector).filter("."+options.currentClass).attr(options.dataAttribute)) + 1,
+            func = "jqt-photo-slideto";//"slideTo";
+        
+        if (index === options.data.length) {
+            if (!options.repeatSlideShow) {
+                target.triggerHandler("jqt-photo-pause");
+                return null;
+            }
+            index = 0;
+            func = "jqt-photo-goto";//"goTo";
+        }
+        
+        //options[func].call(target[0], {}, index, options.scrollSpeed, options);
+        target.triggerHandler(func, [index, options.scrollSpeed, options, slides]);
+        
+        target.triggerHandler("jqt-photo-hide-toolbars", [options]);
+        
+        return null;
+    }
+    
+    /**
+     *    End a slideshow
+     *
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @return Boolean
+     */
+    function pause (event) {
+        event.preventDefault && event.preventDefault();
+        
+        var $this = $(this), 
+            timer = $this.data("jqt-photo-slide-timer"), 
+            options = $this.data("jqt-photo-options");
+            
+        addHover($this, $this.find(options.playSelector)[0]);
+        
+        clearInterval(timer);
+        $this.removeClass(options.playingClass)
+            .data("jqt-photo-slide-timer", null)
+            .triggerHandler("jqt-photoshow-toolbars");
+        
+        return true;
+    }
+    
+    /**
+     *    Perform a slide to a given, or inferred next slide, using the data provided
+     *
+     *
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @param Number index
+     *    @param Number duration
+     *    @param Object options
+     *    @param jQuery slides - optional;
+     *    @return Boolean
+     */
+    function slideTo (event, index, duration, options, slides) {
+        event.preventDefault && event.preventDefault();
+        
+        var $this = $(this), table, current, title, last, img;
+            
+        options = options || $this.data("jqt-photo-options");
+        
+        slides = slides || $this.find(options.slideSelector);
+        
+        table = options.table;
+        
+        index = Number(index || 0);
+        //how long should this particular transition take?
+        duration = duration === undefined || duration < 0 ? options.scrollSpeed : (Number(duration) || 0);
+        
+        if (index >= options.data.length) {
+            $this.triggerHandler("jqt-photo-goto", [0, duration, options, slides]);
+            return true;
+        }
+        
+        if (index < 0) {
+            index = options.data.length + index;
+        }
+        
+        last = slides.filter("."+options.currentClass);
+        
+        //new current
+        current = slides.removeClass(options.currentClass).filter(format("[{0}={1}]", options.dataAttribute, index));
+        
+        img = current.find(options.imageSelector);
+        
+        if (img.attr("src") != options.data[index].src) {
+            img.parent().addClass(options.notLoadedClass);
+            img.attr("src", options.data[index].src);
+        }
+        
+        //new position
+        position = -current.addClass(options.currentClass).attr("offsetLeft");
+    
+        if (position > 0) {
+            position = 0;
+        } else if (position < -(table.width()-current.width())) {
+            position = -(table.width()-current.width());
+        }
+        
+        //trigger slide change event
+        $this.trigger("jqt-photo-slide-change", [index, duration, position]);
+        //save the position
+        table.data("jqt-photo-position").x = position;
+        //atach animation end listener, and set necessary css properties
+         table.one("webkitTransitionEnd", function() {
+            options.rearrange(current, last, options);
+        })
+        .css({
+            webkitTransitionDuration: duration+"ms",
+            webkitTransform: format(options.transform, position)
+        });
+        
+        //update the title of the gallery
+        title = $this.find(options.titleSelector);
+        title.html(format(options.galleryName || title.html(), Number(index) + 1, options.data.length));
+        
+        return true;
+    }
+    
+    /**
+     *    Jump to a given, or inferred next slide, using the data provided
+     *
+     *
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @param Number index    - optional; index of the slide to go to
+     *    @param Number duration - optional; duration of the transition
+     *    @param Object options - optional; the options associated with the gallery
+     *    @param jQuery slides - optional;
+     *    @return Boolean
+     */
+    function goTo (event, index, duration, options, slides) {
+        event.preventDefault && event.preventDefault();
+        
+        var $this = $(this), table, current, title, last, img;
+        
+        options = options || $this.data("jqt-photo-options");
+        
+        slides = slides || $this.find(options.slideSelector);
+        
+        table = options.table;
+        
+        index = Number(index || 0);
+        //how long should this particular transition take?
+        duration = duration === undefined || duration < 0 ? options.scrollSpeed : (Number(duration) || 0);
+        
+        if (index >= options.data.length) {
+            index = 0;
+        }
+        
+        if (index < 0) {
+            index = options.data.length + index;
+        }
+        
+        last = slides.filter("."+options.currentClass);
+        
+        //new current
+        current = slides.removeClass(options.currentClass).filter(format("[{0}={1}]", options.dataAttribute, index));
+        
+        img = current.find(options.imageSelector);
+        
+        if (img.attr("src") != options.data[index].src) {
+            img.parent().addClass(options.notLoadedClass);
+            img.attr("src", options.data[index].src);
+        }
+        
+        //position of the new current
+        position = -current.addClass(options.currentClass).attr("offsetLeft");
+        
+        if (position > 0) {
+            position = 0;
+        } else if (position < -(table.width()-current.width())) {
+            position = -(table.width()-current.width());
+        }
+        
+        //save the position
+        table.data("jqt-photo-position").x = position;
+        //reset scales after slide and set css to cause the slide
+        table.css({
+            webkitTransitionDuration: "0s",
+            webkitTransform: format(options.transform, position)
+        });
+        
+        //update the title
+        //title element
+        title = $this.find(options.titleSelector);
+        title.html(format(options.galleryName || title.html(), Number(index) + 1, options.data.length));
+        
+        options.rearrange(current, last, options);
+        
+        return true;
+    }
+    
+    /**
+     *    Reassign the img tags with src attributes in order to maintain the 
+     *    memory consumption
+     *
+     *    @param jQuery current - the current slide
+     *    @param jQuery last - the previous slide
+     *    @param Object options - the gallery options
+     *    @return Boolean
+     */
+    function rearrange (current, last, options) {
+        var next = current.next()
+            prev = current.prev();
+            
+        next.length && next.find(options.imageSelector).attr("src", options.data[next.attr(options.dataAttribute)].src);
+            
+        prev.length && prev.find(options.imageSelector).attr("src", options.data[prev.attr(options.dataAttribute)].src);
+        
+        current.prevAll().slice(options.maxSlidesBefore)
+            .find(options.imageSelector)
+            .filter("[src]")
+            .each(function() {
+                var clone = options.blankImage.clone(true),
+                    $this = $(this);
+                
+                $this.parent().addClass(options.notLoadedClass);
+                $this.replaceWith(clone);
+                
+                parseImageData($this, clone, options);
+            });
+            
+        current.nextAll().slice(options.maxSlidesAfter)
+            .find(options.imageSelector)
+            .filter("[src]")
+            .each(function() {
+                var clone = options.blankImage.clone(true),
+                    $this = $(this);
+                
+                $this.parent().addClass(options.notLoadedClass);
+                $this.replaceWith(clone);
+                
+                parseImageData($this, clone, options);
+            });
+        
+        if (last[0] !== current[0]) {
+            resetDimensions(last.find(options.imageSelector));
+        }
+        
+        return true;
+    }
+    
+    /**
+     *    Transition to previous slide (or last slide) in gallery
+     *
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @return Boolean
+     */
+    function prev (event) {
+        event.preventDefault && event.preventDefault();
+        
+        var $this = $(this),
+            options = $this.data("jqt-photo-options"),
+            slides = $this.find(options.slideSelector),
+            index = Number(slides.filter("."+options.currentClass).attr(options.dataAttribute));
+           
+        addHover($this, event.target);
+           
+        $this.triggerHandler("jqt-photo-goto", [index - 1, 0, options, slides]);
+        
+        return true;
+    }
+    
+    /**
+     *    Transition to next slide (or first slide) in gallery
+     *
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @return Boolean
+     */
+    function next (event) {
+        event.preventDefault && event.preventDefault();
+        
+        var $this = $(this),
+            options = $this.data("jqt-photo-options"),
+            slides = $this.find(options.slideSelector),
+            index = Number(slides.filter("."+options.currentClass).attr(options.dataAttribute));
+           
+        addHover($this, event.target);
+           
+        $this.triggerHandler("jqt-photo-goto", [index + 1, 0, options, slides]);
+        
+        return true;
+    }
+    
+    /**
+     *    Trigger an animation to slide up/slide down the toobars on a given gallery
+     *    using a predetermined class
+     *
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @param Object options
+     *    @return null
+     */
+    function toggleToolbars (event, options) {
+        if (event && event.target && event.target.tagName === "A") {
+            return null;
+        }
+        
+        var gallery = $(this);
+        
+        options = options || gallery.data("jqt-photo-options");
+        
+        if (gallery.hasClass(options.toolbarHideClass)) {
+            gallery.triggerHandler("jqt-photo-show-toolbars", [options]);
+            
+        } else {
+            gallery.triggerHandler("jqt-photo-hide-toolbars", [options]);
+        }
+        return null;
+    }
+    
+    /**
+     *    Trigger an animation to slide up the toobars on a given gallery
+     *    using a predetermined class
+     *
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @param Object options
+     *    @return null
+     */
+    function hideToolbars (event, options) {
+        var gallery = $(this);
+        
+        options = options || gallery.data("jqt-photo-options");
+        
+        if (!gallery.hasClass(options.toolbarHideClass)) {
+            gallery.one("webkitTransitionEnd",function() {
+                gallery.addClass(options.toolbarHideClass)
+                    .removeClass(options.toolbarAnimationOutClass);
+            })
+            .addClass(options.toolbarAnimationOutClass);
+        }
+        return null;
+    }
+    
+    /**
+     *    Trigger an animation to slide down the toobars on a given gallery
+     *    using a predetermined class
+     *
+     *
+     *    @context The gallery element
+     *
+     *    @param Event event
+     *    @param Object options
+     *    @return null
+     */
+    function showToolbars (event, options) {
+        var gallery = $(this);
+        
+        options = options || gallery.data("jqt-photo-options");
+        
+        if (gallery.hasClass(options.toolbarHideClass)) {
+            gallery.one("webkitTransitionEnd",function() {
+                gallery.removeClass(options.toolbarAnimationInClass);
+            })
+            .addClass(options.toolbarAnimationInClass)
+            .removeClass(options.toolbarHideClass);
+        }
+        return null;
+    }
+    
+    /**
+     *    The jQTouch animation start event
+     *
+     *    @context The gallery element
+     *
+     *    @param jQuery.Event event
+     *    @param Object info
+     *    @return null
+     */
+    function pageAnimationStart (event, info) {
+        if (info && info.direction == "in") {
+            var $this = $(this),
+                options = $this.data("jqt-photo-options"),
+                slides = $this.find(options.slideSelector),
+                index = Number(slides.filter("."+options.currentClass).attr(options.dataAttribute)),
+                n = index > -1 ? index : (options.defaultIndex > -1 ? options.defaultIndex : 0);
+                //n = (options.defaultIndex > -1 ? options.defaultIndex : 0);
+                     
+            if (slides.index("."+options.currentClass) != n) {
+                $this.triggerHandler("jqt-photo-goto", [n, 0, options, slides]);
+                $this.triggerHandler("jqt-photo-show-toolbars");
+            }
+        }
+        return null;
+    }
+    
+    /**
+     *    The jQTouch animation end event
+     *
+     *    @context The gallery element
+     *
+     *    @param jQuery.Event event
+     *    @param Object info
+     *    @return null
+     */
+    function pageAnimationEnd (event, info) {
+        var $this = $(this),
+            options = $this.data("jqt-photo-options"),
+            slides = $this.find(options.slideSelector),
+            index,n;
+            //n = (options.defaultIndex > -1 ? options.defaultIndex : 0);
+                
+        if (info && info.direction == "out") {
+            $this.triggerHandler("jqt-photo-goto", [options.defaultIndex, 0, options, slides]);
+            $this.triggerHandler("jqt-photo-show-toolbars");
+        } else {
+            index = Number(slides.filter("."+options.currentClass).attr(options.dataAttribute));
+            n = index > -1 ? index : (options.defaultIndex > -1 ? options.defaultIndex : 0)
+            $this.triggerHandler("jqt-photo-goto", [n, 0, options, slides]);
+        }
+        return null;
+    }
+    
+    /**
+     *    Create a slide for insertion using the provided information
+     *
+     *    @param Object data - the information about the slide
+     *    @param Number index - index of the data in the list
+     *    @param Object options - the information about the gallery
+     *    @param Boolean inWindow - in the slide window
+     */
+    function createSlide (data, index, options, inWindow) {
+        var slide = $(data.template || options.slideTemplate).attr(options.dataAttribute, index),
+            img = slide.find(options.imageSelector);
+        
+        parseImageData(options.gallery, img.load(options.loader), options);
+        
+        if (inWindow) {
+            img.attr("src", data.src);
+        }
+        
+        if (data.caption) {
+            slide.find(options.captionSelector).html(data.caption);
+        }
+                        
+        return slide;               
+    }
+    
+    /**
+     *    Reset the scale and position of the given images
+     *
+     *    @param jQuery images
+     *    @return jQuery
+     */
+    function resetDimensions (images) {
+        return images.each(function(i) {
+            var t = $(this),
+                data = t.data("jqt-photo-info"),
+                d = data[orientation];//,p;
+            
+            /*if (!d) {
+                p = t.parent(defaults.gallerySelector);
+                parseImageData(p, t, p.data("jqt-photo-options"));
+                d = data[orientation];
+            }*/
+            
+            //image should be resized?
+            if (d && d.current.scale != 1 && d.current.scale != d.original.scale) {
+                t.css({
+                    webkitTransitionDuration: "0s", 
+                    webkitTransform: format(data.galleryOptions.imageTransform, 
+                                            d.current.scale = d.original.scale,
+                                            d.current.left = d.original.left,
+                                            d.current.top = d.original.top
+                                     )
+                });
+                
+                d.current.width = d.original.width;
+                d.current.height = d.original.height;
+            }
+            return null;
+        });
+    }
+    
+    /**
+     *    Add the hover class to the given element on touchstart
+     *
+     *    @param jQuery gallery
+     *    @param DOMElement | jQuery element
+     *    @return null
+     */
+    function addHover (gallery, element) {
+        $(element).addClass("hover")
+        gallery.one("touchend", function(){$(element).removeClass("hover")});
+        return null;
+    }
+    
+    /**
+     *    Format a String followed by a set of arguments using the format
+     *    {0} is replaced with arguments[1]
+     *
+     *    @param String s
+     *    @param Object arg1 ... argN
+     *    @return String
+     */
+    function format (s) {
+        var args = arguments;
+        return s.replace(/\{(\d+)\}/g, function(a,b){return args[Number(b)+1] + ""});
+    }
+    
+    /**
+     *    window.onorientationchange event handler updates all slide data for the new orientation
+     *    (if it doesn't already exist) and resets the scale of the images
+     *
+     *    @return null
+     */
+    function onorientationchange () {
+        orientation = abs(window.orientation) == 90 ? "landscape" : "portrait";
+        
+        //effectively this shouldn't be necessary, but it appears to be
+        $("#jqt").removeClass("portrait landscape").addClass(orientation);
+        
+        //make sure the slides line up appropriately, use delay to ensure repaint has passed
+        setTimeout(function(){
+            var playing = [],
+                loop = function() {
+                    var $this = $(this), 
+                        options = $this.data("jqt-photo-options"),
+                        slides = $this.find(options.slideSelector),
+                        images =  slides.find(options.imageSelector);
+                    
+                    //if ($this.is(":visible")) {
+                        alignSlides($this, slides, options);
+                    //}
+                    
+                    if ($this.hasClass(options.playingClass)) {
+                        playing.push(this);
+                        $this.triggerHandler("jqt-photo-pause");
+                    }
+                    
+                    //if (!images.data("jqt-photo-info")[orientation]) {
+                    //    parseImageData($this, images, defaults);
+                    //}
+                    
+                    resetDimensions(images.filter("[src]"));
+                };
+            
+            $(galleries).filter(":visible").each(loop).end().filter(":not(:visible)").each(loop);
+            
+            $(playing).triggerHandler("jqt-photo-play");
+            
+        }, 10);
+            
+        controlPoints = {x: window.innerWidth/2, y: window.innerHeight/2};
+        
+        return null;
+    }
+    
+    /**
+     *    Reset the transform after an orientation change
+     *    to ensure that the slides are correctly aligned
+     *
+     *
+     *
+     *    @param jQuery galleries
+     *    @return jQuery
+     */
+    function alignSlides ($this, slides, options) {
+        table = $this.find(options.tableSelector),
+        position = -slides.filter("."+options.currentClass).attr("offsetLeft");
+                
+        table.data("jqt-photo-position").x = position;
+        
+        table.css({
+            webkitTransitionDuration: "0s",
+            webkitTransform: format(options.transform, position)
+        });
+        
+        return null;
+    }
+    
+    /**
+     *    image onload event handler
+     *
+     *    @context An IMG tag
+     *
+     *    @return null
+     */
+    function loader () {
+        var innerWidth = window.innerWidth,
+            innerHeight = window.innerHeight,
+            $this = $(this),
+            w = $this.width(),
+            h = $this.height(),
+            top, left,
+            scale = min(min(w, innerWidth)/w, min(h, innerHeight)/h),
+            width = w * scale,
+            height = h * scale,
+            data = $this.data("jqt-photo-info"),
+            options = data.galleryOptions;
+        
+        $this.parent().removeClass(options.notLoadedClass);
+        
+        if (!$this.is(":visible")) {
+            data.gallery.one("pageAnimationEnd", function(){parseImageData(data.gallery, $this, data.galleryOptions)});
+            
+        } else if (width > innerWidth || height > innerHeight) {
+            
+            left = -floor(((width - innerWidth) / scale) / 2);
+            
+            top = -floor(((height - innerHeight) / scale) / 2);
+            
+            $this.css({
+                 webkitTransitionDuration: "0s",
+                 webkitTransform: format(options.imageTransform, scale, left, top)
+            })
+            .addClass(options.presizedClass);
+            
+            data = data[orientation];
+            data.current.scale = data.original.scale = scale;
+            data.current.left = data.original.left = left;
+            data.current.top = data.original.top = top;
+            data.current.width = data.original.width = width * scale;
+            data.current.height = data.original.height = height * scale;
+        } 
+        
+        return null;
+    }
+    
+    //load the css on dom ready
+    $(function() {
+        window.scrollTo(0,0);
+        controlPoints = {x: window.innerWidth/2, y: window.innerHeight/2};
+        
+        if (defaults.useDynamicStyleSheet) {
+            var stringRules = "", 
+                rules = cssRules, 
+                o = window.innerHeight > window.innerWidth ? "portrait" : "landscape",
+                buildProperties = function(name, value) {
+                    stringRules += name + ":" + ($.isFunction(value) ? value(rules.variables) : value) + ";";
+                },
+                buildRules = function(name, properties) {
+                    stringRules += name + "{";
+                    
+                    $.each(properties, buildProperties);
+                    
+                    stringRules += "}";
+                };
+            
+            $.each(rules.defaults, buildRules);
+            $.each(rules[o], buildRules);
+            
+            
+            $(document.createElement("style"))
+                .attr({type:"text/css",media:"screen"})
+                .html(stringRules)
+                .appendTo("head");
+            
+            //make sure the css is correct on orientationchange
+            $(window).one("orientationchange", function() {
+                //ensure repaint
+                //setTimeout(function() {
+                    window.scrollTo(0,0);
+                    
+                    orientation = abs(window.orientation) == 90 ? "landscape" : "portrait";
+        
+                    //effectively this shouldn't be necessary, but it appears to be
+                    $("#jqt").removeClass("portrait landscape").addClass(orientation);
+                    
+                    stringRules = "";
+                    
+                    $.each(rules[orientation], buildRules);
+                    
+                    $(document.createElement("style"))
+                        .attr({type:"text/css",media:"screen"})
+                        .html(stringRules)
+                        .appendTo("head");
+                //}, 10);
+            });
+        }
+        //Orientation event listener bind
+        $(window).bind("orientationchange", onorientationchange);
+        //http://cubiq.org/iscroll-3-3-beta-2
+        //use resize instead of orientationchange
+        //$(window).bind("resize", onorientationchange);
+    });
+    
+})(jQuery);
Index: extensions/iPiwigo/www/extensions/jqt.photo.min.js
===================================================================
--- extensions/iPiwigo/www/extensions/jqt.photo.min.js	(revision 9188)
+++ extensions/iPiwigo/www/extensions/jqt.photo.min.js	(revision 9188)
@@ -0,0 +1,41 @@
+/**
+ *    Provides event handling for iPhone like photo gallery (without thumbnail portion)
+ *
+ *    @author Sam Shull <http://www.google.com/profiles/brickysam26>
+ *    @copyright 2010 Sam Shull <http://samshull.blogspot.com/>
+ *
+ *    Special Thanks to Steve Simitzis <http://saturn5.com>
+ *
+ *    @license <http://www.opensource.org/licenses/mit-license.html>
+ *
+ *    Permission is hereby granted, free of charge, to any person obtaining a copy
+ *    of this software and associated documentation files (the "Software"), to deal
+ *    in the Software without restriction, including without limitation the rights
+ *    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ *    copies of the Software, and to permit persons to whom the Software is
+ *    furnished to do so, subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included in
+ *    all copies or substantial portions of the Software.
+ *    
+ *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ *    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ *    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ *    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ *    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ *    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ *    THE SOFTWARE.
+ *
+ *    Custom Events handled by each gallery:
+ *
+ *        jqt-photo-slideto            - slide to a given index (e, [index = int [, options = Object [, slides = jQuery ] ] ] )
+ *        jqt-photo-goto            - jump to a given index (e, [index = int [, options = Object [, slides = jQuery ] ] ] )
+ *        jqt-photo-play                - start the slideshow from the given point
+ *        jqt-photo-pause                - stop the slideshow
+ *        jqt-photo-prev                - go to the previous slide
+ *        jqt-photo-next                - go to the next slide
+ *        jqt-photo-hide-toolbars        - hide the visibility of the toolbars
+ *        jqt-photo-show-toolbars        - show the visibility of the toolbars
+ *        jqt-photo-toggle-toolbars    - toggle the visibility of the toolbars
+ */
+(function(N){if(!"WebKitCSSMatrix" in this){return null}var q,x=[],s="Touch" in this,F=s?{start:"touchstart",move:"touchmove",end:"touchend"}:{start:"mousedown",move:"mousemove",end:"mouseup"},f,ac=false,V=this,k=V.document,A=V.Math,ab=A.min,l=A.floor,R=A.sqrt,J=A.pow,M=A.abs,C=M(V.orientation)==90?"landscape":"portrait",P={data:[],galleryName:"{0} of {1}",defaultIndex:0,transitionProperty:"-webkit-transform",timingFunction:"cubic-bezier(0,0,.25,1)",transform:"translate3d({0}px,0,0)",imageTransform:"scale({0}) translate3d({1}px, {2}px, 0)",maxSlidesBefore:2,maxSlidesAfter:2,slideDelay:5000,scrollSpeed:500,scaleSpeed:500,useDynamicStyleSheet:true,repeatSlideShow:false,appendTo:"#jqt",dataAttribute:"data-index",tagNames:"A,INPUT,SELECT,TEXTAREA",backLink:'<a class="back">Back</a>',blankImage:'<img class="jqt-photo-img"/>',slideTemplate:'<td class="jqt-photo-image-slide">                                <div class="jqt-photo-not-loaded">                                    <img class="jqt-photo-img"/>                                    <div class="jqt-photo-caption"></div>                                </div>                            </td>',parsedClassTemplate:"#jqt .jqt-photo .jqt-photo-image-slide > .{0}{max-width:auto;max-height:auto;}",galleryTemplate:'<div class="jqt-photo">                                    <div class="toolbar toolbar-top"></div>                                    <table class="jqt-photo-table">                                        <tr class="jqt-photo-slide-list"></tr>                                    </table>                                    <div class="toolbar toolbar-bottom">                                        <div class="jqt-photo-prev"></div>                                        <div class="jqt-photo-pause"></div>                                        <div class="jqt-photo-play"></div>                                        <div class="jqt-photo-next"></div>                                    </div>                                </div>',pageAnimationEnd:i,pageAnimationStart:d,slideTo:h,play:I,pause:c,next:g,prev:L,goTo:X,showToolbars:u,hideToolbars:W,toggleToolbars:H,touchStart:S,dragStart:n,drag:j,dragEnd:Y,scaleStart:r,scale:O,scaleEnd:p,loader:B,createSlide:Q,rearrange:U,presizedClass:"jqt-photo-presized",parsedClass:"jqt-photo-parsed",currentClass:"jqt-photo-current",playingClass:"jqt-photo-playing",notLoadedClass:"jqt-photo-not-loaded",toolbarAnimationInClass:"jqt-photo-toolbar-animation-in",toolbarAnimationOutClass:"jqt-photo-toolbar-animation-out",toolbarHideClass:"jqt-photo-toolbar-hidden",tableSelector:".jqt-photo-table",captionSelector:".jqt-photo-caption",slideSelector:".jqt-photo-image-slide",imageSelector:"img.jqt-photo-img",titleSelector:".toolbar-top h1",listSelector:".jqt-photo-slide-list",playSelector:".jqt-photo-play",pauseSelector:".jqt-photo-pause",nextSelector:".jqt-photo-next",prevSelector:".jqt-photo-prev",gallerySelector:".jqt-photo"},T=function(ad){return(V.innerHeight-ad.caption)+"px"},e=function(){return V.innerHeight+"px"},a=function(){return V.innerWidth+"px"},y=function(ad){return(V.innerHeight-ad.toolbar)+"px"},w={variables:{caption:90,toolbar:45},defaults:{"#jqt .jqt-photo .toolbar-bottom":{top:y},"#jqt .jqt-photo .jqt-photo-image-slide > div":{width:a,height:e,"line-height":e},"#jqt .jqt-photo .jqt-photo-image-slide .jqt-photo-caption":{top:T,}},portrait:{"#jqt.portrait .jqt-photo":{height:e,width:a,},"#jqt.portrait .jqt-photo .toolbar-bottom":{top:y},"#jqt.portrait .jqt-photo .jqt-photo-image-slide > div":{width:a,height:e,"line-height":e,},"#jqt .jqt-photo .jqt-photo-image-slide .jqt-photo-caption":{top:T,}},landscape:{"#jqt.landscape .jqt-photo":{height:e,width:a,},"#jqt.landscape .jqt-photo .toolbar-bottom":{top:y,},"#jqt.landscape .jqt-photo .jqt-photo-table":{height:e,},"#jqt.landscape .jqt-photo .jqt-photo-image-slide > div":{height:e,width:a,"line-height":e,},"#jqt.landscape .jqt-photo .jqt-photo-image-slide .jqt-photo-caption":{top:T,}}};if(N.jQTouch){N.jQTouch.addExtension(function(ad){return{generateGallery:t,goToSlide:function(ae,ah,ak,ag){var aj=N(ae),af=aj.data("jqt-photo-options"),ai=aj.find(af.slideSelector);if(ai.index("."+af.currentClass)!=ah){ai.removeClass(af.currentClass).eq(ah).addClass(af.currentClass)}if(!aj.hasClass("current")){ad.goTo(aj,ak||"slide",ag)}aj.triggerHandler("jqt-photo-show-toolbars");return aj}}})}function t(ak,ad,af){af=N.extend({},P,af);af.data=ad;if(!ac){ac=true;var ag=k.styleSheets[k.styleSheets.length-1];ag.insertRule(K(af.parsedClassTemplate,af.parsedClass),ag.cssRules.length)}af.gallery=N(af.galleryTemplate).appendTo(af.appendTo);var aj=af.list=af.gallery.find(af.listSelector),ae=af.defaultIndex-af.maxSlidesBefore,ah=af.defaultIndex+af.maxSlidesAfter,ai=af.gallery.attr("id",ak).find(".toolbar-top").append(N("<h1></h1>").html(K(af.galleryName,af.defaultIndex+1,ad.length)));if(af.backLink){ai.append(af.backLink)}N.each(ad,function(al,am){aj.append(af.createSlide(am,al,af,al>=ae&&al<=ah))});return z(af.gallery[0],af)}N.fn.jqtPhoto=function(ad){ad=N.extend({},P,ad||{});return this.each(function(){z(this,ad)})};N.jqtPhoto={generateGallery:t,defaults:function(ad){if(ad){P=N.extend(P,ad)}return N.extend({},P)},defaultCSS:function(ad){if(ad!==q){w=N.extend(true,w,ad)}return N.extend({},w)}};function z(ag,af){var ae=N(ag),ah=v(ae,af).find(af.slideSelector),ad=ah.find(af.imageSelector);af.list=ae.find(af.listSelector);af.table=o(ae.data("jqt-photo-options",af),af);af.blankImage=G(ae,N(af.blankImage).load(af.loader),af);if(!ah.filter("."+af.currentClass).length){if(!ah.filter(K("[{0}={1}]",af.dataAttribute,af.defaultIndex)).addClass(af.currentClass).length){ah.eq(0).addClass(af.currentClass)}}ae.find(af.tableSelector).css({webkitTransitionProperty:af.transitionProperty,webkitTransitionTimingFunction:af.timingFunction,webkitTransitionDuration:af.defaultDuration+"s",webkitTransform:K(af.transform,-ah.filter("."+af.currentClass).attr("offsetLeft")||0)});G(ae,ad,af);x=x.concat(N.makeArray(ae));return ae}function o(ah,af){var ag=ah.find(af.tableSelector),ae=V.getComputedStyle(ag[0]).webkitTransform,ad=new WebKitCSSMatrix(ae);return ag.data("jqt-photo-position",{x:Number(ad.m41||0),gallery:ah})}function v(ae,ad){return ae.each(function(){this.addEventListener(F.start,ad.touchStart,false)}).bind("jqt-photo-slideto",ad.slideTo).bind("jqt-photo-goto",ad.goTo).bind("jqt-photo-play",ad.play).bind("jqt-photo-pause",ad.pause).bind("jqt-photo-prev",ad.prev).bind("jqt-photo-next",ad.next).bind("jqt-photo-hide-toolbars",ad.hideToolbars).bind("jqt-photo-show-toolbars",ad.showToolbars).bind("jqt-photo-toggle-toolbars",ad.toggleToolbars).bind("pageAnimationEnd",ad.pageAnimationEnd).bind("pageAnimationStart",ad.pageAnimationStart)}function G(af,ad,ae){return ad.each(function(){var ah=N(this).addClass(ae.parsedClass),ag=new WebKitCSSMatrix(V.getComputedStyle(this).webkitTransform),aj=Number(ag.m11),ai=ah.data("jqt-photo-info")||{},ak={scale:aj,top:Number(ag.m42),left:Number(ag.m41),width:ah.width()*aj,height:ah.height()*aj,parent:ah.parent()};ai.galleryOptions=ae;ai.gallery=ai.gallery||af;ai[C]={current:ak,original:N.extend({},ak)};ah.data("jqt-photo-info",ai)})}function S(af){var ah=N(af.target.nodeType==3?af.target.parentNode:af.target),ag=N(this),ad=ag.data("jqt-photo-options"),ae=s?af.targetTouches:{length:!af.ctrlKey?1:2};if(ah.is(ad.tagNames)){return null}if(ah.is(ad.playSelector)){if(!ag.hasClass(ad.playingClass)&&ad.play){return ad.play.call(this,af)}return true}else{if(ah.is(ad.pauseSelector)){if(ag.hasClass(ad.playingClass)&&ad.pause){return ad.pause.call(this,af)}return true}else{if(ah.is(ad.nextSelector)&&ad.next){return ad.next.call(this,af)}else{if(ah.is(ad.prevSelector)&&ad.prev){return ad.prev.call(this,af)}else{if(ae.length==2&&ah.closest(ad.imageSelector).length&&ad.scaleStart){if(ag.hasClass(ad.playingClass)&&ad.pause){ad.pause.call(this)}return ad.scaleStart.call(this,af)}else{if(ae.length==1&&ad.dragStart){if(ag.hasClass(ad.playingClass)&&ad.pause){ad.pause.call(this,af)}return ad.dragStart.call(this,af)}}}}}}return true}function n(ad){ad.preventDefault();V.scrollTo(0,0);var ak=N(this),am=ak.data("jqt-photo-options"),al=ak.find(am.tableSelector).css("webkitTransitionDuration","0s"),ag=al.data("jqt-photo-position"),aj=N(ad.target).closest(am.imageSelector),af=aj.data("jqt-photo-info")||false,ae=!!af&&af[C]||false,ai=!!ae&&ae.current||{},ah=s?ad.targetTouches[0]:ad;this.addEventListener(F.move,am.drag,false);this.addEventListener(F.end,am.dragEnd,false);ak.data("jqt-photo-event",{table:al,position:{current:ag.x,original:ag.x},target:aj.css("webkitTransitionDuration","0s"),options:am,slides:al.find(am.slideSelector),moved:false,x:ah.pageX,y:ah.pageY,left:ai.left||0,top:ai.top||0,timeStamp:+new Date});return true}function j(an){an.preventDefault();var ae=N(this),am=ae.data("jqt-photo-event"),aq=am.table,aw=am.position,av=am.target,at=av.data("jqt-photo-info"),ax=!!at&&at[C]||false,ak=ax.current||false,ad=s?an.targetTouches[0]:an,ar=am.x-ad.pageX,ap=am.y-ad.pageY,ah,ao,ag,af,al,ai,au,aj=ak.scale;am.moved=true;if(ax){ae.triggerHandler("jqt-photo-hide-toolbars",[am.options]);if(ar){ag=av.width()*aj;ah=ak.parent.width();al=am.left;if(ag>ah){al-=ar/aj;ar=0;au=((ag-ah)/aj)/2;if(al>au){ar=au-al;al=au}else{if(al<-au){ar=-(al+au);al=-au}}}ak.left=l(al)}if(ap){af=av.height()*aj;ao=ak.parent.height(),ai=am.top;if(af>ao){ai-=ap/aj}ak.top=l(ai)}av.css({webkitTransitionDuration:"0s",webkitTransform:K(am.options.imageTransform,aj,ak.left,ak.top)})}aw.current=aw.original-ar;aq.css({webkitTransitionDuration:"0s",webkitTransform:K(am.options.transform,aw.current)});return true}function Y(ao){var ad=N(this),an=ad.data("jqt-photo-event"),aq=an.table,ah=aq.data("jqt-photo-position"),av=an.position,au=an.target,ar=au.data("jqt-photo-info"),aw=!!ar&&ar[C]||false,ak=aw.current||false,am=an.slides,ap,af,ae,ai,at,al,ag,aj=ak.scale;this.removeEventListener(F.move,an.options.drag,false);this.removeEventListener(F.end,an.options.dragEnd,false);if(!an.moved){ad.trigger("jqt-photo-toggle-toolbars");return Z(ao.target)}ao.preventDefault();if(aw){ae=au.height()*aj;ap=ak.parent.height(),ai=ak.top;if(ae>ap){at=((ae-ap)/aj)/2;if(ai>at){ai=at}else{if(ai<-at){ai=-at}}}ak.top=l(ai);au.css({webkitTransitionDuration:an.options.scaleSpeed+"ms",webkitTransform:K(an.options.imageTransform,aj,ak.left,ak.top)})}at=(+new Date()-an.timeStamp);if(av.current>0){ah.x=0}else{if(av.current<(am.eq(am.length-1).width()-aq.outerWidth())){ah.x=(am.eq(am.length-1).width()-aq.outerWidth())}else{al=ah.x<av.current?-1:1;af=am.filter("."+an.options.currentClass);ai=M(af.attr("offsetLeft")+av.current);ag=af.width()/3;if(ai>ag){ad.triggerHandler("jqt-photo-slideto",[am.index(af[0])+al,(at>1000?1000:at),an.options,am]);return true}}}aq.css({webkitTransitionDuration:(at>1000?1000:at)+"ms",webkitTransform:K(an.options.transform,ah.x)});return true}function r(af){af.preventDefault();V.scrollTo(0,0);var ah=N(this),ad=ah.data("jqt-photo-options"),ae=s?af.targetTouches:[{pageX:f.x-af.pageX,pageY:f.y-af.pageY},af];this.addEventListener(F.move,ad.scale,false);this.addEventListener(F.end,ad.scaleEnd,false);try{this.removeEventListener(F.move,ad.drag,false);this.removeEventListener(F.end,ad.dragEnd,false)}catch(ag){}ah.data("jqt-photo-event",{target:N(af.target).closest(ad.imageSelector).css("webkitTransitionDuration","0s"),options:ad,distance:R(J((ae[1].pageX-ae[0].pageX),2)+J((ae[1].pageY-ae[0].pageY),2))}).find(".image-list").css("webkitTransitionDuration","0s");return true}function O(ae){if(ae.targetTouches.length!=2){return true}ae.preventDefault();var ao=N(this),ah=ao.data("jqt-photo-event"),am=ah.target,ag=am.data("jqt-photo-info"),aj=!!ag&&ag[C]||false,an=ae.targetTouches,ad=R(J((an[1].pageX-an[0].pageX),2)+J((an[1].pageY-an[0].pageY),2)),ai=ad-ah.distance,ak=(ai/ah.distance)/2,al=aj.current,af;if(!al){G(ao,am,ah.options);ag=am.data("jqt-photo-info");aj=!!ag&&ag[C]||false;al=aj.current}ao.triggerHandler("jqt-photo-hide-toolbars",[ah.options]);af=K(ah.options.imageTransform,(al.scale=(al.scale+(al.scale*ak))),al.left,al.top);ah.distance=ad;am.css({webkitTransitionDuration:"0s",webkitTransform:af});return true}function p(ae){ae.preventDefault();var ai=N(this),ad=ai.data("jqt-photo-event"),ah=ad.target.data("jqt-photo-info"),af=!!ah&&ah[C]||false,ag=af.current;this.removeEventListener(F.move,ad.options.scale,false);this.removeEventListener(F.end,ad.options.scaleEnd,false);if(!ag){G(ai,ad.target,ad.options);ah=ad.target.data("jqt-photo-info");af=!!ah&&ah[C]||false;ag=af.current}if(ag.scale<af.original.scale){ag.scale=af.original.scale;ag.left=af.original.left;ag.top=af.original.top}ad.target.css({webkitTransitionDuration:ad.options.scaleSpeed+"ms",webkitTransform:K(ad.options.imageTransform,ag.scale,ag.left,ag.top)});return true}function Z(ad){var ae=ad.ownerDocument.createEvent("MouseEvents");ae.initEvent("click",true,true);ad.dispatchEvent(ae);return true}function I(ag,ae){ag.preventDefault&&ag.preventDefault();var ah=N(this),ad=ah.data("jqt-photo-options"),af=ah.find(ad.slideSelector),ai=ae===q||ae<0?Number(af.filter("."+ad.currentClass).attr(ad.dataAttribute)):M(ae);E(ah.addClass(ad.playingClass),ah.find(ad.pauseSelector)[0]);if(ai!=ae){ah.triggerHandler("jqt-photo-goto",[ai,0,ad,af])}ah.data("jqt-photo-slide-timer",setInterval(function(){b(ah,af,ad)},ad.slideDelay));return true}function b(ah,af,ae){var ad=Number(ah.find(ae.slideSelector).filter("."+ae.currentClass).attr(ae.dataAttribute))+1,ag="jqt-photo-slideto";if(ad===ae.data.length){if(!ae.repeatSlideShow){ah.triggerHandler("jqt-photo-pause");return null}ad=0;ag="jqt-photo-goto"}ah.triggerHandler(ag,[ad,ae.scrollSpeed,ae,af]);ah.triggerHandler("jqt-photo-hide-toolbars",[ae]);return null}function c(ae){ae.preventDefault&&ae.preventDefault();var af=N(this),ag=af.data("jqt-photo-slide-timer"),ad=af.data("jqt-photo-options");E(af,af.find(ad.playSelector)[0]);clearInterval(ag);af.removeClass(ad.playingClass).data("jqt-photo-slide-timer",null).triggerHandler("jqt-photoshow-toolbars");return true}function h(ad,ah,af,an,ae){ad.preventDefault&&ad.preventDefault();var aj=N(this),am,ai,ak,al,ag;an=an||aj.data("jqt-photo-options");ae=ae||aj.find(an.slideSelector);am=an.table;ah=Number(ah||0);af=af===q||af<0?an.scrollSpeed:(Number(af)||0);if(ah>=an.data.length){aj.triggerHandler("jqt-photo-goto",[0,af,an,ae]);return true}if(ah<0){ah=an.data.length+ah}al=ae.filter("."+an.currentClass);ai=ae.removeClass(an.currentClass).filter(K("[{0}={1}]",an.dataAttribute,ah));ag=ai.find(an.imageSelector);if(ag.attr("src")!=an.data[ah].src){ag.parent().addClass(an.notLoadedClass);ag.attr("src",an.data[ah].src)}position=-ai.addClass(an.currentClass).attr("offsetLeft");if(position>0){position=0}else{if(position<-(am.width()-ai.width())){position=-(am.width()-ai.width())}}aj.trigger("jqt-photo-slide-change",[ah,af,position]);am.data("jqt-photo-position").x=position;am.one("webkitTransitionEnd",function(){an.rearrange(ai,al,an)}).css({webkitTransitionDuration:af+"ms",webkitTransform:K(an.transform,position)});ak=aj.find(an.titleSelector);ak.html(K(an.galleryName||ak.html(),Number(ah)+1,an.data.length));return true}function X(ad,ah,af,an,ae){ad.preventDefault&&ad.preventDefault();var aj=N(this),am,ai,ak,al,ag;an=an||aj.data("jqt-photo-options");ae=ae||aj.find(an.slideSelector);am=an.table;ah=Number(ah||0);af=af===q||af<0?an.scrollSpeed:(Number(af)||0);if(ah>=an.data.length){ah=0}if(ah<0){ah=an.data.length+ah}al=ae.filter("."+an.currentClass);ai=ae.removeClass(an.currentClass).filter(K("[{0}={1}]",an.dataAttribute,ah));ag=ai.find(an.imageSelector);if(ag.attr("src")!=an.data[ah].src){ag.parent().addClass(an.notLoadedClass);ag.attr("src",an.data[ah].src)}position=-ai.addClass(an.currentClass).attr("offsetLeft");if(position>0){position=0}else{if(position<-(am.width()-ai.width())){position=-(am.width()-ai.width())}}am.data("jqt-photo-position").x=position;am.css({webkitTransitionDuration:"0s",webkitTransform:K(an.transform,position)});ak=aj.find(an.titleSelector);ak.html(K(an.galleryName||ak.html(),Number(ah)+1,an.data.length));an.rearrange(ai,al,an);return true}function U(ag,af,ad){var ae=ag.next();L=ag.prev();ae.length&&ae.find(ad.imageSelector).attr("src",ad.data[ae.attr(ad.dataAttribute)].src);L.length&&L.find(ad.imageSelector).attr("src",ad.data[L.attr(ad.dataAttribute)].src);ag.prevAll().slice(ad.maxSlidesBefore).find(ad.imageSelector).filter("[src]").each(function(){var ai=ad.blankImage.clone(true),ah=N(this);ah.parent().addClass(ad.notLoadedClass);ah.replaceWith(ai);G(ah,ai,ad)});ag.nextAll().slice(ad.maxSlidesAfter).find(ad.imageSelector).filter("[src]").each(function(){var ai=ad.blankImage.clone(true),ah=N(this);ah.parent().addClass(ad.notLoadedClass);ah.replaceWith(ai);G(ah,ai,ad)});if(af[0]!==ag[0]){m(af.find(ad.imageSelector))}return true}function L(ag){ag.preventDefault&&ag.preventDefault();var ah=N(this),ae=ah.data("jqt-photo-options"),af=ah.find(ae.slideSelector),ad=Number(af.filter("."+ae.currentClass).attr(ae.dataAttribute));E(ah,ag.target);ah.triggerHandler("jqt-photo-goto",[ad-1,0,ae,af]);return true}function g(ag){ag.preventDefault&&ag.preventDefault();var ah=N(this),ae=ah.data("jqt-photo-options"),af=ah.find(ae.slideSelector),ad=Number(af.filter("."+ae.currentClass).attr(ae.dataAttribute));E(ah,ag.target);ah.triggerHandler("jqt-photo-goto",[ad+1,0,ae,af]);return true}function H(af,ae){if(af&&af.target&&af.target.tagName==="A"){return null}var ad=N(this);ae=ae||ad.data("jqt-photo-options");if(ad.hasClass(ae.toolbarHideClass)){ad.triggerHandler("jqt-photo-show-toolbars",[ae])}else{ad.triggerHandler("jqt-photo-hide-toolbars",[ae])}return null}function W(af,ae){var ad=N(this);ae=ae||ad.data("jqt-photo-options");if(!ad.hasClass(ae.toolbarHideClass)){ad.one("webkitTransitionEnd",function(){ad.addClass(ae.toolbarHideClass).removeClass(ae.toolbarAnimationOutClass)}).addClass(ae.toolbarAnimationOutClass)}return null}function u(af,ae){var ad=N(this);ae=ae||ad.data("jqt-photo-options");if(ad.hasClass(ae.toolbarHideClass)){ad.one("webkitTransitionEnd",function(){ad.removeClass(ae.toolbarAnimationInClass)}).addClass(ae.toolbarAnimationInClass).removeClass(ae.toolbarHideClass)}return null}function d(ag,ai){if(ai&&ai.direction=="in"){var ah=N(this),ae=ah.data("jqt-photo-options"),af=ah.find(ae.slideSelector),ad=Number(af.filter("."+ae.currentClass).attr(ae.dataAttribute)),aj=ad>-1?ad:(ae.defaultIndex>-1?ae.defaultIndex:0);if(af.index("."+ae.currentClass)!=aj){ah.triggerHandler("jqt-photo-goto",[aj,0,ae,af]);ah.triggerHandler("jqt-photo-show-toolbars")}}return null}function i(ag,ai){var ah=N(this),ae=ah.data("jqt-photo-options"),af=ah.find(ae.slideSelector),ad,aj;if(ai&&ai.direction=="out"){ah.triggerHandler("jqt-photo-goto",[ae.defaultIndex,0,ae,af]);ah.triggerHandler("jqt-photo-show-toolbars")}else{ad=Number(af.filter("."+ae.currentClass).attr(ae.dataAttribute));aj=ad>-1?ad:(ae.defaultIndex>-1?ae.defaultIndex:0);ah.triggerHandler("jqt-photo-goto",[aj,0,ae,af])}return null}function Q(ai,ah,ag,ae){var ad=N(ai.template||ag.slideTemplate).attr(ag.dataAttribute,ah),af=ad.find(ag.imageSelector);G(ag.gallery,af.load(ag.loader),ag);if(ae){af.attr("src",ai.src)}if(ai.caption){ad.find(ag.captionSelector).html(ai.caption)}return ad}function m(ad){return ad.each(function(af){var ae=N(this),ag=ae.data("jqt-photo-info"),ah=ag[C];if(ah&&ah.current.scale!=1&&ah.current.scale!=ah.original.scale){ae.css({webkitTransitionDuration:"0s",webkitTransform:K(ag.galleryOptions.imageTransform,ah.current.scale=ah.original.scale,ah.current.left=ah.original.left,ah.current.top=ah.original.top)});ah.current.width=ah.original.width;ah.current.height=ah.original.height}return null})}function E(ad,ae){N(ae).addClass("hover");ad.one("touchend",function(){N(ae).removeClass("hover")});return null}function K(ae){var ad=arguments;return ae.replace(/\{(\d+)\}/g,function(ag,af){return ad[Number(af)+1]+""})}function aa(){C=M(V.orientation)==90?"landscape":"portrait";N("#jqt").removeClass("portrait landscape").addClass(C);setTimeout(function(){var ae=[],ad=function(){var ai=N(this),ag=ai.data("jqt-photo-options"),ah=ai.find(ag.slideSelector),af=ah.find(ag.imageSelector);D(ai,ah,ag);if(ai.hasClass(ag.playingClass)){ae.push(this);ai.triggerHandler("jqt-photo-pause")}m(af.filter("[src]"))};N(x).filter(":visible").each(ad).end().filter(":not(:visible)").each(ad);N(ae).triggerHandler("jqt-photo-play")},10);f={x:V.innerWidth/2,y:V.innerHeight/2};return null}function D(af,ae,ad){table=af.find(ad.tableSelector),position=-ae.filter("."+ad.currentClass).attr("offsetLeft");table.data("jqt-photo-position").x=position;table.css({webkitTransitionDuration:"0s",webkitTransform:K(ad.transform,position)});return null}function B(){var ak=V.innerWidth,ad=V.innerHeight,aj=N(this),am=aj.width(),ai=aj.height(),al,af,ag=ab(ab(am,ak)/am,ab(ai,ad)/ai),ae=am*ag,an=ai*ag,ah=aj.data("jqt-photo-info"),ao=ah.galleryOptions;aj.parent().removeClass(ao.notLoadedClass);if(!aj.is(":visible")){ah.gallery.one("pageAnimationEnd",function(){G(ah.gallery,aj,ah.galleryOptions)})}else{if(ae>ak||an>ad){af=-l(((ae-ak)/ag)/2);al=-l(((an-ad)/ag)/2);aj.css({webkitTransitionDuration:"0s",webkitTransform:K(ao.imageTransform,ag,af,al)}).addClass(ao.presizedClass);ah=ah[C];ah.current.scale=ah.original.scale=ag;ah.current.left=ah.original.left=af;ah.current.top=ah.original.top=al;ah.current.width=ah.original.width=ae*ag;ah.current.height=ah.original.height=an*ag}}return null}N(function(){V.scrollTo(0,0);f={x:V.innerWidth/2,y:V.innerHeight/2};if(P.useDynamicStyleSheet){var ad="",ag=w,af=V.innerHeight>V.innerWidth?"portrait":"landscape",ah=function(ai,aj){ad+=ai+":"+(N.isFunction(aj)?aj(ag.variables):aj)+";"},ae=function(ai,aj){ad+=ai+"{";N.each(aj,ah);ad+="}"};N.each(ag.defaults,ae);N.each(ag[af],ae);N(k.createElement("style")).attr({type:"text/css",media:"screen"}).html(ad).appendTo("head");N(V).one("orientationchange",function(){V.scrollTo(0,0);C=M(V.orientation)==90?"landscape":"portrait";N("#jqt").removeClass("portrait landscape").addClass(C);ad="";N.each(ag[C],ae);N(k.createElement("style")).attr({type:"text/css",media:"screen"}).html(ad).appendTo("head")})}N(V).bind("orientationchange",aa)})})(jQuery);
Index: extensions/iPiwigo/www/extensions/jqt.scaling.js
===================================================================
--- extensions/iPiwigo/www/extensions/jqt.scaling.js	(revision 9188)
+++ extensions/iPiwigo/www/extensions/jqt.scaling.js	(revision 9188)
@@ -0,0 +1,189 @@
+/*!*
+ * 
+ * Add support for scaling using jQTouch
+ *
+ * Copyright (c) 2009 Sam Shull <http://www.google.com/profiles/brickysam26>
+ * Released under MIT license
+ *
+ * <code>
+ *
+ *        <div>
+ *            <img src="http://rlv.zcache.com/css_is_awesome_mug-p1687164350719819282objs_210.jpg" alt="CSS Is Awesome" class="scalable"/>
+ *        </div>
+ *
+ * </code>
+ *
+ * Known issues:
+ *        - using a link that is a slideSelector (ie: body > * > ul li a) on the same psuedo-page causes problems during scaling
+ *
+ *
+ * 
+ */
+
+(function($)
+{
+            
+    $.fn.scalable = function (options)
+    {
+        return this.each(function ()
+        {
+            new iScale( this, options );
+        });
+    };
+
+    if ($.jQTouch)
+    {
+        $.jQTouch.addExtension(function (jQT){
+            
+            function binder (e, info)
+            {
+                info.page.find('.scalable').scalable();
+            }
+            
+            $(document.body)
+                .bind('pageInserted', binder);
+                
+            $(function()
+            {
+                $('body > *')
+                    .each(function()
+                    {
+                        binder({}, {page: $(this)});
+                    });
+            });
+            
+            return {};
+        });
+        
+        
+        function iScale (el, options)
+        {
+            var that = this;
+            
+            this.numberOfTouches = 2;
+            
+            this.element = el;
+            this.scale(1);
+            this.refresh();
+            
+            this.scaleLessThanOne = false;
+            
+            el.style.webkitTransitionTimingFunction = 'cubic-bezier(0, 0, 0.2, 1)';
+        
+            el.addEventListener('touchstart', this, false);
+            //moved up here because I didnt see any reason to add and remove them 
+            el.addEventListener('touchmove', this, false);
+            el.addEventListener('touchend', this, false);
+            
+            window.addEventListener('unload', function ()
+            {
+                el.removeEventListener('touchstart', that, false);
+                el.removeEventListener('touchmove', that, false);
+                el.removeEventListener('touchend', that, false);
+                
+                this.removeEventListener('unload', arguments.callee, false);
+            }, false);
+            
+            if (options)
+            {
+                $.extend(this, options);    
+            }
+        }
+        
+        iScale.prototype = {
+            handleEvent: function(e) {
+                switch(e.type) {
+                    case 'touchstart': return this.onTouchStart(e); break;
+                    case 'touchmove': return this.onTouchMove(e); break;
+                    case 'touchend': return this.onTouchEnd(e); break;
+                }
+            },
+            
+            scale: function (scale) {
+                if (scale !== undefined)
+                {
+                    this._scale = scale;
+                    this.element.style.webkitTransform = 'scale('+scale+')';
+                    return;
+                }
+                
+                return this._scale;
+            },
+            
+            refresh: function() {
+                this.element.style.webkitTransitionDuration = '0';
+            },
+            
+            onTouchStart: function(e) {
+                if ( e.targetTouches.length != this.numberOfTouches )
+                {
+                    return;    
+                }
+                
+                this.refresh();
+                
+                this.moved = false;
+                
+                this.startDistance = Math.sqrt(
+                                                   Math.pow((e.targetTouches[1].clientX - e.targetTouches[0].clientX), 2)
+                                                + Math.pow((e.targetTouches[1].clientX - e.targetTouches[0].clientX), 2)
+                                            );
+                
+                return false;
+            },
+            
+            onTouchMove: function(e) {
+                if( e.targetTouches.length != this.numberOfTouches )
+                    return;
+                
+                e.preventDefault();
+                
+                this.moved = true;
+                
+                this.refresh();
+                
+                var newDistance = Math.sqrt(
+                                                   Math.pow((e.targetTouches[1].clientX - e.targetTouches[0].clientX), 2)
+                                                + Math.pow((e.targetTouches[1].clientY - e.targetTouches[0].clientY), 2)
+                                            ),
+                    difference = newDistance - this.startDistance,
+                    percentChange = (difference / this.startDistance) / 2;
+                
+                this.scale(this.scale() + (this.scale() * percentChange));
+                
+                this.startDistance = newDistance;
+                
+                return false;
+            },
+            
+            onTouchEnd: function(e) {
+                var theTarget,theEvent;
+                
+                if( !this.moved ) {
+                    theTarget  = e.target;
+                    if(theTarget.nodeType == 3) theTarget = theTarget.parentNode;
+                    theEvent = document.createEvent("MouseEvents");
+                    theEvent.initEvent('click', true, true);
+                    theTarget.dispatchEvent(theEvent);
+                    return;
+                }
+                
+                e.preventDefault();
+                e.stopPropagation();
+                
+                if (!this.scaleLessThanOne && this.scale() < 1)
+                {
+                    this.element.style.webkitTransitionDuration = '200ms';
+                    this.scale(1);
+                }
+                
+                return false;
+            },
+            
+            scaleTo: function(dest, runtime) {
+                this.element.style.webkitTransitionDuration = runtime ? runtime : '300ms';
+                this.scale(dest ? dest : 0);
+            }
+        };
+    }
+})(jQuery);
Index: extensions/iPiwigo/www/extensions/jqt.scaling.min.js
===================================================================
--- extensions/iPiwigo/www/extensions/jqt.scaling.min.js	(revision 9188)
+++ extensions/iPiwigo/www/extensions/jqt.scaling.min.js	(revision 9188)
@@ -0,0 +1,22 @@
+/**
+ * 
+ * Add support for scaling using jQTouch
+ *
+ * Copyright (c) 2009 Sam Shull <http://www.google.com/profiles/brickysam26>
+ * Released under MIT license
+ *
+ * <code>
+ *
+ *        <div>
+ *            <img src="http://rlv.zcache.com/css_is_awesome_mug-p1687164350719819282objs_210.jpg" alt="CSS Is Awesome" class="scalable"/>
+ *        </div>
+ *
+ * </code>
+ *
+ * Known issues:
+ *        - using a link that is a slideSelector (ie: body > * > ul li a) on the same psuedo-page causes problems during scaling
+ *
+ *
+ * 
+ */
+(function(b){b.fn.scalable=function(c){return this.each(function(){new a(this,c)})};if(b.jQTouch){b.jQTouch.addExtension(function(d){function c(g,f){f.page.find(".scalable").scalable()}b(document.body).bind("pageInserted",c);b(function(){b("body > *").each(function(){c({},{page:b(this)})})});return{}});function a(d,c){var e=this;this.numberOfTouches=2;this.element=d;this.scale(1);this.refresh();this.scaleLessThanOne=false;d.style.webkitTransitionTimingFunction="cubic-bezier(0, 0, 0.2, 1)";d.addEventListener("touchstart",this,false);d.addEventListener("touchmove",this,false);d.addEventListener("touchend",this,false);window.addEventListener("unload",function(){d.removeEventListener("touchstart",e,false);d.removeEventListener("touchmove",e,false);d.removeEventListener("touchend",e,false);this.removeEventListener("unload",arguments.callee,false)},false);if(c){b.extend(this,c)}}a.prototype={handleEvent:function(c){switch(c.type){case"touchstart":return this.onTouchStart(c);break;case"touchmove":return this.onTouchMove(c);break;case"touchend":return this.onTouchEnd(c);break}},scale:function(c){if(c!==undefined){this._scale=c;this.element.style.webkitTransform="scale("+c+")";return}return this._scale},refresh:function(){this.element.style.webkitTransitionDuration="0"},onTouchStart:function(c){if(c.targetTouches.length!=this.numberOfTouches){return}this.refresh();this.moved=false;this.startDistance=Math.sqrt(Math.pow((c.targetTouches[1].clientX-c.targetTouches[0].clientX),2)+Math.pow((c.targetTouches[1].clientX-c.targetTouches[0].clientX),2));return false},onTouchMove:function(f){if(f.targetTouches.length!=this.numberOfTouches){return}f.preventDefault();this.moved=true;this.refresh();var c=Math.sqrt(Math.pow((f.targetTouches[1].clientX-f.targetTouches[0].clientX),2)+Math.pow((f.targetTouches[1].clientY-f.targetTouches[0].clientY),2)),g=c-this.startDistance,d=(g/this.startDistance)/2;this.scale(this.scale()+(this.scale()*d));this.startDistance=c;return false},onTouchEnd:function(d){var c,f;if(!this.moved){c=d.target;if(c.nodeType==3){c=c.parentNode}f=document.createEvent("MouseEvents");f.initEvent("click",true,true);c.dispatchEvent(f);return}d.preventDefault();d.stopPropagation();if(!this.scaleLessThanOne&&this.scale()<1){this.element.style.webkitTransitionDuration="200ms";this.scale(1)}return false},scaleTo:function(c,d){this.element.style.webkitTransitionDuration=d?d:"300ms";this.scale(c?c:0)}}}})(jQuery);
Index: extensions/iPiwigo/www/extensions/jqt.scroll.js
===================================================================
--- extensions/iPiwigo/www/extensions/jqt.scroll.js	(revision 9188)
+++ extensions/iPiwigo/www/extensions/jqt.scroll.js	(revision 9188)
@@ -0,0 +1,1284 @@
+/*!*
+ * 
+ * Add support for scrolling vertically and horizontally using jQTouch in Webkit Mobile
+ * Plus support for slides
+ *
+ * Copyright (c) 2010 Sam Shull <http://samshull.blogspot.com/>
+ * Released under MIT license
+ * 
+ * Based on the work of Matteo Spinelli, http://cubiq.org/
+ * Released under MIT license
+ * http://cubiq.org/dropbox/mit-license.txt
+ *
+ * Find more about the scrolling function at
+ * http://cubiq.org/scrolling-div-for-mobile-webkit-turns-3/16
+ *
+ * 
+ */
+    
+(function($, window, document, Number, Math, undefined) {
+    //we need this in the algorithm
+    if (!"WebKitCSSMatrix" in this) {
+        return null;
+    }
+    
+    	/**
+         *    Determine 3d translate support
+         *
+         *    @var Boolean
+         */
+    var supports3d = ('m11' in new WebKitCSSMatrix()),
+        
+        /**
+         *    Single Object for base options 
+         *    that is used to extend the defaults
+         *
+         *    @var Object
+         */
+        base = {
+            
+            /**
+             *    A function for converting attributes into options @see attributes
+             *
+             *    @var Function
+             */
+            attributesToOptions: attributesToOptions,
+            
+            /**
+             *    A dictionary of property/accessor pairs
+             *    where the name of the property coincides with the name
+             *    of an option, and the value is either a string representing the 
+             *    name of the attribute where the value will be stored, or
+             *    a function that accepts two arguments, the first of the type DOMElement 
+             *    and the second is a string indicating the desired direction which then
+             *    returns the desired value of the property on that object
+             *
+             *    @var Object
+             */
+            attributes: {
+                //use an attribute to set the defaultDuration option
+                defaultDuration: "slidespeed",
+                //use an attribute to determine whether or not you want the default touch event cancelled
+                preventDefault: function(e,d){return $(e).attr("preventdefault") === "false" ? false : !!defaults[d].preventDefault;},
+                //use bounce?
+                bounce: function(e,d){return e.attr("bounce") === "false" ? false : defaults[d].bounce},
+                //use a scrollbar?
+                scrollBar: function(e,d){return e.hasClass("with-scrollbar")},
+                //use slides?
+                useSlides: function(e,d){return $(e).find(defaults[d].slides.selector).length > 0;}
+            },
+            
+            /**
+             *    Selectors to ignore on touch start
+             *
+             *    @var String
+             */
+            ignore: "SELECT,TEXTAREA,BUTTON,INPUT",
+            
+            /**
+             *    Should the container slide to the next container?
+             *
+             *    @var Boolean
+             */
+            useSlides: false,
+            
+            /**
+             *    Properties for handling slides
+             *
+             *    @var Object
+             */
+            slides: {
+            
+                /**
+                 *    jQuery selector for the slide containers
+                 *
+                 *    @var String
+                 */
+                selector: ".slide-container",
+            
+                /**
+                 *    Identify the current slide container
+                 *
+                 *    @var String
+                 */
+                currentClass: "jqt-slide-current",
+            
+                /**
+                 *    Portion of the slide that must be moved 
+                 *    before triggerring move to next slide
+                 *
+                 *    @var Number
+                 */
+                portion: 3,
+            
+                /**
+                 *    Amount of easing to use on slide
+                 *
+                 *    @var Number
+                 */
+                easing: 2,
+            
+                /**
+                 *    The function to determine position of next slide
+                 *
+                 *    @var Function
+                 */
+                callback: slideTo
+            },
+            
+            /**
+             *    The number of fingers required to activate the slide motion
+             *
+             *    @var Number
+             */
+            numberOfTouches: 1,
+            
+            /**
+             *    Amount of the parent container to use for a bounce
+             *
+             *    @var Number
+             */
+            divider: 6,
+            
+            /**
+             *    List of touch enevts to listen to. (Hopefully add support for non-touch one day)
+             *
+             *    @var Array<String>
+             */
+            touchEventList: ["touchend","touchmove","touchcancel"],
+            
+            /**
+             *    The return speed of a bounce
+             *
+             *    @var Number
+             */
+            bounceSpeed: 300,
+            
+            /**
+             *    The duration of a slide
+             *
+             *    @var Number
+             */
+            defaultDuration: 500,
+            
+            /**
+             *    Initial container offset in px
+             *
+             *    @var Number
+             */
+            defaultOffset: 0,
+            
+            /**
+             *    should the default be prevented on the events?
+             *
+             *    @var Boolean
+             */
+            preventDefault: true,
+            
+            /**
+             *    Limit the acceleration velocity
+             *
+             *    @var Number
+             */
+            maxScrollTime: 1000,
+            
+            /**
+             *    Friction to apply to the acceleration
+             *
+             *    @var Number
+             */
+            friction: 3,
+            
+            /**
+             *    Should the window.scrollTo(0,0) be called each time a touch event starts?
+             *
+             *    @var Boolean
+             */
+            scrollTopOnTouchstart: true,
+            
+            /**
+             *    Use bounce?
+             *
+             *    @var Boolean
+             */
+            bounce: true,
+            
+            /**
+             *    Show a scrollbar?
+             *
+             *    @var Boolean
+             */
+            scrollBar: true,
+            
+            /**
+             *    Object reference to Scrollbar object
+             *
+             *    @var ScrollBar
+             */
+            scrollBarObject: null,
+            
+            /**
+             *    Event handlers
+             *
+             *    @var Object
+             */
+            events: {
+                //
+                scrollTo: scrollTo,
+                //
+                reset: reset,
+                //
+                touchstart: touchStart,
+                //
+                touchmove: touchMove,
+                //
+                touchend: touchEnd,
+                //
+                touchcancel: touchEnd,
+                //
+                webkitTransitionEnd: transitionEnd
+            },
+            
+            /**
+             *    Function for actually performing a change to the position of
+             *    the slide container
+             *
+             *    @var Function
+             */
+            setPosition: setPosition,
+            
+            /**
+             *    Calculate the momentum of a touch event
+             *
+             *    @var Function
+             */
+            momentum: momentum
+        },
+        
+        /**
+         *
+         *
+         *    @var Object
+         */
+        defaults = {
+            /**
+             *    Vertical default settings
+             *
+             *    @var Object
+             */
+            vertical: $.extend({}, base, {
+            
+                /**
+                 *    direction of the scroll, for internal use,
+                 *    don't change this
+                 *
+                 *    @var String
+                 */
+                direction: "vertical",
+            
+                /**
+                 *    The jQuery.fn function name to find
+                 *    the inner dimension of an element
+                 *
+                 *    @var String
+                 */
+                dimension: "height",
+            
+                /**
+                 *    The jQuery.fn function name to find
+                 *    the outer dimension of an element
+                 *
+                 *    @var String
+                 */
+                outerDimension: "outerHeight",
+            
+                /**
+                 *    The property of a WebKitCSSMatrix Object initialized
+                 *    with the transform property of the given element
+                 *    that should be used to determine position
+                 *
+                 *    @var String
+                 */
+                matrixProperty: "m42",
+            
+                /**
+                 *    CSS/jQuery Selector for jQTouch
+                 *
+                 *    @var String
+                 */
+                selector: ".vertical-scroll > div",
+            
+                /**
+                 *    The property on the touch property of the event 
+                 *    object for calculating movement
+                 *
+                 *    @var String
+                 */
+                eventProperty: "pageY",
+                
+                /**
+                 *    The base transform declaration
+                 *
+                 *    @var String
+                 */
+                tranform: supports3d ? "translate3d(0,{0}px,0)" : "translate(0,{0}px)",
+                
+                /**
+                 *    
+                 *
+                 *    @var String
+                 */
+                slideProperty: "offsetTop"
+            }),
+            
+            /**
+             *    Horizontal default settings
+             *
+             *    @var Object
+             */
+            horizontal: $.extend({}, base, {
+            
+                /**
+                 *    direction of the scroll, for internal use,
+                 *    don't change this
+                 *
+                 *    @var String
+                 */
+                direction: "horizontal",
+            
+                /**
+                 *    The jQuery.fn function name to find
+                 *    the inner dimension of an element
+                 *
+                 *    @var String
+                 */
+                dimension: "width",
+            
+                /**
+                 *    The jQuery.fn function name to find
+                 *    the outer dimension of an element
+                 *
+                 *    @var String
+                 */
+                outerDimension: "outerWidth",
+            
+                /**
+                 *    The property of a WebKitCSSMatrix Object initialized
+                 *    with the transform property of the given element
+                 *    that should be used to determine position
+                 *
+                 *    @var String
+                 */
+                matrixProperty: "m41",
+            
+                /**
+                 *    CSS/jQuery Selector for jQTouch
+                 *
+                 *    @var String
+                 */
+                selector: ".horizontal-scroll > table",
+            
+                /**
+                 *    The property on the touch property of the event 
+                 *    object for calculating movement
+                 *
+                 *    @var String
+                 */
+                eventProperty: "pageX",
+                
+                /**
+                 *    The base transform declaration
+                 *
+                 *    @var String
+                 */
+                tranform: supports3d ? "translate3d({0}px,0,0)" : "translate({0}px,0)",
+                
+                /**
+                 *    slideHandler
+                 *
+                 *    @var String
+                 */
+                slideProperty: "offsetLeft"
+            })
+        },
+            
+        /**
+         *    Dynamically determine the window height minus twice the toolbar height 
+         *    for the CSS rule(s) that require specified heights
+         *
+         *    @var Function
+         */
+        bottomToolbar = function(vars){return (window.innerHeight - (vars.toolbarHeight * 2)) + "px !important"},
+            
+        /**
+         *    Dynamically determine the window height minus the toolbar height 
+         *    for the CSS rule(s) that require specified heights
+         *
+         *    @var Function
+         */
+        height = function(vars){return (window.innerHeight - vars.toolbarHeight) + "px"},
+            
+        /**
+         *    Dynamically determine the window width for the CSS rule(s) that require specified widths
+         *
+         *    @var Function
+         */
+        width = function (){return window.innerWidth + "px";},
+            
+        /**
+         *
+         *
+         *    @var Object
+         */
+        cssRules = {
+            /**
+             *
+             *
+             *    @var Object
+             */
+            variables : {
+                toolbarHeight: 46
+            },
+            
+            /**
+             *    Base CSS rules, calculated on page load regardless of orientation
+             *
+             *    @var Object
+             */
+            defaults: {
+                //the parent container
+                ".vertical-scroll": {
+                    position: "relative",
+                    "z-index": 1,
+                    overflow: "hidden",
+                    "margin-bottom": "44px",
+                    height: height
+                },
+                //the parent container with a toolbar
+                ".vertical-scroll.use-bottom-toolbar": {
+                    height: bottomToolbar
+                },
+                //the actual container being scrolled
+                ".vertical-scroll > div": {
+                    margin: "0 auto",
+                    "padding-bottom":"15px",
+                    "-webkit-transition-property": "-webkit-transform",
+                    "-webkit-transition-timing-function": "cubic-bezier(0,0,.25,1)",
+                    //overridden on element
+                    "-webkit-transform": "translate3d(0,0,0)",
+                    "-webkit-transition-duration": "0s",
+                },
+                //fullscreen rule
+                ".vertical-scroll.use-bottom-toolbar": {
+                    "margin-bottom": "0px"
+                },
+                //fullscreen rule
+                ".vertical-scroll.use-bottom-toolbar > div": {
+                    "padding-bottom":"0px"
+                },
+                //scrollbar rule
+                ".scrollbar": {
+                    "-webkit-transition-timing-function": "cubic-bezier(0,0,.25,1)",
+                    "-webkit-transform": "translate3d(0,0,0)",
+                    "-webkit-transition-property": "-webkit-transform,opacity",
+                    "-webkit-transition-duration": "0,0,0,1s",
+                    "-webkit-border-radius": "2px",
+                    "pointer-events": "none",
+                    opacity: 0,
+                    background:"rgba(0,0,0,.5)",
+                    //"-webkit-border-image": "-webkit-gradient(radial, 50% 50%, 2, 50% 50%, 4, from(rgba(0,0,0,.5)), to(rgba(0,0,0,.5))) 2",
+                    //"-webkit-box-shadow": "0 0 3px rgba(255,255,255,.5)",
+                    "-webkit-box-shadow": "0 0 2px rgba(255,255,255,.5)",
+                    position: "absolute",
+                    "z-index": 10,
+                    width: "5px",
+                    height: "5px"
+                },
+                //scrollbar rule
+                ".scrollbar.vertical": {
+                    top: "1px",
+                    right: "1px"
+                },
+                //scrollbar horizontal
+                ".scrollbar.horizontal": {
+                    bottom: "1px",
+                    left: "1px"
+                },
+                //parent container
+                ".horizontal-scroll": {
+                    width: width,
+                    height: "100%",
+                    overflow: "hidden",
+                    padding: "0px",
+                    position: "relative",
+                    //not actually required
+                    height: height,
+                    "line-height":height
+                },
+                //actual element being scrolled
+                ".horizontal-scroll > table": {
+                    height: "100%",
+                    "-webkit-transition-property": "-webkit-transform",
+                    "-webkit-transition-timing-function": "cubic-bezier(0,0,.25,1)",
+                    //overridden on element
+                    "-webkit-transform": "translate3d(0,0,0)",
+                    "-webkit-transition-duration": "0s",
+                }
+            },
+            
+            /**
+             *    Only calculated if in portrait mode
+             *
+             *    @var Object
+             */
+            portrait: {
+                ".portrait .vertical-scroll": {
+                    position: "relative",
+                    "z-index": 1,
+                    overflow: "hidden",
+                    height: height,        
+                },
+                ".portrait .vertical-scroll.use-bottom-toolbar,.portrait .horizontal-scroll.use-bottom-toolbar": {
+                    height: bottomToolbar
+                },
+                ".portrait .horizontal-scroll": {
+                    width: width
+                },
+                ".portrait .slide-container": {
+                    height: height,
+                    width: width
+                }
+            },
+            
+            /**
+             *    Only calculated if in landscape mode
+             *
+             *    @var Object
+             */
+            landscape: {
+                ".landscape .vertical-scroll": {
+                    position: "relative",
+                    "z-index": 1,
+                    overflow: "hidden",
+                    height: height,
+                },
+                ".landscape .vertical-scroll.use-bottom-toolbar,.landscape .horizontal-scroll.use-bottom-toolbar": {
+                    height: bottomToolbar
+                },
+                ".landscape .horizontal-scroll": {
+                    width: width
+                },
+                ".landscape .slide-container": {
+                    height: height,
+                    width: width
+                }
+            }
+        };
+    
+    /*
+     *    jQTouch extension
+     *    
+     */
+    if ($.jQTouch) {
+        
+        $.jQTouch.addExtension(function (jQT) {
+            var d = defaults;
+            
+            function binder (e, info) {
+                var v = d.vertical, h = d.horizontal,
+                    vertical = info.page.find(v.selector),
+                    horizontal = info.page.find(h.selector);
+                
+                vertical.verticallyScroll(v.attributesToOptions(vertical, "vertical", v.attributes));
+                horizontal.horizontallyScroll(h.attributesToOptions(horizontal, "horizontal", h.attributes));
+            }
+            
+            $(document.body).bind("pageInserted", binder);
+            
+            $(function() {
+                var v = d.vertical, 
+                    h = d.horizontal;
+                    
+                $(v.selector)
+                    .each(function() {
+                        $(this).verticallyScroll(v.attributesToOptions($(this), "vertical", v.attributes));
+                    });
+                    
+                $(h.selector)
+                    .each(function() {
+                        $(this).horizontallyScroll(h.attributesToOptions($(this), "horizontal", h.attributes));
+                    });
+            });
+            
+            return {};
+        });
+    }
+    
+    //$(window).bind("unload", window_unload);
+    
+    /**
+     *    Handler for creating options out of attributes on the scroll container
+     *
+     *    @param DOMElement element
+     *    @param String direction - "vertical" or "horizontal"
+     *    @param Object attributes - @see base.attributes
+     *    @return Object
+     */
+    function attributesToOptions (element, direction, attributes) {
+        var options = {};
+        
+        $.each(attributes, function(name, value) {
+            if ($.isFunction(value)) {
+                options[name] = value(element, direction);
+                
+            } else if (element.attr(value) != undefined) {
+                options[name] = element.attr(value);
+            }
+        });
+        
+        return options;
+    }
+    
+    /*
+     *    jQuery extensions
+     *
+     */
+    
+    /**
+     *    Attach vertical inertia scrolling to one or more objects
+     *
+     *    @param Object options - optional
+     *    @return jQuery
+     */
+    $.fn.verticallyScroll = function (options) {
+        return this.inertiaScroll("vertical", options);
+    };
+    
+    /**
+     *    Attach horizontal inertia scrolling to one or more objects
+     *
+     *    @param Object options - optional
+     *    @return jQuery
+     */
+    $.fn.horizontallyScroll = function (options) {
+        return this.inertiaScroll("horizontal", options);
+    };
+    
+    /**
+     *    Attach inertia scrolling to one or more objects
+     *
+     *    @param Object options - optional
+     *    @return jQuery
+     */
+    $.fn.inertiaScroll = function (direction, options) {
+        options = $.extend(true, {}, defaults[direction], options || {});
+        
+        return this.each(function () {
+            inertiaScroll(this, options);
+        });
+    };
+    
+    /**
+     *    Static jQUery property
+     *
+     *
+     *    @var Object
+     */
+    $.inertiaScroll = {
+    
+        /**
+         *    Set and/or retrieve the inertia scroll defaults
+         *
+         *    @param Object options - @see defaults - optional
+         *    @return Object
+         */
+        defaults: function (options) {
+            if (options !== undefined) {
+                defaults = $.extend(true, defaults, options);
+            }
+            
+            return $.extend({}, defaults);
+        },
+        
+        /**
+         *    Set and/or retrieve the inertia scroll default CSS
+         *
+         *    @param Object options - @see cssRules - optional
+         *    @return Object
+         */
+        defaultCSS: function (options) {
+            if (options !== undefined) {
+                cssRules = $.extend(true, cssRules, options);
+            }
+            
+            return $.extend({}, cssRules);
+        }
+    };
+
+    /**
+     *    Initialize the component, bind event listeners, updates CSS, etc...
+     *
+     *    @param DOMElement element
+     *    @param Object options - @see defaults
+     *    @return null
+     */
+    function inertiaScroll (element, options) {
+        var $element = $(element).data("jqt-scroll-options", options)
+                            .css("webkitTransform", format(options.tranform, options.defaultOffset)),
+            transform = $element.css("webkitTransform"),
+            matrix = transform ? new WebKitCSSMatrix(transform) : {m41:0};
+        
+        $.each(options.events, function (name, func) {
+            //these events get attatch
+            //if (!name.match(/^touchend|touchcancel|touchmove/)) {
+                element.addEventListener(name, func, false);
+            //}
+        });
+        
+        //additional bindings for jquery
+        $element.bind("reset", options.events.reset)
+                .bind("scrollTo", options.events.scrollTo);
+        
+        //store for later use
+        options.currentPosition = matrix[options.matrixProperty];
+        options.parentWidth = $element.parent()[options.dimension]();
+        
+        if (options.scrollBar && options.scrollBar === true && !options.scrollBarObject) {
+            options.scrollBarObject = $.isFunction(options.scrollBar) ? 
+                options.scrollBar($element.parent(), options.direction) :
+                Scrollbar($element.parent(), options.direction);
+        }
+        
+        return null;
+    }
+
+    /**
+     *    The default touchstart event handler function,
+     *    initializes the data for later use by the touchmove/end event handlers
+     *
+     *    @context scroll container
+     *    @param Event event
+     *    @return Boolean
+     */
+    function touchStart (event) {
+        var $this = $(this),
+            options = $this.data("jqt-scroll-options"),
+            location = event.touches[0][options.eventProperty],
+            matrix, mp,
+            dimension = $this[options.outerDimension](),
+            parent = $this.parent()[options.dimension](),
+            //maxScroll
+            endPoint = -(dimension - parent),
+            //a distance to stop inertia from hitting
+            quarter = parent / options.divider;
+            
+        //ignore some stuff
+        if (!!options.ignore && $(event.target).is(options.ignore) || event.targetTouches.length !== options.numberOfTouches) { 
+            return null;
+        }
+        
+        options.parentDimension = parent;
+        
+        //sometimes this would be a bad idea
+        if (options.scrollTopOnTouchstart) {
+            window.scrollTo(0,0);
+        }
+        
+        //figure out the base position
+        matrix = new WebKitCSSMatrix($this.css("webkitTransform"));
+        mp = matrix[options.matrixProperty];
+        
+        //store data for later
+        $this.data("jqt-scroll-current-event", {
+            startLocation: location,
+            currentLocation: location,
+            startPosition: mp,
+            lastPosition: mp,
+            currentPosition: mp,
+            startTime: event.timeStamp,
+            moved: false,
+            lastMoveTime: event.timeStamp,
+            parentDimension: parent,
+            endPoint: endPoint,
+            minScroll: !options.bounce ? 0 : quarter,
+            maxScroll: !options.bounce ? endPoint : endPoint - quarter,
+            end: false
+        });
+        
+        if (options.scrollBarObject) {
+            options.scrollBarObject.init(parent, dimension);
+        }
+        
+        options.setPosition($this, options, mp, 0);
+        
+        if (options.preventDefault) {
+            event.preventDefault();
+            return false;
+            
+        } else {
+            return true;
+        }
+    }
+
+    /**
+     *    The default touchmove event handler, performs 
+     *    immediate changes to the position of the element
+     *
+     *    @context scroll container
+     *    @param Event event
+     *    @return Boolean
+     */
+    function touchMove (event) {
+        var $this = $(this),
+            options = $this.data("jqt-scroll-options"),
+            data = $this.data("jqt-scroll-current-event"),
+            lastMoveTime = data.lastMoveTime,
+            position = event.touches[0][options.eventProperty],
+            distance = data.startLocation - position,
+            point = data.startPosition - distance,
+            duration = 0;
+        
+        //apply friction if past scroll points
+        if (point > 5) {
+            point = (point - 5) / options.friction;
+            
+        } else if (point < data.endPoint) {
+            point = data.endPoint - ((data.endPoint - point) / options.friction);
+        }
+        
+        data.currentPosition = data.lastPosition = Math.floor(point);
+        data.moved = true;
+        data.lastMoveTime = event.timeStamp;
+        data.currentLocation = position;
+        
+        if ((data.lastMoveTime - lastMoveTime) > options.maxScrollTime) {
+            data.startTime = data.lastMoveTime;
+        }
+        
+        if (options.scrollBarObject && !options.scrollBarObject.visible) {
+            options.scrollBarObject.show();
+        }
+        
+        options.setPosition($this, options, data.currentPosition, duration);
+        
+        if (options.preventDefault) {
+            event.preventDefault();
+            return false;
+            
+        } else {
+            return true;
+        }
+    }
+
+    /**
+     *    The default touchend event handler, calculates
+     *    necessary changes as a result of an event
+     *
+     *    @context scroll container
+     *    @param Event event
+     *    @return Boolean
+     */
+    function touchEnd (event) {
+        var $this = $(this),
+            options = $this.data("jqt-scroll-options"),
+            data = $this.data("jqt-scroll-current-event"),
+            theTarget, theEvent;
+        
+        if (!data.moved) {
+            if (options.scrollBarObject) {
+                options.scrollBarObject.hide();
+            }
+            
+            theTarget  = event.target;
+            
+            if(theTarget.nodeType == 3) {
+                theTarget = theTarget.parentNode;
+            }
+            
+            theEvent = document.createEvent("MouseEvents");
+            theEvent.initEvent("click", true, true);
+            theTarget.dispatchEvent(theEvent);
+            
+            if (options.preventDefault) {
+                event.preventDefault();
+                return false;
+            }
+        }
+        
+        if (options.useSlides && $.isFunction(options.slides.callback)) {
+            options.slides.callback($this, options, data, event);
+            
+        } else {
+            options.momentum($this, options, data, event);
+        }
+        
+        options.setPosition($this, options, data.currentPosition, data.duration);
+        
+        if (options.preventDefault) {
+            event.preventDefault();
+            return false;
+            
+        } else {
+            return true;
+        }
+    }
+    
+    /**
+     *    The default transitionEnd event handler, ensures that
+     *    container has not scrolled past its possible dimensions
+     *    and returns to those dimensions where appropriate
+     *
+     *    @context scroll container
+     *    @param Event event
+     *    @return null
+     */
+    function transitionEnd (event) {
+        
+        var $this = $(this),
+            options = $this.data("jqt-scroll-options"),
+            data = $this.data("jqt-scroll-current-event");
+        
+        if (data && !data.end) {
+            if (data.currentPosition > 0) {
+                data.currentPosition = 0;
+                options.setPosition($this, options, 0, options.bounceSpeed);
+                
+            } else if (data.currentPosition < data.endPoint) {
+                data.currentPosition = data.endPoint;
+                options.setPosition($this, options, data.endPoint, options.bounceSpeed);
+                
+            } else if (options.scrollBarObject) {
+                options.scrollBarObject.hide();
+            }
+            data.end = true;
+        } else if (options.scrollBarObject) {
+            options.scrollBarObject.hide();
+        }
+        
+        return null;
+    }
+
+    /**
+     *    Calculate the momentum of a touch event
+     *
+     *    @param jQuery object
+     *    @param Object options
+     *    @param Object data
+     *    @param Event event
+     *    @return null
+     */
+    function momentum (object, options, data, event) {
+        var m = Math,
+            duration = m.min(options.maxScrollTime, data.lastMoveTime - data.startTime),
+            distance = data.startPosition - data.currentPosition,
+            velocity = m.abs(distance) / duration,
+            acceleration = duration * velocity * options.friction,
+            momentum = m.round(distance * velocity),
+            position = m.round(data.currentPosition - momentum);
+        
+        if (data.currentPosition > 0) {
+            position = 0;
+        } else if (data.currentPosition < data.endPoint) {
+            position = data.endPoint;
+        } else if (position > data.minScroll) {
+            acceleration = acceleration * m.abs(data.minScroll / position);
+            position = data.minScroll;
+        } else if (position < data.maxScroll) {
+            acceleration = acceleration * m.abs(data.maxScroll / position);
+            position = data.maxScroll;
+        }
+        
+        data.momentum = m.abs(momentum);
+        data.currentPosition = position;
+        data.duration = acceleration;
+        
+        return null;
+    }
+
+    /**
+     *    Calculate the position of the slide which should be showing after a touch event ends
+     *
+     *    @param jQuery container
+     *    @param Object options
+     *    @param Object data
+     *    @param Event event
+     *    @return null
+     */
+    function slideTo (container, options, data, event) {
+        var slides = container.find(options.slides.selector),
+            current = slides.filter("."+options.slides.currentClass).eq(0),
+            index,
+            distance = data.startPosition - data.currentPosition,
+            difference = current[options.dimension]() / options.slides.portion,
+            duration;
+        
+        if (!current.length) {
+            current = slides.eq(0);
+        }
+        
+        index = slides.index(current[0]);
+        slides.removeClass(options.slides.currentClass);
+        
+        if (data.currentPosition > 0) {
+            position = 0;
+            slides.eq(0).addClass(options.slides.currentClass);
+        } else if (data.currentPosition < data.endPoint) {
+            position = data.endPoint;
+            slides.eq(slides.length-1).addClass(options.slides.currentClass);
+        } else if (distance < -difference) {
+            position = -slides.eq(index > 0 ? index - 1 : 0)
+                            .addClass(options.slides.currentClass).parent().attr(options.slideProperty);
+        } else if (distance > difference) {
+            position = -slides.eq(index < slides.length-1 ? index + 1 : slides.length-1)
+                            .addClass(options.slides.currentClass).parent().attr(options.slideProperty);
+        } else {
+            position = -current.addClass(options.slides.currentClass).parent().attr(options.slideProperty);
+        }
+        
+        duration = Math.abs(data.currentPosition - position) * options.slides.easing;
+        
+        data.momentum = duration;
+        data.currentPosition = position;
+        data.duration = duration;
+        
+        return null;
+    }
+
+    /**
+     *    Return the scroll container to its default position
+     *
+     *    @context scroll container
+     *    @return mixed
+     */
+    function reset (event, offset, duration) {
+        var $this = $(this), data,
+            options = $this.data("jqt-scroll-options");
+		
+		offset = offset !== undefined ? offset : options.defaultOffset;
+			
+        if (options.useSlides && $.isFunction(options.slides.callback)) {
+			var matrix, mp,
+				dimension = $this[options.outerDimension](),
+				parent = $this.parent()[options.dimension](),
+				//maxScroll
+				endPoint = -(dimension - parent),
+				//a distance to stop inertia from hitting
+				quarter = parent / options.divider;
+			
+			options.parentDimension = parent;
+			
+			//figure out the base position
+			matrix = new WebKitCSSMatrix($this.css("webkitTransform"));
+			mp = matrix[options.matrixProperty];
+			
+			data = $this.data("jqt-scroll-current-event", {
+				startLocation: 0,
+				currentLocation: 0,
+				startPosition: mp,
+				lastPosition: mp,
+				currentPosition: offset,
+				startTime: event && event.timeStamp,
+				moved: true,
+				lastMoveTime: event && event.timeStamp,
+				parentDimension: parent,
+				endPoint: endPoint,
+				minScroll: !options.bounce ? 0 : quarter,
+				maxScroll: !options.bounce ? endPoint : endPoint - quarter,
+				end: true
+			}).data("jqt-scroll-current-event");
+		
+		
+            options.slides.callback($this, options, data, event);
+            
+        } else {
+			data = {
+				currentPosition: offset 
+			};
+		}
+		
+        return options.setPosition($this, options, data.currentPosition, duration || options.defaultDuration);
+    }
+
+    /**
+     *    Return the scroll container to its default position
+     *
+     *    @context scroll container
+     *
+     *    @param Event event
+     *    @param Number offset - position to move to
+     *    @param Number duration - duration of the scroll
+     *    @return mixed
+     */
+    function scrollTo (event, offset, duration) {
+        var $this = $(this),
+            options = $this.data("jqt-scroll-options");
+            
+        return options.setPosition($this, 
+                                   options, 
+                                   offset !== undefined ? offset : (event.detail || options.currentPosition), 
+                                   duration !== undefined ? duration : options.defaultDuration);
+    }
+
+    /**
+     *    Calculate the momentum of a touch event
+     *
+     *    @param jQuery object
+     *    @param Object options
+     *    @param Number position
+     *    @param Number duration
+     *    @param String timing - timing function
+     *    @return jQuery
+     */
+    function setPosition (object, options, position, duration, timing) {
+        
+        if (options.scrollBarObject) {
+            var dimension = (object.parent()[options.dimension]() - object[options.dimension]());
+            
+            if (position > 0) {
+                dimension += Number(position);
+            }
+            
+            options.scrollBarObject.scrollTo(options.scrollBarObject.maxScroll / dimension * position, 
+                                              format("{0}ms", duration !== undefined ? duration : options.defaultDuration));
+        }
+        
+        if (duration !== undefined) {
+            object.css("webkitTransitionDuration", format("{0}ms", duration));
+        }
+        
+        if (timing !== undefined) {
+            object.css("webkitTransitionTimingFunction", timing);
+        }
+        
+        options.currentPosition = position || 0;
+        
+        return object.css("webkitTransform", format(options.tranform, options.currentPosition));
+    }
+    
+    /**
+     *    Format a String followed by a set of arguments using the format
+     *    {0} is replaced with arguments[1]
+     *
+     *    @param String s
+     *    @param Object arg1 ... argN
+     *    @return String
+     */
+    function format (s) {
+        var args = arguments;
+        return s.replace(/\{(\d+)\}/g, function(a,b){return args[Number(b)+1] + ""});
+    }
+
+    /**
+     *    Entirely the work of Matteo Spinelli
+     *    I just took out the overflow restriction and
+     *    simplified the DOM creation with jQuery
+     *
+     *
+     */
+    function Scrollbar (object, direction) {
+        if (!(this instanceof Scrollbar)) {
+            return new Scrollbar(object, direction);
+        }
+        
+        this.direction = direction;
+        this.bar = $(document.createElement("div"))
+            .addClass("scrollbar " + direction)
+            .appendTo(object)[0];
+    }
+    
+    Scrollbar.prototype = {
+            direction: "vertical",
+            transform: supports3d ? "translate3d({0}px,{1}px,0)" : "translate({0}px,{1}px)",
+            size: 0,
+            maxSize: 0,
+            maxScroll: 0,
+            visible: false,
+            offset: 0,
+            
+            init: function (scroll, size) {
+                this.offset = this.direction == "horizontal" ? 
+                                this.bar.offsetWidth - this.bar.clientWidth : 
+                                this.bar.offsetHeight - this.bar.clientHeight;
+                                
+                this.maxSize = scroll - 8;        // 8 = distance from top + distance from bottom
+                this.size = Math.round(this.maxSize * this.maxSize / size) + this.offset;
+                this.maxScroll = this.maxSize - this.size;
+                this.bar.style[this.direction == "horizontal" ? "width" : "height"] = (this.size - this.offset) + "px";
+            },
+            
+            setPosition: function (pos) {
+                this.bar.style.webkitTransform = format(this.transform, 
+                                                        this.direction == "horizontal" ? 
+                                                        Math.round(pos) : 
+                                                        0, 
+                                                        this.direction == "horizontal" ? 
+                                                        0 : 
+                                                        Math.round(pos)
+                                                        );
+            },
+            
+            scrollTo: function (pos, runtime) {
+                this.bar.style.webkitTransitionDuration = (runtime || "400ms") + ",300ms";
+                this.setPosition(pos);
+            },
+            
+            show: function () {
+                this.visible = true;
+                this.bar.style.opacity = "1";
+            },
+        
+            hide: function () {
+                this.visible = false;
+                this.bar.style.opacity = "0";
+            },
+            
+            remove: function () {
+                this.bar.parentNode.removeChild(this.bar);
+                return null;
+            }
+    };
+    
+    //load stylesheet(s)
+    $(function() {
+        window.scrollTo(0,0);
+        var stringRules = "", 
+            rules = cssRules, 
+            o = window.innerHeight > window.innerWidth ? "portrait" : "landscape",
+            buildProperties = function (name, value) {
+                stringRules += name + ":" + ($.isFunction(value) ? value(rules.variables) : value) + ";";
+            },
+            buildRules = function (name, properties) {
+                stringRules += name + "{";
+                
+                $.each(properties, buildProperties);
+                
+                stringRules += "}";
+            };
+        
+        $.each(rules.defaults, buildRules);
+        $.each(rules[o], buildRules);
+        
+        
+        $(document.createElement("style"))
+            .attr({type:"text/css",media:"screen"})
+            .html(stringRules)
+            .appendTo("head");
+        
+        $(window).one("orientationchange", function () {
+            //ensure repaint
+            setTimeout(function () {
+                window.scrollTo(0,0);
+                stringRules = "";
+                o = window.innerHeight > window.innerWidth ? "portrait" : "landscape";
+                
+                $.each(rules[o], buildRules);
+                
+                $(document.createElement("style"))
+                    .attr({type:"text/css",media:"screen"})
+                    .html(stringRules)
+                    .appendTo("head");
+            },30)
+        });
+    });
+    
+})(this.jQuery, this, this.document, this.Number, this.Math);
Index: extensions/iPiwigo/www/extensions/jqt.scroll.min.js
===================================================================
--- extensions/iPiwigo/www/extensions/jqt.scroll.min.js	(revision 9188)
+++ extensions/iPiwigo/www/extensions/jqt.scroll.min.js	(revision 9188)
@@ -0,0 +1,18 @@
+/**
+ * 
+ * Add support for scrolling vertically and horizontally using jQTouch in Webkit Mobile
+ * Plus support for slides
+ *
+ * Copyright (c) 2010 Sam Shull <http://samshull.blogspot.com/>
+ * Released under MIT license
+ * 
+ * Based on the work of Matteo Spinelli, http://cubiq.org/
+ * Released under MIT license
+ * http://cubiq.org/dropbox/mit-license.txt
+ *
+ * Find more about the scrolling function at
+ * http://cubiq.org/scrolling-div-for-mobile-webkit-turns-3/16
+ *
+ * 
+ */
+(function(g){if(!"WebKitCSSMatrix" in this){return null}var i,l=this,u=l.document,z=l.Number,m=l.Math,t=("m11" in new WebKitCSSMatrix()),h={attributesToOptions:f,attributes:{defaultDuration:"slidespeed",preventDefault:function(A,B){return g(A).attr("preventdefault")==="false"?false:!!n[B].preventDefault},bounce:function(A,B){return A.attr("bounce")==="false"?false:n[B].bounce},scrollBar:function(A,B){return A.hasClass("with-scrollbar")},useSlides:function(A,B){return g(A).find(n[B].slides.selector).length>0}},ignore:"SELECT,TEXTAREA,BUTTON,INPUT",useSlides:false,slides:{selector:".slide-container",currentClass:"jqt-slide-current",portion:3,easing:2,callback:r},numberOfTouches:1,divider:6,touchEventList:["touchend","touchmove","touchcancel"],bounceSpeed:300,defaultDuration:500,defaultOffset:0,preventDefault:true,maxScrollTime:1000,friction:3,scrollTopOnTouchstart:true,bounce:true,scrollBar:true,scrollBarObject:null,events:{scrollTo:b,reset:y,touchstart:a,touchmove:x,touchend:e,touchcancel:e,webkitTransitionEnd:j},setPosition:d,momentum:p},n={vertical:g.extend({},h,{direction:"vertical",dimension:"height",outerDimension:"outerHeight",matrixProperty:"m42",selector:".vertical-scroll > div",eventProperty:"pageY",tranform:t?"translate3d(0,{0}px,0)":"translate(0,{0}px)",slideProperty:"offsetTop"}),horizontal:g.extend({},h,{direction:"horizontal",dimension:"width",outerDimension:"outerWidth",matrixProperty:"m41",selector:".horizontal-scroll > table",eventProperty:"pageX",tranform:t?"translate3d({0}px,0,0)":"translate({0}px,0)",slideProperty:"offsetLeft"})},o=function(A){return(l.innerHeight-(A.toolbarHeight*2))+"px !important"},s=function(A){return(l.innerHeight-A.toolbarHeight)+"px"},v=function(){return l.innerWidth+"px"},k={variables:{toolbarHeight:46},defaults:{".vertical-scroll":{position:"relative","z-index":1,overflow:"hidden","margin-bottom":"44px",height:s},".vertical-scroll.use-bottom-toolbar":{height:o},".vertical-scroll > div":{margin:"0 auto","padding-bottom":"15px","-webkit-transition-property":"-webkit-transform","-webkit-transition-timing-function":"cubic-bezier(0,0,.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-duration":"0s",},".vertical-scroll.use-bottom-toolbar":{"margin-bottom":"0px"},".vertical-scroll.use-bottom-toolbar > div":{"padding-bottom":"0px"},".scrollbar":{"-webkit-transition-timing-function":"cubic-bezier(0,0,.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-property":"-webkit-transform,opacity","-webkit-transition-duration":"0,0,0,1s","-webkit-border-radius":"2px","pointer-events":"none",opacity:0,background:"rgba(0,0,0,.5)","-webkit-box-shadow":"0 0 2px rgba(255,255,255,.5)",position:"absolute","z-index":10,width:"5px",height:"5px"},".scrollbar.vertical":{top:"1px",right:"1px"},".scrollbar.horizontal":{bottom:"1px",left:"1px"},".horizontal-scroll":{width:v,height:"100%",overflow:"hidden",padding:"0px",position:"relative",height:s,"line-height":s},".horizontal-scroll > table":{height:"100%","-webkit-transition-property":"-webkit-transform","-webkit-transition-timing-function":"cubic-bezier(0,0,.25,1)","-webkit-transform":"translate3d(0,0,0)","-webkit-transition-duration":"0s",}},portrait:{".portrait .vertical-scroll":{position:"relative","z-index":1,overflow:"hidden",height:s,},".portrait .vertical-scroll.use-bottom-toolbar,.portrait .horizontal-scroll.use-bottom-toolbar":{height:o},".portrait .horizontal-scroll":{width:v},".portrait .slide-container":{height:s,width:v}},landscape:{".landscape .vertical-scroll":{position:"relative","z-index":1,overflow:"hidden",height:s,},".landscape .vertical-scroll.use-bottom-toolbar,.landscape .horizontal-scroll.use-bottom-toolbar":{height:o},".landscape .horizontal-scroll":{width:v},".landscape .slide-container":{height:s,width:v}}};if(g.jQTouch){g.jQTouch.addExtension(function(B){var C=n;function A(I,H){var F=C.vertical,G=C.horizontal,E=H.page.find(F.selector),D=H.page.find(G.selector);E.verticallyScroll(F.attributesToOptions(E,"vertical",F.attributes));D.horizontallyScroll(G.attributesToOptions(D,"horizontal",G.attributes))}g(u.body).bind("pageInserted",A);g(function(){var D=C.vertical,E=C.horizontal;g(D.selector).each(function(){g(this).verticallyScroll(D.attributesToOptions(g(this),"vertical",D.attributes))});g(E.selector).each(function(){g(this).horizontallyScroll(E.attributesToOptions(g(this),"horizontal",E.attributes))})});return{}})}function f(C,D,A){var B={};g.each(A,function(E,F){if(g.isFunction(F)){B[E]=F(C,D)}else{if(C.attr(F)!=i){B[E]=C.attr(F)}}});return B}g.fn.verticallyScroll=function(A){return this.inertiaScroll("vertical",A)};g.fn.horizontallyScroll=function(A){return this.inertiaScroll("horizontal",A)};g.fn.inertiaScroll=function(B,A){A=g.extend(true,{},n[B],A||{});return this.each(function(){q(this,A)})};g.inertiaScroll={defaults:function(A){if(A!==i){n=g.extend(true,n,A)}return g.extend({},n)},defaultCSS:function(A){if(A!==i){k=g.extend(true,k,A)}return g.extend({},k)}};function q(E,D){var A=g(E).data("jqt-scroll-options",D).css("webkitTransform",w(D.tranform,D.defaultOffset)),C=A.css("webkitTransform"),B=C?new WebKitCSSMatrix(C):{m41:0};g.each(D.events,function(F,G){E.addEventListener(F,G,false)});A.bind("reset",D.events.reset).bind("scrollTo",D.events.scrollTo);D.currentPosition=B[D.matrixProperty];D.parentWidth=A.parent()[D.dimension]();if(D.scrollBar&&D.scrollBar===true&&!D.scrollBarObject){D.scrollBarObject=g.isFunction(D.scrollBar)?D.scrollBar(A.parent(),D.direction):c(A.parent(),D.direction)}return null}function a(A){var E=g(this),J=E.data("jqt-scroll-options"),I=A.touches[0][J.eventProperty],G,C,D=E[J.outerDimension](),H=E.parent()[J.dimension](),F=-(D-H),B=H/J.divider;if(!!J.ignore&&g(A.target).is(J.ignore)||A.targetTouches.length!==J.numberOfTouches){return null}J.parentDimension=H;if(J.scrollTopOnTouchstart){l.scrollTo(0,0)}G=new WebKitCSSMatrix(E.css("webkitTransform"));C=G[J.matrixProperty];E.data("jqt-scroll-current-event",{startLocation:I,currentLocation:I,startPosition:C,lastPosition:C,currentPosition:C,startTime:A.timeStamp,moved:false,lastMoveTime:A.timeStamp,parentDimension:H,endPoint:F,minScroll:!J.bounce?0:B,maxScroll:!J.bounce?F:F-B,end:false});if(J.scrollBarObject){J.scrollBarObject.init(H,D)}J.setPosition(E,J,C,0);if(J.preventDefault){A.preventDefault();return false}else{return true}}function x(B){var G=g(this),I=G.data("jqt-scroll-options"),E=G.data("jqt-scroll-current-event"),C=E.lastMoveTime,F=B.touches[0][I.eventProperty],A=E.startLocation-F,H=E.startPosition-A,D=0;if(H>5){H=(H-5)/I.friction}else{if(H<E.endPoint){H=E.endPoint-((E.endPoint-H)/I.friction)}}E.currentPosition=E.lastPosition=m.floor(H);E.moved=true;E.lastMoveTime=B.timeStamp;E.currentLocation=F;if((E.lastMoveTime-C)>I.maxScrollTime){E.startTime=E.lastMoveTime}if(I.scrollBarObject&&!I.scrollBarObject.visible){I.scrollBarObject.show()}I.setPosition(G,I,E.currentPosition,D);if(I.preventDefault){B.preventDefault();return false}else{return true}}function e(B){var E=g(this),A=E.data("jqt-scroll-options"),C=E.data("jqt-scroll-current-event"),D,F;if(!C.moved){if(A.scrollBarObject){A.scrollBarObject.hide()}D=B.target;if(D.nodeType==3){D=D.parentNode}F=u.createEvent("MouseEvents");F.initEvent("click",true,true);D.dispatchEvent(F);if(A.preventDefault){B.preventDefault();return false}}if(A.useSlides&&g.isFunction(A.slides.callback)){A.slides.callback(E,A,C,B)}else{A.momentum(E,A,C,B)}A.setPosition(E,A,C.currentPosition,C.duration);if(A.preventDefault){B.preventDefault();return false}else{return true}}function j(B){var D=g(this),A=D.data("jqt-scroll-options"),C=D.data("jqt-scroll-current-event");if(C&&!C.end){if(C.currentPosition>0){C.currentPosition=0;A.setPosition(D,A,0,A.bounceSpeed)}else{if(C.currentPosition<C.endPoint){C.currentPosition=C.endPoint;A.setPosition(D,A,C.endPoint,A.bounceSpeed)}else{if(A.scrollBarObject){A.scrollBarObject.hide()}}}C.end=true}else{if(A.scrollBarObject){A.scrollBarObject.hide()}}return null}function p(C,B,E,D){var A=m;duration=A.min(B.maxScrollTime,E.lastMoveTime-E.startTime),distance=E.startPosition-E.currentPosition,velocity=A.abs(distance)/duration,acceleration=duration*velocity*B.friction,p=A.round(distance*velocity),position=A.round(E.currentPosition-p);if(E.currentPosition>0){position=0}else{if(E.currentPosition<E.endPoint){position=E.endPoint}else{if(position>E.minScroll){acceleration=acceleration*A.abs(E.minScroll/position);position=E.minScroll}else{if(position<E.maxScroll){acceleration=acceleration*A.abs(E.maxScroll/position);position=E.maxScroll}}}}E.momentum=A.abs(p);E.currentPosition=position;E.duration=acceleration;return null}function r(D,J,G,B){var C=D.find(J.slides.selector),I=C.filter("."+J.slides.currentClass).eq(0),H,A=G.startPosition-G.currentPosition,E=I[J.dimension]()/J.slides.portion,F;if(!I.length){I=C.eq(0)}H=C.index(I[0]);C.removeClass(J.slides.currentClass);if(G.currentPosition>0){position=0;C.eq(0).addClass(J.slides.currentClass)}else{if(G.currentPosition<G.endPoint){position=G.endPoint;C.eq(C.length-1).addClass(J.slides.currentClass)}else{if(A<-E){position=-C.eq(H>0?H-1:0).addClass(J.slides.currentClass).parent().attr(J.slideProperty)}else{if(A>E){position=-C.eq(H<C.length-1?H+1:C.length-1).addClass(J.slides.currentClass).parent().attr(J.slideProperty)}else{position=-I.addClass(J.slides.currentClass).parent().attr(J.slideProperty)}}}}F=m.abs(G.currentPosition-position)*J.slides.easing;G.momentum=F;G.currentPosition=position;G.duration=F;return null}function y(A,F,D){var H=g(this),G,L=H.data("jqt-scroll-options");F=F!==i?F:L.defaultOffset;if(L.useSlides&&g.isFunction(L.slides.callback)){var J,C,E=H[L.outerDimension](),K=H.parent()[L.dimension](),I=-(E-K),B=K/L.divider;L.parentDimension=K;J=new WebKitCSSMatrix(H.css("webkitTransform"));C=J[L.matrixProperty];G=H.data("jqt-scroll-current-event",{startLocation:0,currentLocation:0,startPosition:C,lastPosition:C,currentPosition:F,startTime:A&&A.timeStamp,moved:true,lastMoveTime:A&&A.timeStamp,parentDimension:K,endPoint:I,minScroll:!L.bounce?0:B,maxScroll:!L.bounce?I:I-B,end:true}).data("jqt-scroll-current-event");L.slides.callback(H,L,G,A)}else{G={currentPosition:F}}return L.setPosition(H,L,G.currentPosition,D||L.defaultDuration)}function b(B,E,D){var C=g(this),A=C.data("jqt-scroll-options");return A.setPosition(C,A,E!==i?E:(B.detail||A.currentPosition),D!==i?D:A.defaultDuration)}function d(C,B,A,F,D){if(B.scrollBarObject){var E=(C.parent()[B.dimension]()-C[B.dimension]());if(A>0){E+=z(A)}B.scrollBarObject.scrollTo(B.scrollBarObject.maxScroll/E*A,w("{0}ms",F!==i?F:B.defaultDuration))}if(F!==i){C.css("webkitTransitionDuration",w("{0}ms",F))}if(D!==i){C.css("webkitTransitionTimingFunction",D)}B.currentPosition=A||0;return C.css("webkitTransform",w(B.tranform,B.currentPosition))}function w(B){var A=arguments;return B.replace(/\{(\d+)\}/g,function(D,C){return A[z(C)+1]+""})}function c(A,B){if(!(this instanceof c)){return new c(A,B)}this.direction=B;this.bar=g(u.createElement("div")).addClass("scrollbar "+B).appendTo(A)[0]}c.prototype={direction:"vertical",transform:t?"translate3d({0}px,{1}px,0)":"translate({0}px,{1}px)",size:0,maxSize:0,maxScroll:0,visible:false,offset:0,init:function(A,B){this.offset=this.direction=="horizontal"?this.bar.offsetWidth-this.bar.clientWidth:this.bar.offsetHeight-this.bar.clientHeight;this.maxSize=A-8;this.size=m.round(this.maxSize*this.maxSize/B)+this.offset;this.maxScroll=this.maxSize-this.size;this.bar.style[this.direction=="horizontal"?"width":"height"]=(this.size-this.offset)+"px"},setPosition:function(A){this.bar.style.webkitTransform=w(this.transform,this.direction=="horizontal"?m.round(A):0,this.direction=="horizontal"?0:m.round(A))},scrollTo:function(B,A){this.bar.style.webkitTransitionDuration=(A||"400ms")+",300ms";this.setPosition(B)},show:function(){this.visible=true;this.bar.style.opacity="1"},hide:function(){this.visible=false;this.bar.style.opacity="0"},remove:function(){this.bar.parentNode.removeChild(this.bar);return null}};g(function(){l.scrollTo(0,0);var A="",D=k,C=l.innerHeight>l.innerWidth?"portrait":"landscape",E=function(F,G){A+=F+":"+(g.isFunction(G)?G(D.variables):G)+";"},B=function(F,G){A+=F+"{";g.each(G,E);A+="}"};g.each(D.defaults,B);g.each(D[C],B);g(u.createElement("style")).attr({type:"text/css",media:"screen"}).html(A).appendTo("head");g(l).one("orientationchange",function(){setTimeout(function(){l.scrollTo(0,0);A="";C=l.innerHeight>l.innerWidth?"portrait":"landscape";g.each(D[C],B);g(u.createElement("style")).attr({type:"text/css",media:"screen"}).html(A).appendTo("head")},30)})})})(jQuery);
Index: extensions/iPiwigo/www/extensions/jquery.galleriffic.js
===================================================================
--- extensions/iPiwigo/www/extensions/jquery.galleriffic.js	(revision 9188)
+++ extensions/iPiwigo/www/extensions/jquery.galleriffic.js	(revision 9188)
@@ -0,0 +1,979 @@
+/**
+ * jQuery Galleriffic plugin
+ *
+ * Copyright (c) 2008 Trent Foley (http://trentacular.com)
+ * Licensed under the MIT License:
+ *   http://www.opensource.org/licenses/mit-license.php
+ *
+ * Much thanks to primary contributer Ponticlaro (http://www.ponticlaro.com)
+ */
+;(function($) {
+	// Globally keep track of all images by their unique hash.  Each item is an image data object.
+	var allImages = {};
+	var imageCounter = 0;
+
+	// Galleriffic static class
+	$.galleriffic = {
+		version: '2.0.1',
+
+		// Strips invalid characters and any leading # characters
+		normalizeHash: function(hash) {
+			return hash.replace(/^.*#/, '').replace(/\?.*$/, '');
+		},
+
+		getImage: function(hash) {
+			if (!hash)
+				return undefined;
+
+			hash = $.galleriffic.normalizeHash(hash);
+			return allImages[hash];
+		},
+
+		// Global function that looks up an image by its hash and displays the image.
+		// Returns false when an image is not found for the specified hash.
+		// @param {String} hash This is the unique hash value assigned to an image.
+		gotoImage: function(hash) {
+			var imageData = $.galleriffic.getImage(hash);
+			if (!imageData)
+				return false;
+
+			var gallery = imageData.gallery;
+			gallery.gotoImage(imageData);
+			
+			return true;
+		},
+
+		// Removes an image from its respective gallery by its hash.
+		// Returns false when an image is not found for the specified hash or the
+		// specified owner gallery does match the located images gallery.
+		// @param {String} hash This is the unique hash value assigned to an image.
+		// @param {Object} ownerGallery (Optional) When supplied, the located images
+		// gallery is verified to be the same as the specified owning gallery before
+		// performing the remove operation.
+		removeImageByHash: function(hash, ownerGallery) {
+			var imageData = $.galleriffic.getImage(hash);
+			if (!imageData)
+				return false;
+
+			var gallery = imageData.gallery;
+			if (ownerGallery && ownerGallery != gallery)
+				return false;
+
+			return gallery.removeImageByIndex(imageData.index);
+		}
+	};
+
+	var defaults = {
+		delay:                     3000,
+		numThumbs:                 20,
+		preloadAhead:              40, // Set to -1 to preload all images
+		enableTopPager:            false,
+		enableBottomPager:         true,
+		maxPagesToShow:            7,
+		imageContainerSel:         '',
+		captionContainerSel:       '',
+		controlsContainerSel:      '',
+		loadingContainerSel:       '',
+		renderSSControls:          true,
+		renderNavControls:         true,
+		playLinkText:              'Play',
+		pauseLinkText:             'Pause',
+		prevLinkText:              'Previous',
+		nextLinkText:              'Next',
+		nextPageLinkText:          'Next &rsaquo;',
+		prevPageLinkText:          '&lsaquo; Prev',
+		enableHistory:             false,
+		enableKeyboardNavigation:  true,
+		autoStart:                 false,
+		syncTransitions:           false,
+		defaultTransitionDuration: 1000,
+		onSlideChange:             undefined, // accepts a delegate like such: function(prevIndex, nextIndex) { ... }
+		onTransitionOut:           undefined, // accepts a delegate like such: function(slide, caption, isSync, callback) { ... }
+		onTransitionIn:            undefined, // accepts a delegate like such: function(slide, caption, isSync) { ... }
+		onPageTransitionOut:       undefined, // accepts a delegate like such: function(callback) { ... }
+		onPageTransitionIn:        undefined, // accepts a delegate like such: function() { ... }
+		onImageAdded:              undefined, // accepts a delegate like such: function(imageData, $li) { ... }
+		onImageRemoved:            undefined  // accepts a delegate like such: function(imageData, $li) { ... }
+	};
+
+	// Primary Galleriffic initialization function that should be called on the thumbnail container.
+	$.fn.galleriffic = function(settings) {
+		//  Extend Gallery Object
+		$.extend(this, {
+			// Returns the version of the script
+			version: $.galleriffic.version,
+
+			// Current state of the slideshow
+			isSlideshowRunning: false,
+			slideshowTimeout: undefined,
+
+			// This function is attached to the click event of generated hyperlinks within the gallery
+			clickHandler: function(e, link) {
+				this.pause();
+
+				if (!this.enableHistory) {
+					// The href attribute holds the unique hash for an image
+					var hash = $.galleriffic.normalizeHash($(link).attr('href'));
+					$.galleriffic.gotoImage(hash);
+					e.preventDefault();
+				}
+			},
+
+			// Appends an image to the end of the set of images.  Argument listItem can be either a jQuery DOM element or arbitrary html.
+			// @param listItem Either a jQuery object or a string of html of the list item that is to be added to the gallery.
+			appendImage: function(listItem) {
+				this.addImage(listItem, false, false);
+				return this;
+			},
+
+			// Inserts an image into the set of images.  Argument listItem can be either a jQuery DOM element or arbitrary html.
+			// @param listItem Either a jQuery object or a string of html of the list item that is to be added to the gallery.
+			// @param {Integer} position The index within the gallery where the item shouold be added.
+			insertImage: function(listItem, position) {
+				this.addImage(listItem, false, true, position);
+				return this;
+			},
+
+			// Adds an image to the gallery and optionally inserts/appends it to the DOM (thumbExists)
+			// @param listItem Either a jQuery object or a string of html of the list item that is to be added to the gallery.
+			// @param {Boolean} thumbExists Specifies whether the thumbnail already exists in the DOM or if it needs to be added.
+			// @param {Boolean} insert Specifies whether the the image is appended to the end or inserted into the gallery.
+			// @param {Integer} position The index within the gallery where the item shouold be added.
+			addImage: function(listItem, thumbExists, insert, position) {
+				var $li = ( typeof listItem === "string" ) ? $(listItem) : listItem;				
+				var $aThumb = $li.find('a.thumb');
+				var slideUrl = $aThumb.attr('href');
+				var title = $aThumb.attr('title');
+				var $caption = $li.find('.caption').remove();
+				var hash = $aThumb.attr('name');
+
+				// Increment the image counter
+				imageCounter++;
+
+				// Autogenerate a hash value if none is present or if it is a duplicate
+				if (!hash || allImages[''+hash]) {
+					hash = imageCounter;
+				}
+
+				// Set position to end when not specified
+				if (!insert)
+					position = this.data.length;
+				
+				var imageData = {
+					title:title,
+					slideUrl:slideUrl,
+					caption:$caption,
+					hash:hash,
+					gallery:this,
+					index:position
+				};
+
+				// Add the imageData to this gallery's array of images
+				if (insert) {
+					this.data.splice(position, 0, imageData);
+
+					// Reset index value on all imageData objects
+					this.updateIndices(position);
+				}
+				else {
+					this.data.push(imageData);
+				}
+
+				var gallery = this;
+
+				// Add the element to the DOM
+				if (!thumbExists) {
+					// Update thumbs passing in addition post transition out handler
+					this.updateThumbs(function() {
+						var $thumbsUl = gallery.find('ul.thumbs');
+						if (insert)
+							$thumbsUl.children(':eq('+position+')').before($li);
+						else
+							$thumbsUl.append($li);
+						
+						if (gallery.onImageAdded)
+							gallery.onImageAdded(imageData, $li);
+					});
+				}
+
+				// Register the image globally
+				allImages[''+hash] = imageData;
+
+				// Setup attributes and click handler
+				$aThumb.attr('rel', 'history')
+					.attr('href', '#'+hash)
+					.removeAttr('name')
+					.click(function(e) {
+						gallery.clickHandler(e, this);
+					});
+
+				return this;
+			},
+
+			// Removes an image from the gallery based on its index.
+			// Returns false when the index is out of range.
+			removeImageByIndex: function(index) {
+				if (index < 0 || index >= this.data.length)
+					return false;
+				
+				var imageData = this.data[index];
+				if (!imageData)
+					return false;
+				
+				this.removeImage(imageData);
+				
+				return true;
+			},
+
+			// Convenience method that simply calls the global removeImageByHash method.
+			removeImageByHash: function(hash) {
+				return $.galleriffic.removeImageByHash(hash, this);
+			},
+
+			// Removes an image from the gallery.
+			removeImage: function(imageData) {
+				var index = imageData.index;
+				
+				// Remove the image from the gallery data array
+				this.data.splice(index, 1);
+				
+				// Remove the global registration
+				delete allImages[''+imageData.hash];
+				
+				// Remove the image's list item from the DOM
+				this.updateThumbs(function() {
+					var $li = gallery.find('ul.thumbs')
+						.children(':eq('+index+')')
+						.remove();
+
+					if (gallery.onImageRemoved)
+						gallery.onImageRemoved(imageData, $li);
+				});
+
+				// Update each image objects index value
+				this.updateIndices(index);
+
+				return this;
+			},
+
+			// Updates the index values of the each of the images in the gallery after the specified index
+			updateIndices: function(startIndex) {
+				for (i = startIndex; i < this.data.length; i++) {
+					this.data[i].index = i;
+				}
+				
+				return this;
+			},
+
+			// Scraped the thumbnail container for thumbs and adds each to the gallery
+			initializeThumbs: function() {
+				this.data = [];
+				var gallery = this;
+
+				this.find('ul.thumbs > li').each(function(i) {
+					gallery.addImage($(this), true, false);
+				});
+
+				return this;
+			},
+
+			isPreloadComplete: false,
+
+			// Initalizes the image preloader
+			preloadInit: function() {
+				if (this.preloadAhead == 0) return this;
+				
+				this.preloadStartIndex = this.currentImage.index;
+				var nextIndex = this.getNextIndex(this.preloadStartIndex);
+				return this.preloadRecursive(this.preloadStartIndex, nextIndex);
+			},
+
+			// Changes the location in the gallery the preloader should work
+			// @param {Integer} index The index of the image where the preloader should restart at.
+			preloadRelocate: function(index) {
+				// By changing this startIndex, the current preload script will restart
+				this.preloadStartIndex = index;
+				return this;
+			},
+
+			// Recursive function that performs the image preloading
+			// @param {Integer} startIndex The index of the first image the current preloader started on.
+			// @param {Integer} currentIndex The index of the current image to preload.
+			preloadRecursive: function(startIndex, currentIndex) {
+				// Check if startIndex has been relocated
+				if (startIndex != this.preloadStartIndex) {
+					var nextIndex = this.getNextIndex(this.preloadStartIndex);
+					return this.preloadRecursive(this.preloadStartIndex, nextIndex);
+				}
+
+				var gallery = this;
+
+				// Now check for preloadAhead count
+				var preloadCount = currentIndex - startIndex;
+				if (preloadCount < 0)
+					preloadCount = this.data.length-1-startIndex+currentIndex;
+				if (this.preloadAhead >= 0 && preloadCount > this.preloadAhead) {
+					// Do this in order to keep checking for relocated start index
+					setTimeout(function() { gallery.preloadRecursive(startIndex, currentIndex); }, 500);
+					return this;
+				}
+
+				var imageData = this.data[currentIndex];
+				if (!imageData)
+					return this;
+
+				// If already loaded, continue
+				if (imageData.image)
+					return this.preloadNext(startIndex, currentIndex); 
+				
+				// Preload the image
+				var image = new Image();
+				
+				image.onload = function() {
+					imageData.image = this;
+					gallery.preloadNext(startIndex, currentIndex);
+				};
+
+				image.alt = imageData.title;
+				image.src = imageData.slideUrl;
+
+				return this;
+			},
+			
+			// Called by preloadRecursive in order to preload the next image after the previous has loaded.
+			// @param {Integer} startIndex The index of the first image the current preloader started on.
+			// @param {Integer} currentIndex The index of the current image to preload.
+			preloadNext: function(startIndex, currentIndex) {
+				var nextIndex = this.getNextIndex(currentIndex);
+				if (nextIndex == startIndex) {
+					this.isPreloadComplete = true;
+				} else {
+					// Use setTimeout to free up thread
+					var gallery = this;
+					setTimeout(function() { gallery.preloadRecursive(startIndex, nextIndex); }, 100);
+				}
+
+				return this;
+			},
+
+			// Safe way to get the next image index relative to the current image.
+			// If the current image is the last, returns 0
+			getNextIndex: function(index) {
+				var nextIndex = index+1;
+				if (nextIndex >= this.data.length)
+					nextIndex = 0;
+				return nextIndex;
+			},
+
+			// Safe way to get the previous image index relative to the current image.
+			// If the current image is the first, return the index of the last image in the gallery.
+			getPrevIndex: function(index) {
+				var prevIndex = index-1;
+				if (prevIndex < 0)
+					prevIndex = this.data.length-1;
+				return prevIndex;
+			},
+
+			// Pauses the slideshow
+			pause: function() {
+				this.isSlideshowRunning = false;
+				if (this.slideshowTimeout) {
+					clearTimeout(this.slideshowTimeout);
+					this.slideshowTimeout = undefined;
+				}
+
+				if (this.$controlsContainer) {
+					this.$controlsContainer
+						.find('div.ss-controls a').removeClass().addClass('play')
+						.attr('title', this.playLinkText)
+						.attr('href', '#play')
+						.html(this.playLinkText);
+				}
+				
+				return this;
+			},
+
+			// Plays the slideshow
+			play: function() {
+				this.isSlideshowRunning = true;
+
+				if (this.$controlsContainer) {
+					this.$controlsContainer
+						.find('div.ss-controls a').removeClass().addClass('pause')
+						.attr('title', this.pauseLinkText)
+						.attr('href', '#pause')
+						.html(this.pauseLinkText);
+				}
+
+				if (!this.slideshowTimeout) {
+					var gallery = this;
+					this.slideshowTimeout = setTimeout(function() { gallery.ssAdvance(); }, this.delay);
+				}
+
+				return this;
+			},
+
+			// Toggles the state of the slideshow (playing/paused)
+			toggleSlideshow: function() {
+				if (this.isSlideshowRunning)
+					this.pause();
+				else
+					this.play();
+
+				return this;
+			},
+
+			// Advances the slideshow to the next image and delegates navigation to the
+			// history plugin when history is enabled
+			// enableHistory is true
+			ssAdvance: function() {
+				if (this.isSlideshowRunning)
+					this.next(true);
+
+				return this;
+			},
+
+			// Advances the gallery to the next image.
+			// @param {Boolean} dontPause Specifies whether to pause the slideshow.
+			// @param {Boolean} bypassHistory Specifies whether to delegate navigation to the history plugin when history is enabled.  
+			next: function(dontPause, bypassHistory) {
+				this.gotoIndex(this.getNextIndex(this.currentImage.index), dontPause, bypassHistory);
+				return this;
+			},
+
+			// Navigates to the previous image in the gallery.
+			// @param {Boolean} dontPause Specifies whether to pause the slideshow.
+			// @param {Boolean} bypassHistory Specifies whether to delegate navigation to the history plugin when history is enabled.
+			previous: function(dontPause, bypassHistory) {
+				this.gotoIndex(this.getPrevIndex(this.currentImage.index), dontPause, bypassHistory);
+				return this;
+			},
+
+			// Navigates to the next page in the gallery.
+			// @param {Boolean} dontPause Specifies whether to pause the slideshow.
+			// @param {Boolean} bypassHistory Specifies whether to delegate navigation to the history plugin when history is enabled.
+			nextPage: function(dontPause, bypassHistory) {
+				var page = this.getCurrentPage();
+				var lastPage = this.getNumPages() - 1;
+				if (page < lastPage) {
+					var startIndex = page * this.numThumbs;
+					var nextPage = startIndex + this.numThumbs;
+					this.gotoIndex(nextPage, dontPause, bypassHistory);
+				}
+
+				return this;
+			},
+
+			// Navigates to the previous page in the gallery.
+			// @param {Boolean} dontPause Specifies whether to pause the slideshow.
+			// @param {Boolean} bypassHistory Specifies whether to delegate navigation to the history plugin when history is enabled.
+			previousPage: function(dontPause, bypassHistory) {
+				var page = this.getCurrentPage();
+				if (page > 0) {
+					var startIndex = page * this.numThumbs;
+					var prevPage = startIndex - this.numThumbs;				
+					this.gotoIndex(prevPage, dontPause, bypassHistory);
+				}
+				
+				return this;
+			},
+
+			// Navigates to the image at the specified index in the gallery
+			// @param {Integer} index The index of the image in the gallery to display.
+			// @param {Boolean} dontPause Specifies whether to pause the slideshow.
+			// @param {Boolean} bypassHistory Specifies whether to delegate navigation to the history plugin when history is enabled.
+			gotoIndex: function(index, dontPause, bypassHistory) {
+				if (!dontPause)
+					this.pause();
+				
+				if (index < 0) index = 0;
+				else if (index >= this.data.length) index = this.data.length-1;
+				
+				var imageData = this.data[index];
+				
+				if (!bypassHistory && this.enableHistory)
+					$.historyLoad(String(imageData.hash));  // At the moment, historyLoad only accepts string arguments
+				else
+					this.gotoImage(imageData);
+
+				return this;
+			},
+
+			// This function is garaunteed to be called anytime a gallery slide changes.
+			// @param {Object} imageData An object holding the image metadata of the image to navigate to.
+			gotoImage: function(imageData) {
+				var index = imageData.index;
+
+				if (this.onSlideChange)
+					this.onSlideChange(this.currentImage.index, index);
+				
+				this.currentImage = imageData;
+				this.preloadRelocate(index);
+				
+				this.refresh();
+				
+				return this;
+			},
+
+			// Returns the default transition duration value.  The value is halved when not
+			// performing a synchronized transition.
+			// @param {Boolean} isSync Specifies whether the transitions are synchronized.
+			getDefaultTransitionDuration: function(isSync) {
+				if (isSync)
+					return this.defaultTransitionDuration;
+				return this.defaultTransitionDuration / 2;
+			},
+
+			// Rebuilds the slideshow image and controls and performs transitions
+			refresh: function() {
+				var imageData = this.currentImage;
+				if (!imageData)
+					return this;
+
+				var index = imageData.index;
+
+				// Update Controls
+				if (this.$controlsContainer) {
+					this.$controlsContainer
+						.find('div.nav-controls a.prev').attr('href', '#'+this.data[this.getPrevIndex(index)].hash).end()
+						.find('div.nav-controls a.next').attr('href', '#'+this.data[this.getNextIndex(index)].hash);
+				}
+
+				var previousSlide = this.$imageContainer.find('span.current').addClass('previous').removeClass('current');
+				var previousCaption = 0;
+
+				if (this.$captionContainer) {
+					previousCaption = this.$captionContainer.find('span.current').addClass('previous').removeClass('current');
+				}
+
+				// Perform transitions simultaneously if syncTransitions is true and the next image is already preloaded
+				var isSync = this.syncTransitions && imageData.image;
+
+				// Flag we are transitioning
+				var isTransitioning = true;
+				var gallery = this;
+
+				var transitionOutCallback = function() {
+					// Flag that the transition has completed
+					isTransitioning = false;
+
+					// Remove the old slide
+					previousSlide.remove();
+
+					// Remove old caption
+					if (previousCaption)
+						previousCaption.remove();
+
+					if (!isSync) {
+						if (imageData.image && imageData.hash == gallery.data[gallery.currentImage.index].hash) {
+							gallery.buildImage(imageData, isSync);
+						} else {
+							// Show loading container
+							if (gallery.$loadingContainer) {
+								gallery.$loadingContainer.show();
+							}
+						}
+					}
+				};
+
+				if (previousSlide.length == 0) {
+					// For the first slide, the previous slide will be empty, so we will call the callback immediately
+					transitionOutCallback();
+				} else {
+					if (this.onTransitionOut) {
+						this.onTransitionOut(previousSlide, previousCaption, isSync, transitionOutCallback);
+					} else {
+						previousSlide.fadeTo(this.getDefaultTransitionDuration(isSync), 0.0, transitionOutCallback);
+						if (previousCaption)
+							previousCaption.fadeTo(this.getDefaultTransitionDuration(isSync), 0.0);
+					}
+				}
+
+				// Go ahead and begin transitioning in of next image
+				if (isSync)
+					this.buildImage(imageData, isSync);
+
+				if (!imageData.image) {
+					var image = new Image();
+					
+					// Wire up mainImage onload event
+					image.onload = function() {
+						imageData.image = this;
+
+						// Only build image if the out transition has completed and we are still on the same image hash
+						if (!isTransitioning && imageData.hash == gallery.data[gallery.currentImage.index].hash) {
+							gallery.buildImage(imageData, isSync);
+						}
+					};
+
+					// set alt and src
+					image.alt = imageData.title;
+					image.src = imageData.slideUrl;
+				}
+
+				// This causes the preloader (if still running) to relocate out from the currentIndex
+				this.relocatePreload = true;
+
+				return this.syncThumbs();
+			},
+
+			// Called by the refresh method after the previous image has been transitioned out or at the same time
+			// as the out transition when performing a synchronous transition.
+			// @param {Object} imageData An object holding the image metadata of the image to build.
+			// @param {Boolean} isSync Specifies whether the transitions are synchronized.
+			buildImage: function(imageData, isSync) {
+				var gallery = this;
+				var nextIndex = this.getNextIndex(imageData.index);
+
+				// Construct new hidden span for the image
+				var newSlide = this.$imageContainer
+					.append('<span class="image-wrapper current"><a class="advance-link" rel="history" href="#'+this.data[nextIndex].hash+'" title="'+imageData.title+'">&nbsp;</a></span>')
+					.find('span.current').css('opacity', '0');
+				
+				newSlide.find('a')
+					.append(imageData.image)
+					.click(function(e) {
+						gallery.clickHandler(e, this);
+					});
+				
+				var newCaption = 0;
+				if (this.$captionContainer) {
+					// Construct new hidden caption for the image
+					newCaption = this.$captionContainer
+						.append('<span class="image-caption current"></span>')
+						.find('span.current').css('opacity', '0')
+						.append(imageData.caption);
+				}
+
+				// Hide the loading conatiner
+				if (this.$loadingContainer) {
+					this.$loadingContainer.hide();
+				}
+
+				// Transition in the new image
+				if (this.onTransitionIn) {
+					this.onTransitionIn(newSlide, newCaption, isSync);
+				} else {
+					newSlide.fadeTo(this.getDefaultTransitionDuration(isSync), 1.0);
+					if (newCaption)
+						newCaption.fadeTo(this.getDefaultTransitionDuration(isSync), 1.0);
+				}
+				
+				if (this.isSlideshowRunning) {
+					if (this.slideshowTimeout)
+						clearTimeout(this.slideshowTimeout);
+
+					this.slideshowTimeout = setTimeout(function() { gallery.ssAdvance(); }, this.delay);
+				}
+
+				return this;
+			},
+
+			// Returns the current page index that should be shown for the currentImage
+			getCurrentPage: function() {
+				return Math.floor(this.currentImage.index / this.numThumbs);
+			},
+
+			// Applies the selected class to the current image's corresponding thumbnail.
+			// Also checks if the current page has changed and updates the displayed page of thumbnails if necessary.
+			syncThumbs: function() {
+				var page = this.getCurrentPage();
+				if (page != this.displayedPage)
+					this.updateThumbs();
+
+				// Remove existing selected class and add selected class to new thumb
+				var $thumbs = this.find('ul.thumbs').children();
+				$thumbs.filter('.selected').removeClass('selected');
+				$thumbs.eq(this.currentImage.index).addClass('selected');
+
+				return this;
+			},
+
+			// Performs transitions on the thumbnails container and updates the set of
+			// thumbnails that are to be displayed and the navigation controls.
+			// @param {Delegate} postTransitionOutHandler An optional delegate that is called after
+			// the thumbnails container has transitioned out and before the thumbnails are rebuilt.
+			updateThumbs: function(postTransitionOutHandler) {
+				var gallery = this;
+				var transitionOutCallback = function() {
+					// Call the Post-transition Out Handler
+					if (postTransitionOutHandler)
+						postTransitionOutHandler();
+					
+					gallery.rebuildThumbs();
+
+					// Transition In the thumbsContainer
+					if (gallery.onPageTransitionIn)
+						gallery.onPageTransitionIn();
+					else
+						gallery.show();
+				};
+
+				// Transition Out the thumbsContainer
+				if (this.onPageTransitionOut) {
+					this.onPageTransitionOut(transitionOutCallback);
+				} else {
+					this.hide();
+					transitionOutCallback();
+				}
+
+				return this;
+			},
+
+			// Updates the set of thumbnails that are to be displayed and the navigation controls.
+			rebuildThumbs: function() {
+				var needsPagination = this.data.length > this.numThumbs;
+
+				// Rebuild top pager
+				if (this.enableTopPager) {
+					var $topPager = this.find('div.top');
+					if ($topPager.length == 0)
+						$topPager = this.prepend('<div class="top pagination"></div>').find('div.top');
+					else
+						$topPager.empty();
+
+					if (needsPagination)
+						this.buildPager($topPager);
+				}
+
+				// Rebuild bottom pager
+				if (this.enableBottomPager) {
+					var $bottomPager = this.find('div.bottom');
+					if ($bottomPager.length == 0)
+						$bottomPager = this.append('<div class="bottom pagination"></div>').find('div.bottom');
+					else
+						$bottomPager.empty();
+
+					if (needsPagination)
+						this.buildPager($bottomPager);
+				}
+
+				var page = this.getCurrentPage();
+				var startIndex = page*this.numThumbs;
+				var stopIndex = startIndex+this.numThumbs-1;
+				if (stopIndex >= this.data.length)
+					stopIndex = this.data.length-1;
+
+				// Show/Hide thumbs
+				var $thumbsUl = this.find('ul.thumbs');
+				$thumbsUl.find('li').each(function(i) {
+					var $li = $(this);
+					if (i >= startIndex && i <= stopIndex) {
+						$li.show();
+					} else {
+						$li.hide();
+					}
+				});
+
+				this.displayedPage = page;
+
+				// Remove the noscript class from the thumbs container ul
+				$thumbsUl.removeClass('noscript');
+				
+				return this;
+			},
+
+			// Returns the total number of pages required to display all the thumbnails.
+			getNumPages: function() {
+				return Math.ceil(this.data.length/this.numThumbs);
+			},
+
+			// Rebuilds the pager control in the specified matched element.
+			// @param {jQuery} pager A jQuery element set matching the particular pager to be rebuilt.
+			buildPager: function(pager) {
+				var gallery = this;
+				var numPages = this.getNumPages();
+				var page = this.getCurrentPage();
+				var startIndex = page * this.numThumbs;
+				var pagesRemaining = this.maxPagesToShow - 1;
+				
+				var pageNum = page - Math.floor((this.maxPagesToShow - 1) / 2) + 1;
+				if (pageNum > 0) {
+					var remainingPageCount = numPages - pageNum;
+					if (remainingPageCount < pagesRemaining) {
+						pageNum = pageNum - (pagesRemaining - remainingPageCount);
+					}
+				}
+
+				if (pageNum < 0) {
+					pageNum = 0;
+				}
+
+				// Prev Page Link
+				if (page > 0) {
+					var prevPage = startIndex - this.numThumbs;
+					pager.append('<a rel="history" href="#'+this.data[prevPage].hash+'" title="'+this.prevPageLinkText+'">'+this.prevPageLinkText+'</a>');
+				}
+
+				// Create First Page link if needed
+				if (pageNum > 0) {
+					this.buildPageLink(pager, 0, numPages);
+					if (pageNum > 1)
+						pager.append('<span class="ellipsis">&hellip;</span>');
+					
+					pagesRemaining--;
+				}
+
+				// Page Index Links
+				while (pagesRemaining > 0) {
+					this.buildPageLink(pager, pageNum, numPages);
+					pagesRemaining--;
+					pageNum++;
+				}
+
+				// Create Last Page link if needed
+				if (pageNum < numPages) {
+					var lastPageNum = numPages - 1;
+					if (pageNum < lastPageNum)
+						pager.append('<span class="ellipsis">&hellip;</span>');
+
+					this.buildPageLink(pager, lastPageNum, numPages);
+				}
+
+				// Next Page Link
+				var nextPage = startIndex + this.numThumbs;
+				if (nextPage < this.data.length) {
+					pager.append('<a rel="history" href="#'+this.data[nextPage].hash+'" title="'+this.nextPageLinkText+'">'+this.nextPageLinkText+'</a>');
+				}
+
+				pager.find('a').click(function(e) {
+					gallery.clickHandler(e, this);
+				});
+
+				return this;
+			},
+
+			// Builds a single page link within a pager.  This function is called by buildPager
+			// @param {jQuery} pager A jQuery element set matching the particular pager to be rebuilt.
+			// @param {Integer} pageNum The page number of the page link to build.
+			// @param {Integer} numPages The total number of pages required to display all thumbnails.
+			buildPageLink: function(pager, pageNum, numPages) {
+				var pageLabel = pageNum + 1;
+				var currentPage = this.getCurrentPage();
+				if (pageNum == currentPage)
+					pager.append('<span class="current">'+pageLabel+'</span>');
+				else if (pageNum < numPages) {
+					var imageIndex = pageNum*this.numThumbs;
+					pager.append('<a rel="history" href="#'+this.data[imageIndex].hash+'" title="'+pageLabel+'">'+pageLabel+'</a>');
+				}
+				
+				return this;
+			}
+		});
+
+		// Now initialize the gallery
+		$.extend(this, defaults, settings);
+		
+		// Verify the history plugin is available
+		if (this.enableHistory && !$.historyInit)
+			this.enableHistory = false;
+		
+		// Select containers
+		if (this.imageContainerSel) this.$imageContainer = $(this.imageContainerSel);
+		if (this.captionContainerSel) this.$captionContainer = $(this.captionContainerSel);
+		if (this.loadingContainerSel) this.$loadingContainer = $(this.loadingContainerSel);
+
+		// Initialize the thumbails
+		this.initializeThumbs();
+		
+		if (this.maxPagesToShow < 3)
+			this.maxPagesToShow = 3;
+
+		this.displayedPage = -1;
+		this.currentImage = this.data[0];
+		var gallery = this;
+
+		// Hide the loadingContainer
+		if (this.$loadingContainer)
+			this.$loadingContainer.hide();
+
+		// Setup controls
+		if (this.controlsContainerSel) {
+			this.$controlsContainer = $(this.controlsContainerSel).empty();
+			
+			if (this.renderSSControls) {
+				if (this.autoStart) {
+					this.$controlsContainer
+						.append('<div class="ss-controls"><a href="#pause" class="pause" title="'+this.pauseLinkText+'">'+this.pauseLinkText+'</a></div>');
+				} else {
+					this.$controlsContainer
+						.append('<div class="ss-controls"><a href="#play" class="play" title="'+this.playLinkText+'">'+this.playLinkText+'</a></div>');
+				}
+
+				this.$controlsContainer.find('div.ss-controls a')
+					.click(function(e) {
+						gallery.toggleSlideshow();
+						e.preventDefault();
+						return false;
+					});
+			}
+		
+			if (this.renderNavControls) {
+				this.$controlsContainer
+					.append('<div class="nav-controls"><a class="prev" rel="history" title="'+this.prevLinkText+'">'+this.prevLinkText+'</a><a class="next" rel="history" title="'+this.nextLinkText+'">'+this.nextLinkText+'</a></div>')
+					.find('div.nav-controls a')
+					.click(function(e) {
+						gallery.clickHandler(e, this);
+					});
+			}
+		}
+
+		var initFirstImage = !this.enableHistory || !location.hash;
+		if (this.enableHistory && location.hash) {
+			var hash = $.galleriffic.normalizeHash(location.hash);
+			var imageData = allImages[hash];
+			if (!imageData)
+				initFirstImage = true;
+		}
+
+		// Setup gallery to show the first image
+		if (initFirstImage)
+			this.gotoIndex(0, false, true);
+
+		// Setup Keyboard Navigation
+		if (this.enableKeyboardNavigation) {
+			$(document).keydown(function(e) {
+				var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
+				switch(key) {
+					case 32: // space
+						gallery.next();
+						e.preventDefault();
+						break;
+					case 33: // Page Up
+						gallery.previousPage();
+						e.preventDefault();
+						break;
+					case 34: // Page Down
+						gallery.nextPage();
+						e.preventDefault();
+						break;
+					case 35: // End
+						gallery.gotoIndex(gallery.data.length-1);
+						e.preventDefault();
+						break;
+					case 36: // Home
+						gallery.gotoIndex(0);
+						e.preventDefault();
+						break;
+					case 37: // left arrow
+						gallery.previous();
+						e.preventDefault();
+						break;
+					case 39: // right arrow
+						gallery.next();
+						e.preventDefault();
+						break;
+				}
+			});
+		}
+
+		// Auto start the slideshow
+		if (this.autoStart)
+			this.play();
+
+		// Kickoff Image Preloader after 1 second
+		setTimeout(function() { gallery.preloadInit(); }, 1000);
+
+		return this;
+	};
+})(jQuery);
Index: extensions/iPiwigo/www/extensions/scrolling.css
===================================================================
--- extensions/iPiwigo/www/extensions/scrolling.css	(revision 9188)
+++ extensions/iPiwigo/www/extensions/scrolling.css	(revision 9188)
@@ -0,0 +1,98 @@
+/**
+ *
+ *
+ *
+ *
+ *
+ */
+ 
+.horizontal-scroll, 
+.horizontal-scroll .scroll-container, 
+.horizontal-slide, 
+.horizontal-slide .slide-container
+{
+    width: 320px;
+    height: 100%;
+    overflow: hidden;
+    padding: 0;
+}
+.landscape .horizontal-scroll, 
+.landscape .horizontal-scroll .scroll-container, 
+.landscape .horizontal-slide, 
+.landscape .horizontal-slide .slide-container
+{
+    width: 480px;
+}
+.profile .horizontal-scroll, 
+.profile .horizontal-scroll .scroll-container, 
+.profile .horizontal-slide, 
+.profile .horizontal-slide .slide-container
+{
+    width: 320px;
+}
+.vertical-scroll, .vertical-slide
+{
+    position: relative;
+    z-index: 1;
+    overflow: hidden;
+    height: 370px;        
+}
+
+.fullscreen.profile .vertical-scroll, 
+.fullscreen.profile .vertical-slide 
+{
+	height:420px;
+}
+
+.landscape .vertical-scroll, 
+.landscape .vertical-slide
+{
+	height: 230px;
+}
+
+.fullscreen.landscape .vertical-scroll, 
+.fullscreen.landscape .vertical-slide {height:255px;}
+
+
+.vertical-scroll > div, 
+.vertical-slide > div
+{
+    margin: 0 auto;
+}
+
+.fullscreen .vertical-scroll > div, 
+.fullscreen .vertical-slide > div 
+{
+	padding-bottom:10px;
+}
+
+.fullscreen .vertical-scroll.use-bottom-toolbar > div, 
+.fullscreen .vertical-slide.use-bottom-toolbar > div 
+{
+	padding-bottom:0;
+}
+
+.vertical-scroll.use-bottom-toolbar, 
+.vertical-slide.use-bottom-toolbar
+{
+	height: 325px !important;
+}
+
+.fullscreen.profile .vertical-scroll.use-bottom-toolbar, 
+.fullscreen.profile .vertical-slide.use-bottom-toolbar
+{
+	height: 370px !important;
+}
+
+.landscape .vertical-scroll.use-bottom-toolbar, 
+.landscape .vertical-slide.use-bottom-toolbar
+{
+	height: 185px !important;
+}
+
+.fullscreen.landscape .vertical-scroll.use-bottom-toolbar, 
+.fullscreen.landscape .vertical-slide.use-bottom-toolbar
+{
+	height: 210px !important;
+}
+
Index: extensions/iPiwigo/www/firebug-lite.js
===================================================================
--- extensions/iPiwigo/www/firebug-lite.js	(revision 9188)
+++ extensions/iPiwigo/www/firebug-lite.js	(revision 9188)
@@ -0,0 +1,7514 @@
+(function(){
+/**************************************************************
+ *
+ *    Firebug Lite 1.3.1
+ * 
+ *      Copyright (c) 2007, Parakey Inc.
+ *      Released under BSD license.
+ *      More information: http://getfirebug.com/firebuglite
+ *  
+ **************************************************************/
+/*
+ * CSS selectors powered by:
+ * 
+ * Sizzle CSS Selector Engine - v1.0
+ *  Copyright 2009, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+var FBL={};
+(function(){var productionDir="http://getfirebug.com/releases/lite/";
+var bookmarkletVersion=4;
+var reNotWhitespace=/[^\s]/;
+var reSplitFile=/:\/{1,3}(.*?)\/([^\/]*?)\/?($|\?.*)/;
+var userAgent=navigator.userAgent.toLowerCase();
+this.isFirefox=/firefox/.test(userAgent);
+this.isOpera=/opera/.test(userAgent);
+this.isSafari=/webkit/.test(userAgent);
+this.isIE=/msie/.test(userAgent)&&!/opera/.test(userAgent);
+this.isIE6=/msie 6/i.test(navigator.appVersion);
+this.browserVersion=(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1];
+this.isIElt8=this.isIE&&(this.browserVersion-0<8);
+this.NS=null;
+this.pixelsPerInch=null;
+var namespaces=[];
+this.ns=function(fn){var ns={};
+namespaces.push(fn,ns);
+return ns
+};
+var FBTrace=null;
+this.initialize=function(){if(FBL.FBTrace){FBTrace=FBL.FBTrace
+}else{FBTrace=FBL.FBTrace={}
+}FBL.Ajax.initialize();
+var isChromeContext=window.Firebug&&typeof window.Firebug.SharedEnv=="object";
+if(isChromeContext){sharedEnv=window.Firebug.SharedEnv;
+delete window.Firebug.SharedEnv;
+FBL.Env=sharedEnv;
+FBL.Env.isChromeContext=true;
+FBTrace.messageQueue=FBL.Env.traceMessageQueue
+}else{FBL.NS=document.documentElement.namespaceURI;
+FBL.Env.browser=window;
+FBL.Env.destroy=destroyEnvironment;
+if(document.documentElement.getAttribute("debug")=="true"){FBL.Env.Options.startOpened=true
+}findLocation();
+var prefs=eval("("+FBL.readCookie("FirebugLite")+")");
+if(prefs){FBL.Env.Options.startOpened=prefs.startOpened;
+FBL.Env.Options.enableTrace=prefs.enableTrace;
+FBL.Env.Options.enablePersistent=prefs.enablePersistent
+}if(FBL.isFirefox&&typeof FBL.Env.browser.console=="object"&&FBL.Env.browser.console.firebug&&FBL.Env.Options.disableWhenFirebugActive){return
+}}if(FBL.Env.isDebugMode){FBL.Env.browser.FBL=FBL
+}this.isQuiksMode=FBL.Env.browser.document.compatMode=="BackCompat";
+this.isIEQuiksMode=this.isIE&&this.isQuiksMode;
+this.isIEStantandMode=this.isIE&&!this.isQuiksMode;
+this.noFixedPosition=this.isIE6||this.isIEQuiksMode;
+if(FBL.Env.Options.enableTrace){FBTrace.initialize()
+}if(FBTrace.DBG_INITIALIZE&&isChromeContext){FBTrace.sysout("FBL.initialize - persistent application","initialize chrome context")
+}if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("FBL.initialize",namespaces.length/2+" namespaces BEGIN")
+}for(var i=0;
+i<namespaces.length;
+i+=2){var fn=namespaces[i];
+var ns=namespaces[i+1];
+fn.apply(ns)
+}if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("FBL.initialize",namespaces.length/2+" namespaces END");
+FBTrace.sysout("FBL waitForDocument","waiting document load")
+}FBL.Firebug.loadPrefs(prefs);
+if(FBL.Env.Options.enablePersistent){if(isChromeContext){FBL.FirebugChrome.clone(FBL.Env.FirebugChrome)
+}else{FBL.Env.FirebugChrome=FBL.FirebugChrome;
+FBL.Env.traceMessageQueue=FBTrace.messageQueue
+}}if(FBL.Env.isChromeExtension){var doc=FBL.Env.browser.document;
+if(!doc.getElementById("FirebugChannel")){var channel=doc.createElement("div");
+channel.id="FirebugChannel";
+channel.firebugIgnore=true;
+channel.style.display="none";
+doc.documentElement.insertBefore(channel,doc.documentElement.firstChild)
+}var channelEvent=document.createEvent("Event");
+channelEvent.initEvent("FirebugChannelEvent",true,true);
+this.chromeExtensionDispatch=function(data){channel.innerText=data;
+channel.dispatchEvent(channelEvent)
+}
+}waitForDocument()
+};
+var waitForDocument=function waitForDocument(){var doc=FBL.Env.browser.document;
+var body=doc.getElementsByTagName("body")[0];
+if(body){calculatePixelsPerInch(doc,body);
+onDocumentLoad()
+}else{setTimeout(waitForDocument,50)
+}};
+var onDocumentLoad=function onDocumentLoad(){if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("FBL onDocumentLoad","document loaded")
+}if(FBL.isIE6){fixIE6BackgroundImageCache()
+}if(FBL.Env.Options.enablePersistent&&FBL.Env.isChromeContext){FBL.Firebug.initialize();
+if(!FBL.Env.isDevelopmentMode){sharedEnv.destroy();
+sharedEnv=null
+}}else{FBL.FirebugChrome.create()
+}};
+var sharedEnv;
+this.Env={Options:{saveCookies:false,saveWindowPosition:false,saveCommandLineHistory:false,startOpened:false,startInNewWindow:false,showIconWhenHidden:true,overrideConsole:true,ignoreFirebugElements:true,disableWhenFirebugActive:true,enableTrace:false,enablePersistent:false},Location:{sourceDir:null,baseDir:null,skinDir:null,skin:null,app:null},skin:"xp",useLocalSkin:false,isDevelopmentMode:false,isDebugMode:false,isChromeContext:false,browser:null,chrome:null};
+var destroyEnvironment=function destroyEnvironment(){setTimeout(function(){FBL=null
+},100)
+};
+var findLocation=function findLocation(){var reFirebugFile=/(firebug-lite(?:-\w+)?(?:\.js|\.jgz))(?:#(.+))?$/;
+var rePath=/^(.*\/)/;
+var reProtocol=/^\w+:\/\//;
+var path=null;
+var doc=document;
+var script=doc.getElementById("FirebugLite");
+if(script){file=reFirebugFile.exec(script.src);
+var version=script.getAttribute("FirebugLite");
+var number=version?parseInt(version):0;
+if(!version||!number||number<bookmarkletVersion){FBL.Env.bookmarkletOutdated=true
+}}else{for(var i=0,s=doc.getElementsByTagName("script"),si;
+si=s[i];
+i++){var file=null;
+if(si.nodeName.toLowerCase()=="script"&&(file=reFirebugFile.exec(si.src))){script=si;
+break
+}}}if(script){script.firebugIgnore=true
+}if(file){var fileName=file[1];
+var fileOptions=file[2];
+if(reProtocol.test(script.src)){path=rePath.exec(script.src)[1]
+}else{var r=rePath.exec(script.src);
+var src=r?r[1]:script.src;
+var backDir=/^((?:\.\.\/)+)(.*)/.exec(src);
+var reLastDir=/^(.*\/)[^\/]+\/$/;
+path=rePath.exec(location.href)[1];
+if(backDir){var j=backDir[1].length/3;
+var p;
+while(j-->0){path=reLastDir.exec(path)[1]
+}path+=backDir[2]
+}else{if(src.indexOf("/")!=-1){if(/^\.\/./.test(src)){path+=src.substring(2)
+}else{if(/^\/./.test(src)){var domain=/^(\w+:\/\/[^\/]+)/.exec(path);
+path=domain[1]+src
+}else{path+=src
+}}}}}}FBL.Env.isChromeExtension=script&&script.getAttribute("extension")=="Chrome";
+if(FBL.Env.isChromeExtension){path=productionDir;
+FBL.Env.bookmarkletOutdated=false;
+script={innerHTML:"{showIconWhenHidden:false}"}
+}var m=path&&path.match(/([^\/]+)\/$/)||null;
+if(path&&m){var Env=FBL.Env;
+if(fileName=="firebug-lite-dev.js"){Env.isDevelopmentMode=true;
+Env.isDebugMode=true;
+Env.useLocalSkin=path.indexOf(location.protocol+"//"+location.host+"/")==0
+}else{if(fileName=="firebug-lite-debug.js"){Env.isDebugMode=true
+}}if(Env.browser.document.documentElement.getAttribute("debug")=="true"){Env.Options.startOpened=true
+}if(fileOptions){var options=fileOptions.split(",");
+for(var i=0,length=options.length;
+i<length;
+i++){var option=options[i];
+var name,value;
+if(option.indexOf("=")!=-1){var parts=option.split("=");
+name=parts[0];
+value=eval(unescape(parts[1]))
+}else{name=option;
+value=true
+}if(name=="debug"){Env.isDebugMode=!!value
+}else{if(name in Env.Options){Env.Options[name]=value
+}else{Env[name]=value
+}}}}var innerOptions=FBL.trim(script.innerHTML);
+if(innerOptions){var innerOptionsObject=eval("("+innerOptions+")");
+for(var name in innerOptionsObject){var value=innerOptionsObject[name];
+if(name=="debug"){Env.isDebugMode=!!value
+}else{if(name in Env.Options){Env.Options[name]=value
+}else{Env[name]=value
+}}}}if(Env.isDebugMode){Env.Options.startOpened=true;
+Env.Options.enableTrace=true;
+Env.Options.disableWhenFirebugActive=false
+}var loc=Env.Location;
+var isProductionRelease=path.indexOf(productionDir)!=-1;
+loc.sourceDir=path;
+loc.baseDir=path.substr(0,path.length-m[1].length-1);
+loc.skinDir=(isProductionRelease?path:loc.baseDir)+"skin/"+Env.skin+"/";
+loc.skin=loc.skinDir+"firebug.html";
+loc.app=path+fileName
+}else{throw new Error("Firebug Error: Library path not found")
+}};
+this.bind=function(){var args=cloneArray(arguments),fn=args.shift(),object=args.shift();
+return function(){return fn.apply(object,arrayInsert(cloneArray(args),0,arguments))
+}
+};
+this.bindFixed=function(){var args=cloneArray(arguments),fn=args.shift(),object=args.shift();
+return function(){return fn.apply(object,args)
+}
+};
+this.extend=function(l,r){var newOb={};
+for(var n in l){newOb[n]=l[n]
+}for(var n in r){newOb[n]=r[n]
+}return newOb
+};
+this.append=function(l,r){for(var n in r){l[n]=r[n]
+}return l
+};
+this.keys=function(map){var keys=[];
+try{for(var name in map){keys.push(name)
+}}catch(exc){}return keys
+};
+this.values=function(map){var values=[];
+try{for(var name in map){try{values.push(map[name])
+}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("lib.values FAILED ",exc)
+}}}}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("lib.values FAILED ",exc)
+}}return values
+};
+this.remove=function(list,item){for(var i=0;
+i<list.length;
+++i){if(list[i]==item){list.splice(i,1);
+break
+}}};
+this.sliceArray=function(array,index){var slice=[];
+for(var i=index;
+i<array.length;
+++i){slice.push(array[i])
+}return slice
+};
+function cloneArray(array,fn){var newArray=[];
+if(fn){for(var i=0;
+i<array.length;
+++i){newArray.push(fn(array[i]))
+}}else{for(var i=0;
+i<array.length;
+++i){newArray.push(array[i])
+}}return newArray
+}function extendArray(array,array2){var newArray=[];
+newArray.push.apply(newArray,array);
+newArray.push.apply(newArray,array2);
+return newArray
+}this.extendArray=extendArray;
+this.cloneArray=cloneArray;
+function arrayInsert(array,index,other){for(var i=0;
+i<other.length;
+++i){array.splice(i+index,0,other[i])
+}return array
+}this.createStyleSheet=function(doc,url){var style=doc.createElementNS("http://www.w3.org/1999/xhtml","link");
+style.setAttribute("charset","utf-8");
+style.firebugIgnore=true;
+style.setAttribute("rel","stylesheet");
+style.setAttribute("type","text/css");
+style.setAttribute("href",url);
+return style
+};
+this.addStyleSheet=function(doc,style){var heads=doc.getElementsByTagName("head");
+if(heads.length){heads[0].appendChild(style)
+}else{doc.documentElement.appendChild(style)
+}};
+this.getStyle=this.isIE?function(el,name){return el.currentStyle[name]||el.style[name]||undefined
+}:function(el,name){return el.ownerDocument.defaultView.getComputedStyle(el,null)[name]||el.style[name]||undefined
+};
+var entityConversionLists=this.entityConversionLists={normal:{whitespace:{"\t":"\u200c\u2192","\n":"\u200c\u00b6","\r":"\u200c\u00ac"," ":"\u200c\u00b7"}},reverse:{whitespace:{"&Tab;":"\t","&NewLine;":"\n","\u200c\u2192":"\t","\u200c\u00b6":"\n","\u200c\u00ac":"\r","\u200c\u00b7":" "}}};
+var normal=entityConversionLists.normal,reverse=entityConversionLists.reverse;
+function addEntityMapToList(ccode,entity){var lists=Array.prototype.slice.call(arguments,2),len=lists.length,ch=String.fromCharCode(ccode);
+for(var i=0;
+i<len;
+i++){var list=lists[i];
+normal[list]=normal[list]||{};
+normal[list][ch]="&"+entity+";";
+reverse[list]=reverse[list]||{};
+reverse[list]["&"+entity+";"]=ch
+}}var e=addEntityMapToList,white="whitespace",text="text",attr="attributes",css="css",editor="editor";
+e(34,"quot",attr,css);
+e(38,"amp",attr,text,css);
+e(39,"apos",css);
+e(60,"lt",attr,text,css);
+e(62,"gt",attr,text,css);
+e(169,"copy",text,editor);
+e(174,"reg",text,editor);
+e(8482,"trade",text,editor);
+e(8210,"#8210",attr,text,editor);
+e(8211,"ndash",attr,text,editor);
+e(8212,"mdash",attr,text,editor);
+e(8213,"#8213",attr,text,editor);
+e(160,"nbsp",attr,text,white,editor);
+e(8194,"ensp",attr,text,white,editor);
+e(8195,"emsp",attr,text,white,editor);
+e(8201,"thinsp",attr,text,white,editor);
+e(8204,"zwnj",attr,text,white,editor);
+e(8205,"zwj",attr,text,white,editor);
+e(8206,"lrm",attr,text,white,editor);
+e(8207,"rlm",attr,text,white,editor);
+e(8203,"#8203",attr,text,white,editor);
+var entityConversionRegexes={normal:{},reverse:{}};
+var escapeEntitiesRegEx={normal:function(list){var chars=[];
+for(var ch in list){chars.push(ch)
+}return new RegExp("(["+chars.join("")+"])","gm")
+},reverse:function(list){var chars=[];
+for(var ch in list){chars.push(ch)
+}return new RegExp("("+chars.join("|")+")","gm")
+}};
+function getEscapeRegexp(direction,lists){var name="",re;
+var groups=[].concat(lists);
+for(i=0;
+i<groups.length;
+i++){name+=groups[i].group
+}re=entityConversionRegexes[direction][name];
+if(!re){var list={};
+if(groups.length>1){for(var i=0;
+i<groups.length;
+i++){var aList=entityConversionLists[direction][groups[i].group];
+for(var item in aList){list[item]=aList[item]
+}}}else{if(groups.length==1){list=entityConversionLists[direction][groups[0].group]
+}else{list={}
+}}re=entityConversionRegexes[direction][name]=escapeEntitiesRegEx[direction](list)
+}return re
+}function createSimpleEscape(name,direction){return function(value){var list=entityConversionLists[direction][name];
+return String(value).replace(getEscapeRegexp(direction,{group:name,list:list}),function(ch){return list[ch]
+})
+}
+}function escapeGroupsForEntities(str,lists){lists=[].concat(lists);
+var re=getEscapeRegexp("normal",lists),split=String(str).split(re),len=split.length,results=[],cur,r,i,ri=0,l,list,last="";
+if(!len){return[{str:String(str),group:"",name:""}]
+}for(i=0;
+i<len;
+i++){cur=split[i];
+if(cur==""){continue
+}for(l=0;
+l<lists.length;
+l++){list=lists[l];
+r=entityConversionLists.normal[list.group][cur];
+if(r){results[ri]={str:r,"class":list["class"],extra:list.extra[cur]?list["class"]+list.extra[cur]:""};
+break
+}}if(!r){results[ri]={str:cur,"class":"",extra:""}
+}ri++
+}return results
+}this.escapeGroupsForEntities=escapeGroupsForEntities;
+function unescapeEntities(str,lists){var re=getEscapeRegexp("reverse",lists),split=String(str).split(re),len=split.length,results=[],cur,r,i,ri=0,l,list;
+if(!len){return str
+}lists=[].concat(lists);
+for(i=0;
+i<len;
+i++){cur=split[i];
+if(cur==""){continue
+}for(l=0;
+l<lists.length;
+l++){list=lists[l];
+r=entityConversionLists.reverse[list.group][cur];
+if(r){results[ri]=r;
+break
+}}if(!r){results[ri]=cur
+}ri++
+}return results.join("")||""
+}var escapeForTextNode=this.escapeForTextNode=createSimpleEscape("text","normal");
+var escapeForHtmlEditor=this.escapeForHtmlEditor=createSimpleEscape("editor","normal");
+var escapeForElementAttribute=this.escapeForElementAttribute=createSimpleEscape("attributes","normal");
+var escapeForCss=this.escapeForCss=createSimpleEscape("css","normal");
+var escapeForSourceLine=this.escapeForSourceLine=createSimpleEscape("text","normal");
+var unescapeWhitespace=createSimpleEscape("whitespace","reverse");
+this.unescapeForTextNode=function(str){if(Firebug.showTextNodesWithWhitespace){str=unescapeWhitespace(str)
+}if(!Firebug.showTextNodesWithEntities){str=escapeForElementAttribute(str)
+}return str
+};
+this.escapeNewLines=function(value){return value.replace(/\r/g,"\\r").replace(/\n/g,"\\n")
+};
+this.stripNewLines=function(value){return typeof(value)=="string"?value.replace(/[\r\n]/g," "):value
+};
+this.escapeJS=function(value){return value.replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace('"','\\"',"g")
+};
+function escapeHTMLAttribute(value){function replaceChars(ch){switch(ch){case"&":return"&amp;";
+case"'":return apos;
+case'"':return quot
+}return"?"
+}var apos="&#39;",quot="&quot;",around='"';
+if(value.indexOf('"')==-1){quot='"';
+apos="'"
+}else{if(value.indexOf("'")==-1){quot='"';
+around="'"
+}}return around+(String(value).replace(/[&'"]/g,replaceChars))+around
+}function escapeHTML(value){function replaceChars(ch){switch(ch){case"<":return"&lt;";
+case">":return"&gt;";
+case"&":return"&amp;";
+case"'":return"&#39;";
+case'"':return"&quot;"
+}return"?"
+}return String(value).replace(/[<>&"']/g,replaceChars)
+}this.escapeHTML=escapeHTML;
+this.cropString=function(text,limit){text=text+"";
+if(!limit){var halfLimit=50
+}else{var halfLimit=limit/2
+}if(text.length>limit){return this.escapeNewLines(text.substr(0,halfLimit)+"..."+text.substr(text.length-halfLimit))
+}else{return this.escapeNewLines(text)
+}};
+this.isWhitespace=function(text){return !reNotWhitespace.exec(text)
+};
+this.safeToString=function(ob){if(this.isIE){return ob+""
+}try{if(ob&&"toString" in ob&&typeof ob.toString=="function"){return ob.toString()
+}}catch(exc){return ob+""
+}};
+this.hasProperties=function(ob){try{for(var name in ob){return true
+}}catch(exc){}return false
+};
+var reTrim=/^\s+|\s+$/g;
+this.trim=function(s){return s.replace(reTrim,"")
+};
+this.emptyFn=function(){};
+this.isVisible=function(elt){return this.getStyle(elt,"visibility")!="hidden"&&(elt.offsetWidth>0||elt.offsetHeight>0||elt.tagName in invisibleTags||elt.namespaceURI=="http://www.w3.org/2000/svg"||elt.namespaceURI=="http://www.w3.org/1998/Math/MathML")
+};
+this.collapse=function(elt,collapsed){if(this.isIElt8){if(collapsed){this.setClass(elt,"collapsed")
+}else{this.removeClass(elt,"collapsed")
+}}else{elt.setAttribute("collapsed",collapsed?"true":"false")
+}};
+this.obscure=function(elt,obscured){if(obscured){this.setClass(elt,"obscured")
+}else{this.removeClass(elt,"obscured")
+}};
+this.hide=function(elt,hidden){elt.style.visibility=hidden?"hidden":"visible"
+};
+this.clearNode=function(node){var nodeName=" "+node.nodeName.toLowerCase()+" ";
+var ignoreTags=" table tbody thead tfoot th tr td ";
+if(this.isIE&&ignoreTags.indexOf(nodeName)!=-1){this.eraseNode(node)
+}else{node.innerHTML=""
+}};
+this.eraseNode=function(node){while(node.lastChild){node.removeChild(node.lastChild)
+}};
+this.iterateWindows=function(win,handler){if(!win||!win.document){return
+}handler(win);
+if(win==top||!win.frames){return
+}for(var i=0;
+i<win.frames.length;
+++i){var subWin=win.frames[i];
+if(subWin!=win){this.iterateWindows(subWin,handler)
+}}};
+this.getRootWindow=function(win){for(;
+win;
+win=win.parent){if(!win.parent||win==win.parent||!this.instanceOf(win.parent,"Window")){return win
+}}return null
+};
+this.getClientOffset=function(elt){var addOffset=function addOffset(elt,coords,view){var p=elt.offsetParent;
+var style=isIE?elt.currentStyle:view.getComputedStyle(elt,"");
+if(elt.offsetLeft){coords.x+=elt.offsetLeft+parseInt(style.borderLeftWidth)
+}if(elt.offsetTop){coords.y+=elt.offsetTop+parseInt(style.borderTopWidth)
+}if(p){if(p.nodeType==1){addOffset(p,coords,view)
+}}else{var otherView=isIE?elt.ownerDocument.parentWindow:elt.ownerDocument.defaultView;
+if(otherView.frameElement){addOffset(otherView.frameElement,coords,otherView)
+}}};
+var isIE=this.isIE;
+var coords={x:0,y:0};
+if(elt){var view=isIE?elt.ownerDocument.parentWindow:elt.ownerDocument.defaultView;
+addOffset(elt,coords,view)
+}return coords
+};
+this.getViewOffset=function(elt,singleFrame){function addOffset(elt,coords,view){var p=elt.offsetParent;
+coords.x+=elt.offsetLeft-(p?p.scrollLeft:0);
+coords.y+=elt.offsetTop-(p?p.scrollTop:0);
+if(p){if(p.nodeType==1){var parentStyle=view.getComputedStyle(p,"");
+if(parentStyle.position!="static"){coords.x+=parseInt(parentStyle.borderLeftWidth);
+coords.y+=parseInt(parentStyle.borderTopWidth);
+if(p.localName=="TABLE"){coords.x+=parseInt(parentStyle.paddingLeft);
+coords.y+=parseInt(parentStyle.paddingTop)
+}else{if(p.localName=="BODY"){var style=view.getComputedStyle(elt,"");
+coords.x+=parseInt(style.marginLeft);
+coords.y+=parseInt(style.marginTop)
+}}}else{if(p.localName=="BODY"){coords.x+=parseInt(parentStyle.borderLeftWidth);
+coords.y+=parseInt(parentStyle.borderTopWidth)
+}}var parent=elt.parentNode;
+while(p!=parent){coords.x-=parent.scrollLeft;
+coords.y-=parent.scrollTop;
+parent=parent.parentNode
+}addOffset(p,coords,view)
+}}else{if(elt.localName=="BODY"){var style=view.getComputedStyle(elt,"");
+coords.x+=parseInt(style.borderLeftWidth);
+coords.y+=parseInt(style.borderTopWidth);
+var htmlStyle=view.getComputedStyle(elt.parentNode,"");
+coords.x-=parseInt(htmlStyle.paddingLeft);
+coords.y-=parseInt(htmlStyle.paddingTop)
+}if(elt.scrollLeft){coords.x+=elt.scrollLeft
+}if(elt.scrollTop){coords.y+=elt.scrollTop
+}var win=elt.ownerDocument.defaultView;
+if(win&&(!singleFrame&&win.frameElement)){addOffset(win.frameElement,coords,win)
+}}}var coords={x:0,y:0};
+if(elt){addOffset(elt,coords,elt.ownerDocument.defaultView)
+}return coords
+};
+this.getLTRBWH=function(elt){var bcrect,dims={left:0,top:0,right:0,bottom:0,width:0,height:0};
+if(elt){bcrect=elt.getBoundingClientRect();
+dims.left=bcrect.left;
+dims.top=bcrect.top;
+dims.right=bcrect.right;
+dims.bottom=bcrect.bottom;
+if(bcrect.width){dims.width=bcrect.width;
+dims.height=bcrect.height
+}else{dims.width=dims.right-dims.left;
+dims.height=dims.bottom-dims.top
+}}return dims
+};
+this.applyBodyOffsets=function(elt,clientRect){var od=elt.ownerDocument;
+if(!od.body){return clientRect
+}var style=od.defaultView.getComputedStyle(od.body,null);
+var pos=style.getPropertyValue("position");
+if(pos==="absolute"||pos==="relative"){var borderLeft=parseInt(style.getPropertyValue("border-left-width").replace("px",""),10)||0;
+var borderTop=parseInt(style.getPropertyValue("border-top-width").replace("px",""),10)||0;
+var paddingLeft=parseInt(style.getPropertyValue("padding-left").replace("px",""),10)||0;
+var paddingTop=parseInt(style.getPropertyValue("padding-top").replace("px",""),10)||0;
+var marginLeft=parseInt(style.getPropertyValue("margin-left").replace("px",""),10)||0;
+var marginTop=parseInt(style.getPropertyValue("margin-top").replace("px",""),10)||0;
+var offsetX=borderLeft+paddingLeft+marginLeft;
+var offsetY=borderTop+paddingTop+marginTop;
+clientRect.left-=offsetX;
+clientRect.top-=offsetY;
+clientRect.right-=offsetX;
+clientRect.bottom-=offsetY
+}return clientRect
+};
+this.getOffsetSize=function(elt){return{width:elt.offsetWidth,height:elt.offsetHeight}
+};
+this.getOverflowParent=function(element){for(var scrollParent=element.parentNode;
+scrollParent;
+scrollParent=scrollParent.offsetParent){if(scrollParent.scrollHeight>scrollParent.offsetHeight){return scrollParent
+}}};
+this.isScrolledToBottom=function(element){var onBottom=(element.scrollTop+element.offsetHeight)==element.scrollHeight;
+if(FBTrace.DBG_CONSOLE){FBTrace.sysout("isScrolledToBottom offsetHeight: "+element.offsetHeight+" onBottom:"+onBottom)
+}return onBottom
+};
+this.scrollToBottom=function(element){element.scrollTop=element.scrollHeight;
+if(FBTrace.DBG_CONSOLE){FBTrace.sysout("scrollToBottom reset scrollTop "+element.scrollTop+" = "+element.scrollHeight);
+if(element.scrollHeight==element.offsetHeight){FBTrace.sysout("scrollToBottom attempt to scroll non-scrollable element "+element,element)
+}}return(element.scrollTop==element.scrollHeight)
+};
+this.move=function(element,x,y){element.style.left=x+"px";
+element.style.top=y+"px"
+};
+this.resize=function(element,w,h){element.style.width=w+"px";
+element.style.height=h+"px"
+};
+this.linesIntoCenterView=function(element,scrollBox){if(!scrollBox){scrollBox=this.getOverflowParent(element)
+}if(!scrollBox){return
+}var offset=this.getClientOffset(element);
+var topSpace=offset.y-scrollBox.scrollTop;
+var bottomSpace=(scrollBox.scrollTop+scrollBox.clientHeight)-(offset.y+element.offsetHeight);
+if(topSpace<0||bottomSpace<0){var split=(scrollBox.clientHeight/2);
+var centerY=offset.y-split;
+scrollBox.scrollTop=centerY;
+topSpace=split;
+bottomSpace=split-element.offsetHeight
+}return{before:Math.round((topSpace/element.offsetHeight)+0.5),after:Math.round((bottomSpace/element.offsetHeight)+0.5)}
+};
+this.scrollIntoCenterView=function(element,scrollBox,notX,notY){if(!element){return
+}if(!scrollBox){scrollBox=this.getOverflowParent(element)
+}if(!scrollBox){return
+}var offset=this.getClientOffset(element);
+if(!notY){var topSpace=offset.y-scrollBox.scrollTop;
+var bottomSpace=(scrollBox.scrollTop+scrollBox.clientHeight)-(offset.y+element.offsetHeight);
+if(topSpace<0||bottomSpace<0){var centerY=offset.y-(scrollBox.clientHeight/2);
+scrollBox.scrollTop=centerY
+}}if(!notX){var leftSpace=offset.x-scrollBox.scrollLeft;
+var rightSpace=(scrollBox.scrollLeft+scrollBox.clientWidth)-(offset.x+element.clientWidth);
+if(leftSpace<0||rightSpace<0){var centerX=offset.x-(scrollBox.clientWidth/2);
+scrollBox.scrollLeft=centerX
+}}if(FBTrace.DBG_SOURCEFILES){FBTrace.sysout("lib.scrollIntoCenterView ","Element:"+element.innerHTML)
+}};
+var cssKeywordMap=null;
+var cssPropNames=null;
+var cssColorNames=null;
+var imageRules=null;
+this.getCSSKeywordsByProperty=function(propName){if(!cssKeywordMap){cssKeywordMap={};
+for(var name in this.cssInfo){var list=[];
+var types=this.cssInfo[name];
+for(var i=0;
+i<types.length;
+++i){var keywords=this.cssKeywords[types[i]];
+if(keywords){list.push.apply(list,keywords)
+}}cssKeywordMap[name]=list
+}}return propName in cssKeywordMap?cssKeywordMap[propName]:[]
+};
+this.getCSSPropertyNames=function(){if(!cssPropNames){cssPropNames=[];
+for(var name in this.cssInfo){cssPropNames.push(name)
+}}return cssPropNames
+};
+this.isColorKeyword=function(keyword){if(keyword=="transparent"){return false
+}if(!cssColorNames){cssColorNames=[];
+var colors=this.cssKeywords.color;
+for(var i=0;
+i<colors.length;
+++i){cssColorNames.push(colors[i].toLowerCase())
+}var systemColors=this.cssKeywords.systemColor;
+for(var i=0;
+i<systemColors.length;
+++i){cssColorNames.push(systemColors[i].toLowerCase())
+}}return cssColorNames.indexOf(keyword.toLowerCase())!=-1
+};
+this.isImageRule=function(rule){if(!imageRules){imageRules=[];
+for(var i in this.cssInfo){var r=i.toLowerCase();
+var suffix="image";
+if(r.match(suffix+"$")==suffix||r=="background"){imageRules.push(r)
+}}}return imageRules.indexOf(rule.toLowerCase())!=-1
+};
+this.copyTextStyles=function(fromNode,toNode,style){var view=this.isIE?fromNode.ownerDocument.parentWindow:fromNode.ownerDocument.defaultView;
+if(view){if(!style){style=this.isIE?fromNode.currentStyle:view.getComputedStyle(fromNode,"")
+}toNode.style.fontFamily=style.fontFamily;
+toNode.style.fontSize=style.fontSize;
+toNode.style.fontWeight=style.fontWeight;
+toNode.style.fontStyle=style.fontStyle;
+return style
+}};
+this.copyBoxStyles=function(fromNode,toNode,style){var view=this.isIE?fromNode.ownerDocument.parentWindow:fromNode.ownerDocument.defaultView;
+if(view){if(!style){style=this.isIE?fromNode.currentStyle:view.getComputedStyle(fromNode,"")
+}toNode.style.marginTop=style.marginTop;
+toNode.style.marginRight=style.marginRight;
+toNode.style.marginBottom=style.marginBottom;
+toNode.style.marginLeft=style.marginLeft;
+toNode.style.borderTopWidth=style.borderTopWidth;
+toNode.style.borderRightWidth=style.borderRightWidth;
+toNode.style.borderBottomWidth=style.borderBottomWidth;
+toNode.style.borderLeftWidth=style.borderLeftWidth;
+return style
+}};
+this.readBoxStyles=function(style){var styleNames={"margin-top":"marginTop","margin-right":"marginRight","margin-left":"marginLeft","margin-bottom":"marginBottom","border-top-width":"borderTop","border-right-width":"borderRight","border-left-width":"borderLeft","border-bottom-width":"borderBottom","padding-top":"paddingTop","padding-right":"paddingRight","padding-left":"paddingLeft","padding-bottom":"paddingBottom","z-index":"zIndex"};
+var styles={};
+for(var styleName in styleNames){styles[styleNames[styleName]]=parseInt(style.getPropertyCSSValue(styleName).cssText)||0
+}if(FBTrace.DBG_INSPECT){FBTrace.sysout("readBoxStyles ",styles)
+}return styles
+};
+this.getBoxFromStyles=function(style,element){var args=this.readBoxStyles(style);
+args.width=element.offsetWidth-(args.paddingLeft+args.paddingRight+args.borderLeft+args.borderRight);
+args.height=element.offsetHeight-(args.paddingTop+args.paddingBottom+args.borderTop+args.borderBottom);
+return args
+};
+this.getElementCSSSelector=function(element){var label=element.localName.toLowerCase();
+if(element.id){label+="#"+element.id
+}if(element.hasAttribute("class")){label+="."+element.getAttribute("class").split(" ")[0]
+}return label
+};
+this.getURLForStyleSheet=function(styleSheet){return(styleSheet.href?styleSheet.href:styleSheet.ownerNode.ownerDocument.URL)
+};
+this.getDocumentForStyleSheet=function(styleSheet){while(styleSheet.parentStyleSheet&&!styleSheet.ownerNode){styleSheet=styleSheet.parentStyleSheet
+}if(styleSheet.ownerNode){return styleSheet.ownerNode.ownerDocument
+}};
+this.getInstanceForStyleSheet=function(styleSheet,ownerDocument){if(FBL.isSystemStyleSheet(styleSheet)){return 0
+}if(FBTrace.DBG_CSS){FBTrace.sysout("getInstanceForStyleSheet: "+styleSheet.href+" "+styleSheet.media.mediaText+" "+(styleSheet.ownerNode&&FBL.getElementXPath(styleSheet.ownerNode)),ownerDocument)
+}ownerDocument=ownerDocument||FBL.getDocumentForStyleSheet(styleSheet);
+var ret=0,styleSheets=ownerDocument.styleSheets,href=styleSheet.href;
+for(var i=0;
+i<styleSheets.length;
+i++){var curSheet=styleSheets[i];
+if(FBTrace.DBG_CSS){FBTrace.sysout("getInstanceForStyleSheet: compare href "+i+" "+curSheet.href+" "+curSheet.media.mediaText+" "+(curSheet.ownerNode&&FBL.getElementXPath(curSheet.ownerNode)))
+}if(curSheet==styleSheet){break
+}if(curSheet.href==href){ret++
+}}return ret
+};
+this.hasClass=function(node,name){if(!node||node.nodeType!=1){return false
+}else{for(var i=1;
+i<arguments.length;
+++i){var name=arguments[i];
+var re=new RegExp("(^|\\s)"+name+"($|\\s)");
+if(!re.exec(node.className)){return false
+}}return true
+}};
+this.setClass=function(node,name){if(node&&!this.hasClass(node,name)){node.className+=" "+name
+}};
+this.getClassValue=function(node,name){var re=new RegExp(name+"-([^ ]+)");
+var m=re.exec(node.className);
+return m?m[1]:""
+};
+this.removeClass=function(node,name){if(node&&node.className){var index=node.className.indexOf(name);
+if(index>=0){var size=name.length;
+node.className=node.className.substr(0,index-1)+node.className.substr(index+size)
+}}};
+this.toggleClass=function(elt,name){if(this.hasClass(elt,name)){this.removeClass(elt,name)
+}else{this.setClass(elt,name)
+}};
+this.setClassTimed=function(elt,name,context,timeout){if(!timeout){timeout=1300
+}if(elt.__setClassTimeout){context.clearTimeout(elt.__setClassTimeout)
+}else{this.setClass(elt,name)
+}elt.__setClassTimeout=context.setTimeout(function(){delete elt.__setClassTimeout;
+FBL.removeClass(elt,name)
+},timeout)
+};
+this.cancelClassTimed=function(elt,name,context){if(elt.__setClassTimeout){FBL.removeClass(elt,name);
+context.clearTimeout(elt.__setClassTimeout);
+delete elt.__setClassTimeout
+}};
+this.$=function(id,doc){if(doc){return doc.getElementById(id)
+}else{return FBL.Firebug.chrome.document.getElementById(id)
+}};
+this.$$=function(selector,doc){if(doc||!FBL.Firebug.chrome){return FBL.Firebug.Selector(selector,doc)
+}else{return FBL.Firebug.Selector(selector,FBL.Firebug.chrome.document)
+}};
+this.getChildByClass=function(node){for(var i=1;
+i<arguments.length;
+++i){var className=arguments[i];
+var child=node.firstChild;
+node=null;
+for(;
+child;
+child=child.nextSibling){if(this.hasClass(child,className)){node=child;
+break
+}}}return node
+};
+this.getAncestorByClass=function(node,className){for(var parent=node;
+parent;
+parent=parent.parentNode){if(this.hasClass(parent,className)){return parent
+}}return null
+};
+this.getElementsByClass=function(node,className){var result=[];
+for(var child=node.firstChild;
+child;
+child=child.nextSibling){if(this.hasClass(child,className)){result.push(child)
+}}return result
+};
+this.getElementByClass=function(node,className){var args=cloneArray(arguments);
+args.splice(0,1);
+for(var child=node.firstChild;
+child;
+child=child.nextSibling){var args1=cloneArray(args);
+args1.unshift(child);
+if(FBL.hasClass.apply(null,args1)){return child
+}else{var found=FBL.getElementByClass.apply(null,args1);
+if(found){return found
+}}}return null
+};
+this.isAncestor=function(node,potentialAncestor){for(var parent=node;
+parent;
+parent=parent.parentNode){if(parent==potentialAncestor){return true
+}}return false
+};
+this.getNextElement=function(node){while(node&&node.nodeType!=1){node=node.nextSibling
+}return node
+};
+this.getPreviousElement=function(node){while(node&&node.nodeType!=1){node=node.previousSibling
+}return node
+};
+this.getBody=function(doc){if(doc.body){return doc.body
+}var body=doc.getElementsByTagName("body")[0];
+if(body){return body
+}return doc.firstChild
+};
+this.findNextDown=function(node,criteria){if(!node){return null
+}for(var child=node.firstChild;
+child;
+child=child.nextSibling){if(criteria(child)){return child
+}var next=this.findNextDown(child,criteria);
+if(next){return next
+}}};
+this.findPreviousUp=function(node,criteria){if(!node){return null
+}for(var child=node.lastChild;
+child;
+child=child.previousSibling){var next=this.findPreviousUp(child,criteria);
+if(next){return next
+}if(criteria(child)){return child
+}}};
+this.findNext=function(node,criteria,upOnly,maxRoot){if(!node){return null
+}if(!upOnly){var next=this.findNextDown(node,criteria);
+if(next){return next
+}}for(var sib=node.nextSibling;
+sib;
+sib=sib.nextSibling){if(criteria(sib)){return sib
+}var next=this.findNextDown(sib,criteria);
+if(next){return next
+}}if(node.parentNode&&node.parentNode!=maxRoot){return this.findNext(node.parentNode,criteria,true)
+}};
+this.findPrevious=function(node,criteria,downOnly,maxRoot){if(!node){return null
+}for(var sib=node.previousSibling;
+sib;
+sib=sib.previousSibling){var prev=this.findPreviousUp(sib,criteria);
+if(prev){return prev
+}if(criteria(sib)){return sib
+}}if(!downOnly){var next=this.findPreviousUp(node,criteria);
+if(next){return next
+}}if(node.parentNode&&node.parentNode!=maxRoot){if(criteria(node.parentNode)){return node.parentNode
+}return this.findPrevious(node.parentNode,criteria,true)
+}};
+this.getNextByClass=function(root,state){var iter=function iter(node){return node.nodeType==1&&FBL.hasClass(node,state)
+};
+return this.findNext(root,iter)
+};
+this.getPreviousByClass=function(root,state){var iter=function iter(node){return node.nodeType==1&&FBL.hasClass(node,state)
+};
+return this.findPrevious(root,iter)
+};
+this.isElement=function(o){try{return o&&this.instanceOf(o,"Element")
+}catch(ex){return false
+}};
+this.createElement=function(tagName,properties){properties=properties||{};
+var doc=properties.document||FBL.Firebug.chrome.document;
+var element=doc.createElement(tagName);
+for(var name in properties){if(name!="document"){element[name]=properties[name]
+}}return element
+};
+this.createGlobalElement=function(tagName,properties){properties=properties||{};
+var doc=FBL.Env.browser.document;
+var element=this.NS&&doc.createElementNS?doc.createElementNS(FBL.NS,tagName):doc.createElement(tagName);
+for(var name in properties){var propname=name;
+if(FBL.isIE&&name=="class"){propname="className"
+}if(name!="document"){element.setAttribute(propname,properties[name])
+}}return element
+};
+this.isLeftClick=function(event){return(this.isIE&&event.type!="click"&&event.type!="dblclick"?event.button==1:event.button==0)&&this.noKeyModifiers(event)
+};
+this.isMiddleClick=function(event){return(this.isIE&&event.type!="click"&&event.type!="dblclick"?event.button==4:event.button==1)&&this.noKeyModifiers(event)
+};
+this.isRightClick=function(event){return(this.isIE&&event.type!="click"&&event.type!="dblclick"?event.button==2:event.button==2)&&this.noKeyModifiers(event)
+};
+this.noKeyModifiers=function(event){return !event.ctrlKey&&!event.shiftKey&&!event.altKey&&!event.metaKey
+};
+this.isControlClick=function(event){return(this.isIE&&event.type!="click"&&event.type!="dblclick"?event.button==1:event.button==0)&&this.isControl(event)
+};
+this.isShiftClick=function(event){return(this.isIE&&event.type!="click"&&event.type!="dblclick"?event.button==1:event.button==0)&&this.isShift(event)
+};
+this.isControl=function(event){return(event.metaKey||event.ctrlKey)&&!event.shiftKey&&!event.altKey
+};
+this.isAlt=function(event){return event.altKey&&!event.ctrlKey&&!event.shiftKey&&!event.metaKey
+};
+this.isAltClick=function(event){return(this.isIE&&event.type!="click"&&event.type!="dblclick"?event.button==1:event.button==0)&&this.isAlt(event)
+};
+this.isControlShift=function(event){return(event.metaKey||event.ctrlKey)&&event.shiftKey&&!event.altKey
+};
+this.isShift=function(event){return event.shiftKey&&!event.metaKey&&!event.ctrlKey&&!event.altKey
+};
+this.addEvent=function(object,name,handler){if(object.addEventListener){object.addEventListener(name,handler,false)
+}else{object.attachEvent("on"+name,handler)
+}};
+this.removeEvent=function(object,name,handler){try{if(object.removeEventListener){object.removeEventListener(name,handler,false)
+}else{object.detachEvent("on"+name,handler)
+}}catch(e){if(FBTrace.DBG_ERRORS){FBTrace.sysout("FBL.removeEvent error: ",object,name)
+}}};
+this.cancelEvent=function(e,preventDefault){if(!e){return
+}if(preventDefault){if(e.preventDefault){e.preventDefault()
+}else{e.returnValue=false
+}}if(e.stopPropagation){e.stopPropagation()
+}else{e.cancelBubble=true
+}};
+this.addGlobalEvent=function(name,handler){var doc=this.Firebug.browser.document;
+var frames=this.Firebug.browser.window.frames;
+this.addEvent(doc,name,handler);
+if(this.Firebug.chrome.type=="popup"){this.addEvent(this.Firebug.chrome.document,name,handler)
+}for(var i=0,frame;
+frame=frames[i];
+i++){try{this.addEvent(frame.document,name,handler)
+}catch(E){}}};
+this.removeGlobalEvent=function(name,handler){var doc=this.Firebug.browser.document;
+var frames=this.Firebug.browser.window.frames;
+this.removeEvent(doc,name,handler);
+if(this.Firebug.chrome.type=="popup"){this.removeEvent(this.Firebug.chrome.document,name,handler)
+}for(var i=0,frame;
+frame=frames[i];
+i++){try{this.removeEvent(frame.document,name,handler)
+}catch(E){}}};
+this.dispatch=function(listeners,name,args){if(!listeners){return
+}try{if(typeof listeners.length!="undefined"){if(FBTrace.DBG_DISPATCH){FBTrace.sysout("FBL.dispatch",name+" to "+listeners.length+" listeners")
+}for(var i=0;
+i<listeners.length;
+++i){var listener=listeners[i];
+if(listener[name]){listener[name].apply(listener,args)
+}}}else{if(FBTrace.DBG_DISPATCH){FBTrace.sysout("FBL.dispatch",name+" to listeners of an object")
+}for(var prop in listeners){var listener=listeners[prop];
+if(listener[name]){listener[name].apply(listener,args)
+}}}}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout(" Exception in lib.dispatch "+name,exc)
+}}};
+var disableTextSelectionHandler=function(event){FBL.cancelEvent(event,true);
+return false
+};
+this.disableTextSelection=function(e){if(typeof e.onselectstart!="undefined"){this.addEvent(e,"selectstart",disableTextSelectionHandler)
+}else{e.style.cssText="user-select: none; -khtml-user-select: none; -moz-user-select: none;";
+if(!this.isFirefox){this.addEvent(e,"mousedown",disableTextSelectionHandler)
+}}e.style.cursor="default"
+};
+this.restoreTextSelection=function(e){if(typeof e.onselectstart!="undefined"){this.removeEvent(e,"selectstart",disableTextSelectionHandler)
+}else{e.style.cssText="cursor: default;";
+if(!this.isFirefox){this.removeEvent(e,"mousedown",disableTextSelectionHandler)
+}}};
+var eventTypes={composition:["composition","compositionstart","compositionend"],contextmenu:["contextmenu"],drag:["dragenter","dragover","dragexit","dragdrop","draggesture"],focus:["focus","blur"],form:["submit","reset","change","select","input"],key:["keydown","keyup","keypress"],load:["load","beforeunload","unload","abort","error"],mouse:["mousedown","mouseup","click","dblclick","mouseover","mouseout","mousemove"],mutation:["DOMSubtreeModified","DOMNodeInserted","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","DOMAttrModified","DOMCharacterDataModified"],paint:["paint","resize","scroll"],scroll:["overflow","underflow","overflowchanged"],text:["text"],ui:["DOMActivate","DOMFocusIn","DOMFocusOut"],xul:["popupshowing","popupshown","popuphiding","popuphidden","close","command","broadcast","commandupdate"]};
+this.getEventFamily=function(eventType){if(!this.families){this.families={};
+for(var family in eventTypes){var types=eventTypes[family];
+for(var i=0;
+i<types.length;
+++i){this.families[types[i]]=family
+}}}return this.families[eventType]
+};
+this.getFileName=function(url){var split=this.splitURLBase(url);
+return split.name
+};
+this.splitURLBase=function(url){if(this.isDataURL(url)){return this.splitDataURL(url)
+}return this.splitURLTrue(url)
+};
+this.splitDataURL=function(url){var mark=url.indexOf(":",3);
+if(mark!=4){return false
+}var point=url.indexOf(",",mark+1);
+if(point<mark){return false
+}var props={encodedContent:url.substr(point+1)};
+var metadataBuffer=url.substr(mark+1,point);
+var metadata=metadataBuffer.split(";");
+for(var i=0;
+i<metadata.length;
+i++){var nv=metadata[i].split("=");
+if(nv.length==2){props[nv[0]]=nv[1]
+}}if(props.hasOwnProperty("fileName")){var caller_URL=decodeURIComponent(props.fileName);
+var caller_split=this.splitURLTrue(caller_URL);
+if(props.hasOwnProperty("baseLineNumber")){props.path=caller_split.path;
+props.line=props.baseLineNumber;
+var hint=decodeURIComponent(props.encodedContent.substr(0,200)).replace(/\s*$/,"");
+props.name="eval->"+hint
+}else{props.name=caller_split.name;
+props.path=caller_split.path
+}}else{if(!props.hasOwnProperty("path")){props.path="data:"
+}if(!props.hasOwnProperty("name")){props.name=decodeURIComponent(props.encodedContent.substr(0,200)).replace(/\s*$/,"")
+}}return props
+};
+this.splitURLTrue=function(url){var m=reSplitFile.exec(url);
+if(!m){return{name:url,path:url}
+}else{if(!m[2]){return{path:m[1],name:m[1]}
+}else{return{path:m[1],name:m[2]+m[3]}
+}}};
+this.getFileExtension=function(url){var lastDot=url.lastIndexOf(".");
+return url.substr(lastDot+1)
+};
+this.isSystemURL=function(url){if(!url){return true
+}if(url.length==0){return true
+}if(url[0]=="h"){return false
+}if(url.substr(0,9)=="resource:"){return true
+}else{if(url.substr(0,16)=="chrome://firebug"){return true
+}else{if(url=="XPCSafeJSObjectWrapper.cpp"){return true
+}else{if(url.substr(0,6)=="about:"){return true
+}else{if(url.indexOf("firebug-service.js")!=-1){return true
+}else{return false
+}}}}}};
+this.isSystemPage=function(win){try{var doc=win.document;
+if(!doc){return false
+}if((doc.styleSheets.length&&doc.styleSheets[0].href=="chrome://global/content/xml/XMLPrettyPrint.css")||(doc.styleSheets.length>1&&doc.styleSheets[1].href=="chrome://browser/skin/feeds/subscribe.css")){return true
+}return FBL.isSystemURL(win.location.href)
+}catch(exc){ERROR("tabWatcher.isSystemPage document not ready:"+exc);
+return false
+}};
+this.isSystemStyleSheet=function(sheet){var href=sheet&&sheet.href;
+return href&&FBL.isSystemURL(href)
+};
+this.getURIHost=function(uri){try{if(uri){return uri.host
+}else{return""
+}}catch(exc){return""
+}};
+this.isLocalURL=function(url){if(url.substr(0,5)=="file:"){return true
+}else{if(url.substr(0,8)=="wyciwyg:"){return true
+}else{return false
+}}};
+this.isDataURL=function(url){return(url&&url.substr(0,5)=="data:")
+};
+this.getLocalPath=function(url){if(this.isLocalURL(url)){var fileHandler=ioService.getProtocolHandler("file").QueryInterface(Ci.nsIFileProtocolHandler);
+var file=fileHandler.getFileFromURLSpec(url);
+return file.path
+}};
+this.getURLFromLocalFile=function(file){var fileHandler=ioService.getProtocolHandler("file").QueryInterface(Ci.nsIFileProtocolHandler);
+var URL=fileHandler.getURLSpecFromFile(file);
+return URL
+};
+this.getDataURLForContent=function(content,url){var uri="data:text/html;";
+uri+="fileName="+encodeURIComponent(url)+",";
+uri+=encodeURIComponent(content);
+return uri
+},this.getDomain=function(url){var m=/[^:]+:\/{1,3}([^\/]+)/.exec(url);
+return m?m[1]:""
+};
+this.getURLPath=function(url){var m=/[^:]+:\/{1,3}[^\/]+(\/.*?)$/.exec(url);
+return m?m[1]:""
+};
+this.getPrettyDomain=function(url){var m=/[^:]+:\/{1,3}(www\.)?([^\/]+)/.exec(url);
+return m?m[2]:""
+};
+this.absoluteURL=function(url,baseURL){return this.absoluteURLWithDots(url,baseURL).replace("/./","/","g")
+};
+this.absoluteURLWithDots=function(url,baseURL){if(url[0]=="?"){return baseURL+url
+}var reURL=/(([^:]+:)\/{1,2}[^\/]*)(.*?)$/;
+var m=reURL.exec(url);
+if(m){return url
+}var m=reURL.exec(baseURL);
+if(!m){return""
+}var head=m[1];
+var tail=m[3];
+if(url.substr(0,2)=="//"){return m[2]+url
+}else{if(url[0]=="/"){return head+url
+}else{if(tail[tail.length-1]=="/"){return baseURL+url
+}else{var parts=tail.split("/");
+return head+parts.slice(0,parts.length-1).join("/")+"/"+url
+}}}};
+this.normalizeURL=function(url){if(!url){return""
+}if(url.length<255){url=url.replace(/[^\/]+\/\.\.\//,"","g");
+url=url.replace(/#.*/,"");
+url=url.replace(/file:\/([^\/])/g,"file:///$1");
+if(url.indexOf("chrome:")==0){var m=reChromeCase.exec(url);
+if(m){url="chrome://"+m[1].toLowerCase()+"/"+m[2]
+}}}return url
+};
+this.denormalizeURL=function(url){return url.replace(/file:\/\/\//g,"file:/")
+};
+this.parseURLParams=function(url){var q=url?url.indexOf("?"):-1;
+if(q==-1){return[]
+}var search=url.substr(q+1);
+var h=search.lastIndexOf("#");
+if(h!=-1){search=search.substr(0,h)
+}if(!search){return[]
+}return this.parseURLEncodedText(search)
+};
+this.parseURLEncodedText=function(text){var maxValueLength=25000;
+var params=[];
+text=text.replace(/\+/g," ");
+var args=text.split("&");
+for(var i=0;
+i<args.length;
+++i){try{var parts=args[i].split("=");
+if(parts.length==2){if(parts[1].length>maxValueLength){parts[1]=this.$STR("LargeData")
+}params.push({name:decodeURIComponent(parts[0]),value:decodeURIComponent(parts[1])})
+}else{params.push({name:decodeURIComponent(parts[0]),value:""})
+}}catch(e){if(FBTrace.DBG_ERRORS){FBTrace.sysout("parseURLEncodedText EXCEPTION ",e);
+FBTrace.sysout("parseURLEncodedText EXCEPTION URI",args[i])
+}}}params.sort(function(a,b){return a.name<=b.name?-1:1
+});
+return params
+};
+this.parseURLParamsArray=function(url){var q=url?url.indexOf("?"):-1;
+if(q==-1){return[]
+}var search=url.substr(q+1);
+var h=search.lastIndexOf("#");
+if(h!=-1){search=search.substr(0,h)
+}if(!search){return[]
+}return this.parseURLEncodedTextArray(search)
+};
+this.parseURLEncodedTextArray=function(text){var maxValueLength=25000;
+var params=[];
+text=text.replace(/\+/g," ");
+var args=text.split("&");
+for(var i=0;
+i<args.length;
+++i){try{var parts=args[i].split("=");
+if(parts.length==2){if(parts[1].length>maxValueLength){parts[1]=this.$STR("LargeData")
+}params.push({name:decodeURIComponent(parts[0]),value:[decodeURIComponent(parts[1])]})
+}else{params.push({name:decodeURIComponent(parts[0]),value:[""]})
+}}catch(e){if(FBTrace.DBG_ERRORS){FBTrace.sysout("parseURLEncodedText EXCEPTION ",e);
+FBTrace.sysout("parseURLEncodedText EXCEPTION URI",args[i])
+}}}params.sort(function(a,b){return a.name<=b.name?-1:1
+});
+return params
+};
+this.reEncodeURL=function(file,text){var lines=text.split("\n");
+var params=this.parseURLEncodedText(lines[lines.length-1]);
+var args=[];
+for(var i=0;
+i<params.length;
+++i){args.push(encodeURIComponent(params[i].name)+"="+encodeURIComponent(params[i].value))
+}var url=file.href;
+url+=(url.indexOf("?")==-1?"?":"&")+args.join("&");
+return url
+};
+this.getResource=function(aURL){try{var channel=ioService.newChannel(aURL,null,null);
+var input=channel.open();
+return FBL.readFromStream(input)
+}catch(e){if(FBTrace.DBG_ERRORS){FBTrace.sysout("lib.getResource FAILS for "+aURL,e)
+}}};
+this.parseJSONString=function(jsonString,originURL){var regex=new RegExp(/^\/\*-secure-([\s\S]*)\*\/\s*$/);
+var matches=regex.exec(jsonString);
+if(matches){jsonString=matches[1];
+if(jsonString[0]=="\\"&&jsonString[1]=="n"){jsonString=jsonString.substr(2)
+}if(jsonString[jsonString.length-2]=="\\"&&jsonString[jsonString.length-1]=="n"){jsonString=jsonString.substr(0,jsonString.length-2)
+}}if(jsonString.indexOf("&&&START&&&")){regex=new RegExp(/&&&START&&& (.+) &&&END&&&/);
+matches=regex.exec(jsonString);
+if(matches){jsonString=matches[1]
+}}jsonString="("+jsonString+")";
+var jsonObject=null;
+try{jsonObject=Firebug.context.evaluate(jsonString,null,null,function(){return null
+})
+}catch(e){if(FBTrace.DBG_ERRORS||FBTrace.DBG_JSONVIEWER){FBTrace.sysout("jsonviewer.parseJSON EXCEPTION",e)
+}return null
+}return jsonObject
+};
+this.objectToString=function(object){try{return object+""
+}catch(exc){return null
+}};
+this.setSelectionRange=function(input,start,length){if(input.createTextRange){var range=input.createTextRange();
+range.moveStart("character",start);
+range.moveEnd("character",length-input.value.length);
+range.select()
+}else{if(input.setSelectionRange){input.setSelectionRange(start,length);
+input.focus()
+}}};
+this.getInputSelectionStart=function(input){if(document.selection){var range=input.ownerDocument.selection.createRange();
+var text=range.text;
+if(text){return input.value.indexOf(text)
+}else{range.moveStart("character",-input.value.length);
+return range.text.length
+}}else{if(typeof input.selectionStart!="undefined"){return input.selectionStart
+}}return 0
+};
+function onOperaTabBlur(e){if(this.lastKey==9){this.focus()
+}}function onOperaTabKeyDown(e){this.lastKey=e.keyCode
+}function onOperaTabFocus(e){this.lastKey=null
+}this.fixOperaTabKey=function(el){el.onfocus=onOperaTabFocus;
+el.onblur=onOperaTabBlur;
+el.onkeydown=onOperaTabKeyDown
+};
+this.Property=function(object,name){this.object=object;
+this.name=name;
+this.getObject=function(){return object[name]
+}
+};
+this.ErrorCopy=function(message){this.message=message
+};
+function EventCopy(event){for(var name in event){try{this[name]=event[name]
+}catch(exc){}}}this.EventCopy=EventCopy;
+var toString=Object.prototype.toString;
+var reFunction=/^\s*function(\s+[\w_$][\w\d_$]*)?\s*\(/;
+this.isArray=function(object){return toString.call(object)==="[object Array]"
+};
+this.isFunction=function(object){if(!object){return false
+}return toString.call(object)==="[object Function]"||this.isIE&&typeof object!="string"&&reFunction.test(""+object)
+};
+this.instanceOf=function(object,className){if(!object||typeof object!="object"){return false
+}if(object.ownerDocument){var win=object.ownerDocument.defaultView||object.ownerDocument.parentWindow;
+if(className in win){return object instanceof win[className]
+}}else{var win=Firebug.browser.window;
+if(className in win){return object instanceof win[className]
+}}var cache=instanceCheckMap[className];
+if(!cache){return false
+}for(var n in cache){var obj=cache[n];
+var type=typeof obj;
+obj=type=="object"?obj:[obj];
+for(var name in obj){var value=obj[name];
+if(n=="property"&&!(value in object)||n=="method"&&!this.isFunction(object[value])||n=="value"&&(""+object[name]).toLowerCase()!=(""+value).toLowerCase()){return false
+}}}return true
+};
+var instanceCheckMap={Window:{property:["window","document"],method:"setTimeout"},Document:{property:["body","cookie"],method:"getElementById"},Node:{property:"ownerDocument",method:"appendChild"},Element:{property:"tagName",value:{nodeType:1}},Location:{property:["hostname","protocol"],method:"assign"},HTMLImageElement:{property:"useMap",value:{nodeType:1,tagName:"img"}},HTMLAnchorElement:{property:"hreflang",value:{nodeType:1,tagName:"a"}},HTMLInputElement:{property:"form",value:{nodeType:1,tagName:"input"}},HTMLButtonElement:{},HTMLFormElement:{method:"submit",value:{nodeType:1,tagName:"form"}},HTMLBodyElement:{},HTMLHtmlElement:{},CSSStyleRule:{property:["selectorText","style"]}};
+var domMemberMap2={};
+var domMemberMap2Sandbox=null;
+var getDomMemberMap2=function(name){if(!domMemberMap2Sandbox){var doc=Firebug.chrome.document;
+var frame=doc.createElement("iframe");
+frame.id="FirebugSandbox";
+frame.style.display="none";
+frame.src="about:blank";
+doc.body.appendChild(frame);
+domMemberMap2Sandbox=frame.window||frame.contentWindow
+}var props=[];
+var object=null;
+if(name=="Window"){object=domMemberMap2Sandbox.window
+}else{if(name=="Document"){object=domMemberMap2Sandbox.document
+}else{if(name=="HTMLScriptElement"){object=domMemberMap2Sandbox.document.createElement("script")
+}else{if(name=="HTMLAnchorElement"){object=domMemberMap2Sandbox.document.createElement("a")
+}else{if(name.indexOf("Element")!=-1){object=domMemberMap2Sandbox.document.createElement("div")
+}}}}}if(object){for(var n in object){props.push(n)
+}}return props;
+return extendArray(props,domMemberMap[name])
+};
+this.getDOMMembers=function(object){if(!domMemberCache){FBL.domMemberCache=domMemberCache={};
+for(var name in domMemberMap){var builtins=getDomMemberMap2(name);
+var cache=domMemberCache[name]={};
+for(var i=0;
+i<builtins.length;
+++i){cache[builtins[i]]=i
+}}}try{if(this.instanceOf(object,"Window")){return domMemberCache.Window
+}else{if(this.instanceOf(object,"Document")||this.instanceOf(object,"XMLDocument")){return domMemberCache.Document
+}else{if(this.instanceOf(object,"Location")){return domMemberCache.Location
+}else{if(this.instanceOf(object,"HTMLImageElement")){return domMemberCache.HTMLImageElement
+}else{if(this.instanceOf(object,"HTMLAnchorElement")){return domMemberCache.HTMLAnchorElement
+}else{if(this.instanceOf(object,"HTMLInputElement")){return domMemberCache.HTMLInputElement
+}else{if(this.instanceOf(object,"HTMLButtonElement")){return domMemberCache.HTMLButtonElement
+}else{if(this.instanceOf(object,"HTMLFormElement")){return domMemberCache.HTMLFormElement
+}else{if(this.instanceOf(object,"HTMLBodyElement")){return domMemberCache.HTMLBodyElement
+}else{if(this.instanceOf(object,"HTMLHtmlElement")){return domMemberCache.HTMLHtmlElement
+}else{if(this.instanceOf(object,"HTMLScriptElement")){return domMemberCache.HTMLScriptElement
+}else{if(this.instanceOf(object,"HTMLTableElement")){return domMemberCache.HTMLTableElement
+}else{if(this.instanceOf(object,"HTMLTableRowElement")){return domMemberCache.HTMLTableRowElement
+}else{if(this.instanceOf(object,"HTMLTableCellElement")){return domMemberCache.HTMLTableCellElement
+}else{if(this.instanceOf(object,"HTMLIFrameElement")){return domMemberCache.HTMLIFrameElement
+}else{if(this.instanceOf(object,"SVGSVGElement")){return domMemberCache.SVGSVGElement
+}else{if(this.instanceOf(object,"SVGElement")){return domMemberCache.SVGElement
+}else{if(this.instanceOf(object,"Element")){return domMemberCache.Element
+}else{if(this.instanceOf(object,"Text")||this.instanceOf(object,"CDATASection")){return domMemberCache.Text
+}else{if(this.instanceOf(object,"Attr")){return domMemberCache.Attr
+}else{if(this.instanceOf(object,"Node")){return domMemberCache.Node
+}else{if(this.instanceOf(object,"Event")||this.instanceOf(object,"EventCopy")){return domMemberCache.Event
+}else{return{}
+}}}}}}}}}}}}}}}}}}}}}}}catch(E){if(FBTrace.DBG_ERRORS){FBTrace.sysout("lib.getDOMMembers FAILED ",E)
+}return{}
+}};
+this.isDOMMember=function(object,propName){var members=this.getDOMMembers(object);
+return members&&propName in members
+};
+var domMemberCache=null;
+var domMemberMap={};
+domMemberMap.Window=["document","frameElement","innerWidth","innerHeight","outerWidth","outerHeight","screenX","screenY","pageXOffset","pageYOffset","scrollX","scrollY","scrollMaxX","scrollMaxY","status","defaultStatus","parent","opener","top","window","content","self","location","history","frames","navigator","screen","menubar","toolbar","locationbar","personalbar","statusbar","directories","scrollbars","fullScreen","netscape","java","console","Components","controllers","closed","crypto","pkcs11","name","property","length","sessionStorage","globalStorage","setTimeout","setInterval","clearTimeout","clearInterval","addEventListener","removeEventListener","dispatchEvent","getComputedStyle","captureEvents","releaseEvents","routeEvent","enableExternalCapture","disableExternalCapture","moveTo","moveBy","resizeTo","resizeBy","scroll","scrollTo","scrollBy","scrollByLines","scrollByPages","sizeToContent","setResizable","getSelection","open","openDialog","close","alert","confirm","prompt","dump","focus","blur","find","back","forward","home","stop","print","atob","btoa","updateCommands","XPCNativeWrapper","GeckoActiveXObject","applicationCache"];
+domMemberMap.Location=["href","protocol","host","hostname","port","pathname","search","hash","assign","reload","replace"];
+domMemberMap.Node=["id","className","nodeType","tagName","nodeName","localName","prefix","namespaceURI","nodeValue","ownerDocument","parentNode","offsetParent","nextSibling","previousSibling","firstChild","lastChild","childNodes","attributes","dir","baseURI","textContent","innerHTML","addEventListener","removeEventListener","dispatchEvent","cloneNode","appendChild","insertBefore","replaceChild","removeChild","compareDocumentPosition","hasAttributes","hasChildNodes","lookupNamespaceURI","lookupPrefix","normalize","isDefaultNamespace","isEqualNode","isSameNode","isSupported","getFeature","getUserData","setUserData"];
+domMemberMap.Document=extendArray(domMemberMap.Node,["documentElement","body","title","location","referrer","cookie","contentType","lastModified","characterSet","inputEncoding","xmlEncoding","xmlStandalone","xmlVersion","strictErrorChecking","documentURI","URL","defaultView","doctype","implementation","styleSheets","images","links","forms","anchors","embeds","plugins","applets","width","height","designMode","compatMode","async","preferredStylesheetSet","alinkColor","linkColor","vlinkColor","bgColor","fgColor","domain","addEventListener","removeEventListener","dispatchEvent","captureEvents","releaseEvents","routeEvent","clear","open","close","execCommand","execCommandShowHelp","getElementsByName","getSelection","queryCommandEnabled","queryCommandIndeterm","queryCommandState","queryCommandSupported","queryCommandText","queryCommandValue","write","writeln","adoptNode","appendChild","removeChild","renameNode","cloneNode","compareDocumentPosition","createAttribute","createAttributeNS","createCDATASection","createComment","createDocumentFragment","createElement","createElementNS","createEntityReference","createEvent","createExpression","createNSResolver","createNodeIterator","createProcessingInstruction","createRange","createTextNode","createTreeWalker","domConfig","evaluate","evaluateFIXptr","evaluateXPointer","getAnonymousElementByAttribute","getAnonymousNodes","addBinding","removeBinding","getBindingParent","getBoxObjectFor","setBoxObjectFor","getElementById","getElementsByTagName","getElementsByTagNameNS","hasAttributes","hasChildNodes","importNode","insertBefore","isDefaultNamespace","isEqualNode","isSameNode","isSupported","load","loadBindingDocument","lookupNamespaceURI","lookupPrefix","normalize","normalizeDocument","getFeature","getUserData","setUserData"]);
+domMemberMap.Element=extendArray(domMemberMap.Node,["clientWidth","clientHeight","offsetLeft","offsetTop","offsetWidth","offsetHeight","scrollLeft","scrollTop","scrollWidth","scrollHeight","style","tabIndex","title","lang","align","spellcheck","addEventListener","removeEventListener","dispatchEvent","focus","blur","cloneNode","appendChild","insertBefore","replaceChild","removeChild","compareDocumentPosition","getElementsByTagName","getElementsByTagNameNS","getAttribute","getAttributeNS","getAttributeNode","getAttributeNodeNS","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","removeAttribute","removeAttributeNS","removeAttributeNode","hasAttribute","hasAttributeNS","hasAttributes","hasChildNodes","lookupNamespaceURI","lookupPrefix","normalize","isDefaultNamespace","isEqualNode","isSameNode","isSupported","getFeature","getUserData","setUserData"]);
+domMemberMap.SVGElement=extendArray(domMemberMap.Element,["x","y","width","height","rx","ry","transform","href","ownerSVGElement","viewportElement","farthestViewportElement","nearestViewportElement","getBBox","getCTM","getScreenCTM","getTransformToElement","getPresentationAttribute","preserveAspectRatio"]);
+domMemberMap.SVGSVGElement=extendArray(domMemberMap.Element,["x","y","width","height","rx","ry","transform","viewBox","viewport","currentView","useCurrentView","pixelUnitToMillimeterX","pixelUnitToMillimeterY","screenPixelToMillimeterX","screenPixelToMillimeterY","currentScale","currentTranslate","zoomAndPan","ownerSVGElement","viewportElement","farthestViewportElement","nearestViewportElement","contentScriptType","contentStyleType","getBBox","getCTM","getScreenCTM","getTransformToElement","getEnclosureList","getIntersectionList","getViewboxToViewportTransform","getPresentationAttribute","getElementById","checkEnclosure","checkIntersection","createSVGAngle","createSVGLength","createSVGMatrix","createSVGNumber","createSVGPoint","createSVGRect","createSVGString","createSVGTransform","createSVGTransformFromMatrix","deSelectAll","preserveAspectRatio","forceRedraw","suspendRedraw","unsuspendRedraw","unsuspendRedrawAll","getCurrentTime","setCurrentTime","animationsPaused","pauseAnimations","unpauseAnimations"]);
+domMemberMap.HTMLImageElement=extendArray(domMemberMap.Element,["src","naturalWidth","naturalHeight","width","height","x","y","name","alt","longDesc","lowsrc","border","complete","hspace","vspace","isMap","useMap",]);
+domMemberMap.HTMLAnchorElement=extendArray(domMemberMap.Element,["name","target","accessKey","href","protocol","host","hostname","port","pathname","search","hash","hreflang","coords","shape","text","type","rel","rev","charset"]);
+domMemberMap.HTMLIFrameElement=extendArray(domMemberMap.Element,["contentDocument","contentWindow","frameBorder","height","longDesc","marginHeight","marginWidth","name","scrolling","src","width"]);
+domMemberMap.HTMLTableElement=extendArray(domMemberMap.Element,["bgColor","border","caption","cellPadding","cellSpacing","frame","rows","rules","summary","tBodies","tFoot","tHead","width","createCaption","createTFoot","createTHead","deleteCaption","deleteRow","deleteTFoot","deleteTHead","insertRow"]);
+domMemberMap.HTMLTableRowElement=extendArray(domMemberMap.Element,["bgColor","cells","ch","chOff","rowIndex","sectionRowIndex","vAlign","deleteCell","insertCell"]);
+domMemberMap.HTMLTableCellElement=extendArray(domMemberMap.Element,["abbr","axis","bgColor","cellIndex","ch","chOff","colSpan","headers","height","noWrap","rowSpan","scope","vAlign","width"]);
+domMemberMap.HTMLScriptElement=extendArray(domMemberMap.Element,["src"]);
+domMemberMap.HTMLButtonElement=extendArray(domMemberMap.Element,["accessKey","disabled","form","name","type","value","click"]);
+domMemberMap.HTMLInputElement=extendArray(domMemberMap.Element,["type","value","checked","accept","accessKey","alt","controllers","defaultChecked","defaultValue","disabled","form","maxLength","name","readOnly","selectionEnd","selectionStart","size","src","textLength","useMap","click","select","setSelectionRange"]);
+domMemberMap.HTMLFormElement=extendArray(domMemberMap.Element,["acceptCharset","action","author","elements","encoding","enctype","entry_id","length","method","name","post","target","text","url","reset","submit"]);
+domMemberMap.HTMLBodyElement=extendArray(domMemberMap.Element,["aLink","background","bgColor","link","text","vLink"]);
+domMemberMap.HTMLHtmlElement=extendArray(domMemberMap.Element,["version"]);
+domMemberMap.Text=extendArray(domMemberMap.Node,["data","length","appendData","deleteData","insertData","replaceData","splitText","substringData"]);
+domMemberMap.Attr=extendArray(domMemberMap.Node,["name","value","specified","ownerElement"]);
+domMemberMap.Event=["type","target","currentTarget","originalTarget","explicitOriginalTarget","relatedTarget","rangeParent","rangeOffset","view","keyCode","charCode","screenX","screenY","clientX","clientY","layerX","layerY","pageX","pageY","detail","button","which","ctrlKey","shiftKey","altKey","metaKey","eventPhase","timeStamp","bubbles","cancelable","cancelBubble","isTrusted","isChar","getPreventDefault","initEvent","initMouseEvent","initKeyEvent","initUIEvent","preventBubble","preventCapture","preventDefault","stopPropagation"];
+this.domConstantMap={ELEMENT_NODE:1,ATTRIBUTE_NODE:1,TEXT_NODE:1,CDATA_SECTION_NODE:1,ENTITY_REFERENCE_NODE:1,ENTITY_NODE:1,PROCESSING_INSTRUCTION_NODE:1,COMMENT_NODE:1,DOCUMENT_NODE:1,DOCUMENT_TYPE_NODE:1,DOCUMENT_FRAGMENT_NODE:1,NOTATION_NODE:1,DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:1,DOCUMENT_POSITION_FOLLOWING:1,DOCUMENT_POSITION_CONTAINS:1,DOCUMENT_POSITION_CONTAINED_BY:1,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:1,UNKNOWN_RULE:1,STYLE_RULE:1,CHARSET_RULE:1,IMPORT_RULE:1,MEDIA_RULE:1,FONT_FACE_RULE:1,PAGE_RULE:1,CAPTURING_PHASE:1,AT_TARGET:1,BUBBLING_PHASE:1,SCROLL_PAGE_UP:1,SCROLL_PAGE_DOWN:1,MOUSEUP:1,MOUSEDOWN:1,MOUSEOVER:1,MOUSEOUT:1,MOUSEMOVE:1,MOUSEDRAG:1,CLICK:1,DBLCLICK:1,KEYDOWN:1,KEYUP:1,KEYPRESS:1,DRAGDROP:1,FOCUS:1,BLUR:1,SELECT:1,CHANGE:1,RESET:1,SUBMIT:1,SCROLL:1,LOAD:1,UNLOAD:1,XFER_DONE:1,ABORT:1,ERROR:1,LOCATE:1,MOVE:1,RESIZE:1,FORWARD:1,HELP:1,BACK:1,TEXT:1,ALT_MASK:1,CONTROL_MASK:1,SHIFT_MASK:1,META_MASK:1,DOM_VK_TAB:1,DOM_VK_PAGE_UP:1,DOM_VK_PAGE_DOWN:1,DOM_VK_UP:1,DOM_VK_DOWN:1,DOM_VK_LEFT:1,DOM_VK_RIGHT:1,DOM_VK_CANCEL:1,DOM_VK_HELP:1,DOM_VK_BACK_SPACE:1,DOM_VK_CLEAR:1,DOM_VK_RETURN:1,DOM_VK_ENTER:1,DOM_VK_SHIFT:1,DOM_VK_CONTROL:1,DOM_VK_ALT:1,DOM_VK_PAUSE:1,DOM_VK_CAPS_LOCK:1,DOM_VK_ESCAPE:1,DOM_VK_SPACE:1,DOM_VK_END:1,DOM_VK_HOME:1,DOM_VK_PRINTSCREEN:1,DOM_VK_INSERT:1,DOM_VK_DELETE:1,DOM_VK_0:1,DOM_VK_1:1,DOM_VK_2:1,DOM_VK_3:1,DOM_VK_4:1,DOM_VK_5:1,DOM_VK_6:1,DOM_VK_7:1,DOM_VK_8:1,DOM_VK_9:1,DOM_VK_SEMICOLON:1,DOM_VK_EQUALS:1,DOM_VK_A:1,DOM_VK_B:1,DOM_VK_C:1,DOM_VK_D:1,DOM_VK_E:1,DOM_VK_F:1,DOM_VK_G:1,DOM_VK_H:1,DOM_VK_I:1,DOM_VK_J:1,DOM_VK_K:1,DOM_VK_L:1,DOM_VK_M:1,DOM_VK_N:1,DOM_VK_O:1,DOM_VK_P:1,DOM_VK_Q:1,DOM_VK_R:1,DOM_VK_S:1,DOM_VK_T:1,DOM_VK_U:1,DOM_VK_V:1,DOM_VK_W:1,DOM_VK_X:1,DOM_VK_Y:1,DOM_VK_Z:1,DOM_VK_CONTEXT_MENU:1,DOM_VK_NUMPAD0:1,DOM_VK_NUMPAD1:1,DOM_VK_NUMPAD2:1,DOM_VK_NUMPAD3:1,DOM_VK_NUMPAD4:1,DOM_VK_NUMPAD5:1,DOM_VK_NUMPAD6:1,DOM_VK_NUMPAD7:1,DOM_VK_NUMPAD8:1,DOM_VK_NUMPAD9:1,DOM_VK_MULTIPLY:1,DOM_VK_ADD:1,DOM_VK_SEPARATOR:1,DOM_VK_SUBTRACT:1,DOM_VK_DECIMAL:1,DOM_VK_DIVIDE:1,DOM_VK_F1:1,DOM_VK_F2:1,DOM_VK_F3:1,DOM_VK_F4:1,DOM_VK_F5:1,DOM_VK_F6:1,DOM_VK_F7:1,DOM_VK_F8:1,DOM_VK_F9:1,DOM_VK_F10:1,DOM_VK_F11:1,DOM_VK_F12:1,DOM_VK_F13:1,DOM_VK_F14:1,DOM_VK_F15:1,DOM_VK_F16:1,DOM_VK_F17:1,DOM_VK_F18:1,DOM_VK_F19:1,DOM_VK_F20:1,DOM_VK_F21:1,DOM_VK_F22:1,DOM_VK_F23:1,DOM_VK_F24:1,DOM_VK_NUM_LOCK:1,DOM_VK_SCROLL_LOCK:1,DOM_VK_COMMA:1,DOM_VK_PERIOD:1,DOM_VK_SLASH:1,DOM_VK_BACK_QUOTE:1,DOM_VK_OPEN_BRACKET:1,DOM_VK_BACK_SLASH:1,DOM_VK_CLOSE_BRACKET:1,DOM_VK_QUOTE:1,DOM_VK_META:1,SVG_ZOOMANDPAN_DISABLE:1,SVG_ZOOMANDPAN_MAGNIFY:1,SVG_ZOOMANDPAN_UNKNOWN:1};
+this.cssInfo={background:["bgRepeat","bgAttachment","bgPosition","color","systemColor","none"],"background-attachment":["bgAttachment"],"background-color":["color","systemColor"],"background-image":["none"],"background-position":["bgPosition"],"background-repeat":["bgRepeat"],border:["borderStyle","thickness","color","systemColor","none"],"border-top":["borderStyle","borderCollapse","color","systemColor","none"],"border-right":["borderStyle","borderCollapse","color","systemColor","none"],"border-bottom":["borderStyle","borderCollapse","color","systemColor","none"],"border-left":["borderStyle","borderCollapse","color","systemColor","none"],"border-collapse":["borderCollapse"],"border-color":["color","systemColor"],"border-top-color":["color","systemColor"],"border-right-color":["color","systemColor"],"border-bottom-color":["color","systemColor"],"border-left-color":["color","systemColor"],"border-spacing":[],"border-style":["borderStyle"],"border-top-style":["borderStyle"],"border-right-style":["borderStyle"],"border-bottom-style":["borderStyle"],"border-left-style":["borderStyle"],"border-width":["thickness"],"border-top-width":["thickness"],"border-right-width":["thickness"],"border-bottom-width":["thickness"],"border-left-width":["thickness"],bottom:["auto"],"caption-side":["captionSide"],clear:["clear","none"],clip:["auto"],color:["color","systemColor"],content:["content"],"counter-increment":["none"],"counter-reset":["none"],cursor:["cursor","none"],direction:["direction"],display:["display","none"],"empty-cells":[],"float":["float","none"],font:["fontStyle","fontVariant","fontWeight","fontFamily"],"font-family":["fontFamily"],"font-size":["fontSize"],"font-size-adjust":[],"font-stretch":[],"font-style":["fontStyle"],"font-variant":["fontVariant"],"font-weight":["fontWeight"],height:["auto"],left:["auto"],"letter-spacing":[],"line-height":[],"list-style":["listStyleType","listStylePosition","none"],"list-style-image":["none"],"list-style-position":["listStylePosition"],"list-style-type":["listStyleType","none"],margin:[],"margin-top":[],"margin-right":[],"margin-bottom":[],"margin-left":[],"marker-offset":["auto"],"min-height":["none"],"max-height":["none"],"min-width":["none"],"max-width":["none"],outline:["borderStyle","color","systemColor","none"],"outline-color":["color","systemColor"],"outline-style":["borderStyle"],"outline-width":[],overflow:["overflow","auto"],"overflow-x":["overflow","auto"],"overflow-y":["overflow","auto"],padding:[],"padding-top":[],"padding-right":[],"padding-bottom":[],"padding-left":[],position:["position"],quotes:["none"],right:["auto"],"table-layout":["tableLayout","auto"],"text-align":["textAlign"],"text-decoration":["textDecoration","none"],"text-indent":[],"text-shadow":[],"text-transform":["textTransform","none"],top:["auto"],"unicode-bidi":[],"vertical-align":["verticalAlign"],"white-space":["whiteSpace"],width:["auto"],"word-spacing":[],"z-index":[],"-moz-appearance":["mozAppearance"],"-moz-border-radius":[],"-moz-border-radius-bottomleft":[],"-moz-border-radius-bottomright":[],"-moz-border-radius-topleft":[],"-moz-border-radius-topright":[],"-moz-border-top-colors":["color","systemColor"],"-moz-border-right-colors":["color","systemColor"],"-moz-border-bottom-colors":["color","systemColor"],"-moz-border-left-colors":["color","systemColor"],"-moz-box-align":["mozBoxAlign"],"-moz-box-direction":["mozBoxDirection"],"-moz-box-flex":[],"-moz-box-ordinal-group":[],"-moz-box-orient":["mozBoxOrient"],"-moz-box-pack":["mozBoxPack"],"-moz-box-sizing":["mozBoxSizing"],"-moz-opacity":[],"-moz-user-focus":["userFocus","none"],"-moz-user-input":["userInput"],"-moz-user-modify":[],"-moz-user-select":["userSelect","none"],"-moz-background-clip":[],"-moz-background-inline-policy":[],"-moz-background-origin":[],"-moz-binding":[],"-moz-column-count":[],"-moz-column-gap":[],"-moz-column-width":[],"-moz-image-region":[]};
+this.inheritedStyleNames={"border-collapse":1,"border-spacing":1,"border-style":1,"caption-side":1,color:1,cursor:1,direction:1,"empty-cells":1,font:1,"font-family":1,"font-size-adjust":1,"font-size":1,"font-style":1,"font-variant":1,"font-weight":1,"letter-spacing":1,"line-height":1,"list-style":1,"list-style-image":1,"list-style-position":1,"list-style-type":1,quotes:1,"text-align":1,"text-decoration":1,"text-indent":1,"text-shadow":1,"text-transform":1,"white-space":1,"word-spacing":1};
+this.cssKeywords={appearance:["button","button-small","checkbox","checkbox-container","checkbox-small","dialog","listbox","menuitem","menulist","menulist-button","menulist-textfield","menupopup","progressbar","radio","radio-container","radio-small","resizer","scrollbar","scrollbarbutton-down","scrollbarbutton-left","scrollbarbutton-right","scrollbarbutton-up","scrollbartrack-horizontal","scrollbartrack-vertical","separator","statusbar","tab","tab-left-edge","tabpanels","textfield","toolbar","toolbarbutton","toolbox","tooltip","treeheadercell","treeheadersortarrow","treeitem","treetwisty","treetwistyopen","treeview","window"],systemColor:["ActiveBorder","ActiveCaption","AppWorkspace","Background","ButtonFace","ButtonHighlight","ButtonShadow","ButtonText","CaptionText","GrayText","Highlight","HighlightText","InactiveBorder","InactiveCaption","InactiveCaptionText","InfoBackground","InfoText","Menu","MenuText","Scrollbar","ThreeDDarkShadow","ThreeDFace","ThreeDHighlight","ThreeDLightShadow","ThreeDShadow","Window","WindowFrame","WindowText","-moz-field","-moz-fieldtext","-moz-workspace","-moz-visitedhyperlinktext","-moz-use-text-color"],color:["AliceBlue","AntiqueWhite","Aqua","Aquamarine","Azure","Beige","Bisque","Black","BlanchedAlmond","Blue","BlueViolet","Brown","BurlyWood","CadetBlue","Chartreuse","Chocolate","Coral","CornflowerBlue","Cornsilk","Crimson","Cyan","DarkBlue","DarkCyan","DarkGoldenRod","DarkGray","DarkGreen","DarkKhaki","DarkMagenta","DarkOliveGreen","DarkOrange","DarkOrchid","DarkRed","DarkSalmon","DarkSeaGreen","DarkSlateBlue","DarkSlateGray","DarkTurquoise","DarkViolet","DeepPink","DarkSkyBlue","DimGray","DodgerBlue","Feldspar","FireBrick","FloralWhite","ForestGreen","Fuchsia","Gainsboro","GhostWhite","Gold","GoldenRod","Gray","Green","GreenYellow","HoneyDew","HotPink","IndianRed","Indigo","Ivory","Khaki","Lavender","LavenderBlush","LawnGreen","LemonChiffon","LightBlue","LightCoral","LightCyan","LightGoldenRodYellow","LightGrey","LightGreen","LightPink","LightSalmon","LightSeaGreen","LightSkyBlue","LightSlateBlue","LightSlateGray","LightSteelBlue","LightYellow","Lime","LimeGreen","Linen","Magenta","Maroon","MediumAquaMarine","MediumBlue","MediumOrchid","MediumPurple","MediumSeaGreen","MediumSlateBlue","MediumSpringGreen","MediumTurquoise","MediumVioletRed","MidnightBlue","MintCream","MistyRose","Moccasin","NavajoWhite","Navy","OldLace","Olive","OliveDrab","Orange","OrangeRed","Orchid","PaleGoldenRod","PaleGreen","PaleTurquoise","PaleVioletRed","PapayaWhip","PeachPuff","Peru","Pink","Plum","PowderBlue","Purple","Red","RosyBrown","RoyalBlue","SaddleBrown","Salmon","SandyBrown","SeaGreen","SeaShell","Sienna","Silver","SkyBlue","SlateBlue","SlateGray","Snow","SpringGreen","SteelBlue","Tan","Teal","Thistle","Tomato","Turquoise","Violet","VioletRed","Wheat","White","WhiteSmoke","Yellow","YellowGreen","transparent","invert"],auto:["auto"],none:["none"],captionSide:["top","bottom","left","right"],clear:["left","right","both"],cursor:["auto","cell","context-menu","crosshair","default","help","pointer","progress","move","e-resize","all-scroll","ne-resize","nw-resize","n-resize","se-resize","sw-resize","s-resize","w-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","col-resize","row-resize","text","vertical-text","wait","alias","copy","move","no-drop","not-allowed","-moz-alias","-moz-cell","-moz-copy","-moz-grab","-moz-grabbing","-moz-contextmenu","-moz-zoom-in","-moz-zoom-out","-moz-spinning"],direction:["ltr","rtl"],bgAttachment:["scroll","fixed"],bgPosition:["top","center","bottom","left","right"],bgRepeat:["repeat","repeat-x","repeat-y","no-repeat"],borderStyle:["hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","-moz-bg-inset","-moz-bg-outset","-moz-bg-solid"],borderCollapse:["collapse","separate"],overflow:["visible","hidden","scroll","-moz-scrollbars-horizontal","-moz-scrollbars-none","-moz-scrollbars-vertical"],listStyleType:["disc","circle","square","decimal","decimal-leading-zero","lower-roman","upper-roman","lower-greek","lower-alpha","lower-latin","upper-alpha","upper-latin","hebrew","armenian","georgian","cjk-ideographic","hiragana","katakana","hiragana-iroha","katakana-iroha","inherit"],listStylePosition:["inside","outside"],content:["open-quote","close-quote","no-open-quote","no-close-quote","inherit"],fontStyle:["normal","italic","oblique","inherit"],fontVariant:["normal","small-caps","inherit"],fontWeight:["normal","bold","bolder","lighter","inherit"],fontSize:["xx-small","x-small","small","medium","large","x-large","xx-large","smaller","larger"],fontFamily:["Arial","Comic Sans MS","Georgia","Tahoma","Verdana","Times New Roman","Trebuchet MS","Lucida Grande","Helvetica","serif","sans-serif","cursive","fantasy","monospace","caption","icon","menu","message-box","small-caption","status-bar","inherit"],display:["block","inline","inline-block","list-item","marker","run-in","compact","table","inline-table","table-row-group","table-column","table-column-group","table-header-group","table-footer-group","table-row","table-cell","table-caption","-moz-box","-moz-compact","-moz-deck","-moz-grid","-moz-grid-group","-moz-grid-line","-moz-groupbox","-moz-inline-block","-moz-inline-box","-moz-inline-grid","-moz-inline-stack","-moz-inline-table","-moz-marker","-moz-popup","-moz-runin","-moz-stack"],position:["static","relative","absolute","fixed","inherit"],"float":["left","right"],textAlign:["left","right","center","justify"],tableLayout:["fixed"],textDecoration:["underline","overline","line-through","blink"],textTransform:["capitalize","lowercase","uppercase","inherit"],unicodeBidi:["normal","embed","bidi-override"],whiteSpace:["normal","pre","nowrap"],verticalAlign:["baseline","sub","super","top","text-top","middle","bottom","text-bottom","inherit"],thickness:["thin","medium","thick"],userFocus:["ignore","normal"],userInput:["disabled","enabled"],userSelect:["normal"],mozBoxSizing:["content-box","padding-box","border-box"],mozBoxAlign:["start","center","end","baseline","stretch"],mozBoxDirection:["normal","reverse"],mozBoxOrient:["horizontal","vertical"],mozBoxPack:["start","center","end"]};
+this.nonEditableTags={HTML:1,HEAD:1,html:1,head:1};
+this.innerEditableTags={BODY:1,body:1};
+var invisibleTags=this.invisibleTags={HTML:1,HEAD:1,TITLE:1,META:1,LINK:1,STYLE:1,SCRIPT:1,NOSCRIPT:1,BR:1,html:1,head:1,title:1,meta:1,link:1,style:1,script:1,noscript:1,br:1};
+if(typeof KeyEvent=="undefined"){this.KeyEvent={DOM_VK_CANCEL:3,DOM_VK_HELP:6,DOM_VK_BACK_SPACE:8,DOM_VK_TAB:9,DOM_VK_CLEAR:12,DOM_VK_RETURN:13,DOM_VK_ENTER:14,DOM_VK_SHIFT:16,DOM_VK_CONTROL:17,DOM_VK_ALT:18,DOM_VK_PAUSE:19,DOM_VK_CAPS_LOCK:20,DOM_VK_ESCAPE:27,DOM_VK_SPACE:32,DOM_VK_PAGE_UP:33,DOM_VK_PAGE_DOWN:34,DOM_VK_END:35,DOM_VK_HOME:36,DOM_VK_LEFT:37,DOM_VK_UP:38,DOM_VK_RIGHT:39,DOM_VK_DOWN:40,DOM_VK_PRINTSCREEN:44,DOM_VK_INSERT:45,DOM_VK_DELETE:46,DOM_VK_0:48,DOM_VK_1:49,DOM_VK_2:50,DOM_VK_3:51,DOM_VK_4:52,DOM_VK_5:53,DOM_VK_6:54,DOM_VK_7:55,DOM_VK_8:56,DOM_VK_9:57,DOM_VK_SEMICOLON:59,DOM_VK_EQUALS:61,DOM_VK_A:65,DOM_VK_B:66,DOM_VK_C:67,DOM_VK_D:68,DOM_VK_E:69,DOM_VK_F:70,DOM_VK_G:71,DOM_VK_H:72,DOM_VK_I:73,DOM_VK_J:74,DOM_VK_K:75,DOM_VK_L:76,DOM_VK_M:77,DOM_VK_N:78,DOM_VK_O:79,DOM_VK_P:80,DOM_VK_Q:81,DOM_VK_R:82,DOM_VK_S:83,DOM_VK_T:84,DOM_VK_U:85,DOM_VK_V:86,DOM_VK_W:87,DOM_VK_X:88,DOM_VK_Y:89,DOM_VK_Z:90,DOM_VK_CONTEXT_MENU:93,DOM_VK_NUMPAD0:96,DOM_VK_NUMPAD1:97,DOM_VK_NUMPAD2:98,DOM_VK_NUMPAD3:99,DOM_VK_NUMPAD4:100,DOM_VK_NUMPAD5:101,DOM_VK_NUMPAD6:102,DOM_VK_NUMPAD7:103,DOM_VK_NUMPAD8:104,DOM_VK_NUMPAD9:105,DOM_VK_MULTIPLY:106,DOM_VK_ADD:107,DOM_VK_SEPARATOR:108,DOM_VK_SUBTRACT:109,DOM_VK_DECIMAL:110,DOM_VK_DIVIDE:111,DOM_VK_F1:112,DOM_VK_F2:113,DOM_VK_F3:114,DOM_VK_F4:115,DOM_VK_F5:116,DOM_VK_F6:117,DOM_VK_F7:118,DOM_VK_F8:119,DOM_VK_F9:120,DOM_VK_F10:121,DOM_VK_F11:122,DOM_VK_F12:123,DOM_VK_F13:124,DOM_VK_F14:125,DOM_VK_F15:126,DOM_VK_F16:127,DOM_VK_F17:128,DOM_VK_F18:129,DOM_VK_F19:130,DOM_VK_F20:131,DOM_VK_F21:132,DOM_VK_F22:133,DOM_VK_F23:134,DOM_VK_F24:135,DOM_VK_NUM_LOCK:144,DOM_VK_SCROLL_LOCK:145,DOM_VK_COMMA:188,DOM_VK_PERIOD:190,DOM_VK_SLASH:191,DOM_VK_BACK_QUOTE:192,DOM_VK_OPEN_BRACKET:219,DOM_VK_BACK_SLASH:220,DOM_VK_CLOSE_BRACKET:221,DOM_VK_QUOTE:222,DOM_VK_META:224}
+}this.Ajax={requests:[],transport:null,states:["Uninitialized","Loading","Loaded","Interactive","Complete"],initialize:function(){this.transport=this.getXHRObject()
+},getXHRObject:function(){var xhrObj=false;
+try{xhrObj=new XMLHttpRequest()
+}catch(e){var progid=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
+for(var i=0;
+i<progid.length;
+++i){try{xhrObj=new ActiveXObject(progid[i])
+}catch(e){continue
+}break
+}}finally{return xhrObj
+}},request:function(options){var o=options||{};
+o.type=o.type&&o.type.toLowerCase()||"get";
+o.async=o.async||true;
+o.dataType=o.dataType||"text";
+o.contentType=o.contentType||"application/x-www-form-urlencoded";
+this.requests.push(o);
+var s=this.getState();
+if(s=="Uninitialized"||s=="Complete"||s=="Loaded"){this.sendRequest()
+}},serialize:function(data){var r=[""],rl=0;
+if(data){if(typeof data=="string"){r[rl++]=data
+}else{if(data.innerHTML&&data.elements){for(var i=0,el,l=(el=data.elements).length;
+i<l;
+i++){if(el[i].name){r[rl++]=encodeURIComponent(el[i].name);
+r[rl++]="=";
+r[rl++]=encodeURIComponent(el[i].value);
+r[rl++]="&"
+}}}else{for(var param in data){r[rl++]=encodeURIComponent(param);
+r[rl++]="=";
+r[rl++]=encodeURIComponent(data[param]);
+r[rl++]="&"
+}}}}return r.join("").replace(/&$/,"")
+},sendRequest:function(){var t=FBL.Ajax.transport,r=FBL.Ajax.requests.shift(),data;
+t.open(r.type,r.url,r.async);
+t.setRequestHeader("X-Requested-With","XMLHttpRequest");
+if(data=FBL.Ajax.serialize(r.data)){t.setRequestHeader("Content-Type",r.contentType)
+}t.onreadystatechange=function(){FBL.Ajax.onStateChange(r)
+};
+t.send(data)
+},onStateChange:function(options){var fn,o=options,t=this.transport;
+var state=this.getState(t);
+if(fn=o["on"+state]){fn(this.getResponse(o),o)
+}if(state=="Complete"){var success=t.status==200,response=this.getResponse(o);
+if(fn=o.onUpdate){fn(response,o)
+}if(fn=o["on"+(success?"Success":"Failure")]){fn(response,o)
+}t.onreadystatechange=FBL.emptyFn;
+if(this.requests.length>0){setTimeout(this.sendRequest,10)
+}}},getResponse:function(options){var t=this.transport,type=options.dataType;
+if(t.status!=200){return t.statusText
+}else{if(type=="text"){return t.responseText
+}else{if(type=="html"){return t.responseText
+}else{if(type=="xml"){return t.responseXML
+}else{if(type=="json"){return eval("("+t.responseText+")")
+}}}}}},getState:function(){return this.states[this.transport.readyState]
+}};
+this.createCookie=function(name,value,days){if("cookie" in document){if(days){var date=new Date();
+date.setTime(date.getTime()+(days*24*60*60*1000));
+var expires="; expires="+date.toGMTString()
+}else{var expires=""
+}document.cookie=name+"="+value+expires+"; path=/"
+}};
+this.readCookie=function(name){if("cookie" in document){var nameEQ=name+"=";
+var ca=document.cookie.split(";");
+for(var i=0;
+i<ca.length;
+i++){var c=ca[i];
+while(c.charAt(0)==" "){c=c.substring(1,c.length)
+}if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length)
+}}}return null
+};
+this.removeCookie=function(name){this.createCookie(name,"",-1)
+};
+var fixIE6BackgroundImageCache=function(doc){doc=doc||document;
+try{doc.execCommand("BackgroundImageCache",false,true)
+}catch(E){}};
+var resetStyle="margin:0; padding:0; border:0; position:absolute; overflow:hidden; display:block;";
+var calculatePixelsPerInch=function calculatePixelsPerInch(doc,body){var inch=FBL.createGlobalElement("div");
+inch.style.cssText=resetStyle+"width:1in; height:1in; position:absolute; top:-1234px; left:-1234px;";
+body.appendChild(inch);
+FBL.pixelsPerInch={x:inch.offsetWidth,y:inch.offsetHeight};
+body.removeChild(inch)
+};
+this.SourceLink=function(url,line,type,object,instance){this.href=url;
+this.instance=instance;
+this.line=line;
+this.type=type;
+this.object=object
+};
+this.SourceLink.prototype={toString:function(){return this.href
+},toJSON:function(){return'{"href":"'+this.href+'", '+(this.line?('"line":'+this.line+","):"")+(this.type?(' "type":"'+this.type+'",'):"")+"}"
+}};
+this.SourceText=function(lines,owner){this.lines=lines;
+this.owner=owner
+};
+this.SourceText.getLineAsHTML=function(lineNo){return escapeForSourceLine(this.lines[lineNo-1])
+}
+}).apply(FBL);
+FBL.ns(function(){with(FBL){var oSTR={NoMembersWarning:"There are no properties to show for this object.",EmptyStyleSheet:"There are no rules in this stylesheet.",EmptyElementCSS:"This element has no style rules.",AccessRestricted:"Access to restricted URI denied.","net.label.Parameters":"Parameters","net.label.Source":"Source",URLParameters:"Params",EditStyle:"Edit Element Style...",NewRule:"New Rule...",NewProp:"New Property...",EditProp:'Edit "%s"',DeleteProp:'Delete "%s"',DisableProp:'Disable "%s"'};
+FBL.$STR=function(name){return oSTR.hasOwnProperty(name)?oSTR[name]:name
+};
+FBL.$STRF=function(name,args){if(!oSTR.hasOwnProperty(name)){return name
+}var format=oSTR[name];
+var objIndex=0;
+var parts=parseFormat(format);
+var trialIndex=objIndex;
+var objects=args;
+for(var i=0;
+i<parts.length;
+i++){var part=parts[i];
+if(part&&typeof(part)=="object"){if(++trialIndex>objects.length){format="";
+objIndex=-1;
+parts.length=0;
+break
+}}}var result=[];
+for(var i=0;
+i<parts.length;
+++i){var part=parts[i];
+if(part&&typeof(part)=="object"){result.push(""+args.shift())
+}else{result.push(part)
+}}return result.join("")
+};
+var parseFormat=function parseFormat(format){var parts=[];
+if(format.length<=0){return parts
+}var reg=/((^%|.%)(\d+)?(\.)([a-zA-Z]))|((^%|.%)([a-zA-Z]))/;
+for(var m=reg.exec(format);
+m;
+m=reg.exec(format)){if(m[0].substr(0,2)=="%%"){parts.push(format.substr(0,m.index));
+parts.push(m[0].substr(1))
+}else{var type=m[8]?m[8]:m[5];
+var precision=m[3]?parseInt(m[3]):(m[4]=="."?-1:0);
+var rep=null;
+switch(type){case"s":rep=FirebugReps.Text;
+break;
+case"f":case"i":case"d":rep=FirebugReps.Number;
+break;
+case"o":rep=null;
+break
+}parts.push(format.substr(0,m[0][0]=="%"?m.index:m.index+1));
+parts.push({rep:rep,precision:precision,type:("%"+type)})
+}format=format.substr(m.index+m[0].length)
+}parts.push(format);
+return parts
+}
+}});
+FBL.ns(function(){with(FBL){FBL.cacheID="firebug"+new Date().getTime();
+FBL.documentCache={};
+var modules=[];
+var panelTypes=[];
+var panelTypeMap={};
+var reps=[];
+var parentPanelMap={};
+window.Firebug=FBL.Firebug={version:"Firebug Lite 1.3.1",revision:"$Revision: 7759 $",modules:modules,panelTypes:panelTypes,panelTypeMap:panelTypeMap,reps:reps,initialize:function(){if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.initialize","initializing application")
+}Firebug.browser=new Context(Env.browser);
+Firebug.context=Firebug.browser;
+cacheDocument();
+if(Firebug.Inspector){Firebug.Inspector.create()
+}if(FBL.processAllStyleSheets){processAllStyleSheets(Firebug.browser.document)
+}FirebugChrome.initialize();
+dispatch(modules,"initialize",[]);
+if(Env.onLoad){var onLoad=Env.onLoad;
+delete Env.onLoad;
+setTimeout(onLoad,200)
+}},shutdown:function(){if(Firebug.Inspector){Firebug.Inspector.destroy()
+}dispatch(modules,"shutdown",[]);
+var chromeMap=FirebugChrome.chromeMap;
+for(var name in chromeMap){if(chromeMap.hasOwnProperty(name)){chromeMap[name].destroy()
+}}for(var name in documentCache){documentCache[name].removeAttribute(cacheID);
+documentCache[name]=null;
+delete documentCache[name]
+}documentCache=null;
+delete FBL.documentCache;
+Firebug.browser=null;
+Firebug.context=null
+},registerModule:function(){modules.push.apply(modules,arguments);
+if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.registerModule")
+}},registerPanel:function(){panelTypes.push.apply(panelTypes,arguments);
+for(var i=0,panelType;
+panelType=arguments[i];
+++i){panelTypeMap[panelType.prototype.name]=arguments[i];
+if(panelType.prototype.parentPanel){parentPanelMap[panelType.prototype.parentPanel]=1
+}}if(FBTrace.DBG_INITIALIZE){for(var i=0;
+i<arguments.length;
+++i){FBTrace.sysout("Firebug.registerPanel",arguments[i].prototype.name)
+}}},registerRep:function(){reps.push.apply(reps,arguments)
+},unregisterRep:function(){for(var i=0;
+i<arguments.length;
+++i){remove(reps,arguments[i])
+}},setDefaultReps:function(funcRep,rep){FBL.defaultRep=rep;
+FBL.defaultFuncRep=funcRep
+},getRep:function(object){var type=typeof object;
+if(isIE&&isFunction(object)){type="function"
+}for(var i=0;
+i<reps.length;
+++i){var rep=reps[i];
+try{if(rep.supportsObject(object,type)){if(FBTrace.DBG_DOM){FBTrace.sysout("getRep type: "+type+" object: "+object,rep)
+}return rep
+}}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("firebug.getRep FAILS: ",exc.message||exc);
+FBTrace.sysout("firebug.getRep reps["+i+"/"+reps.length+"]: Rep="+reps[i].className)
+}}}return(type=="function")?defaultFuncRep:defaultRep
+},getRepObject:function(node){var target=null;
+for(var child=node;
+child;
+child=child.parentNode){if(hasClass(child,"repTarget")){target=child
+}if(child.repObject){if(!target&&hasClass(child,"repIgnore")){break
+}else{return child.repObject
+}}}},getRepNode:function(node){for(var child=node;
+child;
+child=child.parentNode){if(child.repObject){return child
+}}},getElementByRepObject:function(element,object){for(var child=element.firstChild;
+child;
+child=child.nextSibling){if(child.repObject==object){return child
+}}},getPref:function(name){return Firebug[name]
+},setPref:function(name,value){Firebug[name]=value;
+this.savePrefs()
+},setPrefs:function(prefs){for(var name in prefs){if(prefs.hasOwnProperty(name)){Firebug[name]=prefs[name]
+}}this.savePrefs()
+},restorePrefs:function(){var Options=Env.Options;
+for(var name in Options){Firebug[name]=Options[name]
+}},loadPrefs:function(prefs){this.restorePrefs();
+prefs=prefs||eval("("+readCookie("FirebugLite")+")");
+for(var name in prefs){if(prefs.hasOwnProperty(name)){Firebug[name]=prefs[name]
+}}},savePrefs:function(){var json=["{"],jl=0;
+var Options=Env.Options;
+for(var name in Options){if(Options.hasOwnProperty(name)){var value=Firebug[name];
+json[++jl]='"';
+json[++jl]=name;
+var type=typeof value;
+if(type=="boolean"||type=="number"){json[++jl]='":';
+json[++jl]=value;
+json[++jl]=","
+}else{json[++jl]='":"';
+json[++jl]=value;
+json[++jl]='",'
+}}}json.length=jl--;
+json[++jl]="}";
+createCookie("FirebugLite",json.join(""))
+},erasePrefs:function(){removeCookie("FirebugLite")
+}};
+Firebug.restorePrefs();
+if(!Env.Options.enablePersistent||Env.Options.enablePersistent&&Env.isChromeContext||Env.isDebugMode){Env.browser.window.Firebug=FBL.Firebug
+}FBL.cacheDocument=function cacheDocument(){var els=Firebug.browser.document.getElementsByTagName("*");
+for(var i=0,l=els.length,el;
+i<l;
+i++){el=els[i];
+el[cacheID]=i;
+documentCache[i]=el
+}};
+Firebug.Listener=function(){this.fbListeners=null
+};
+Firebug.Listener.prototype={addListener:function(listener){if(!this.fbListeners){this.fbListeners=[]
+}this.fbListeners.push(listener)
+},removeListener:function(listener){remove(this.fbListeners,listener)
+}};
+Firebug.Module=extend(new Firebug.Listener(),{initialize:function(){},shutdown:function(){},initContext:function(context){},reattachContext:function(browser,context){},destroyContext:function(context,persistedState){},showContext:function(browser,context){},loadedContext:function(context){},showPanel:function(browser,panel){},showSidePanel:function(browser,panel){},updateOption:function(name,value){},getObjectByURL:function(context,url){}});
+Firebug.Panel={name:"HelloWorld",title:"Hello World!",parentPanel:null,options:{hasCommandLine:false,hasStatusBar:false,hasToolButtons:false,isPreRendered:false,innerHTMLSync:false},tabNode:null,panelNode:null,sidePanelNode:null,statusBarNode:null,toolButtonsNode:null,panelBarNode:null,sidePanelBarBoxNode:null,sidePanelBarNode:null,sidePanelBar:null,searchable:false,editable:true,order:2147483647,statusSeparator:"<",create:function(context,doc){this.hasSidePanel=parentPanelMap.hasOwnProperty(this.name);
+this.panelBarNode=$("fbPanelBar1");
+this.sidePanelBarBoxNode=$("fbPanelBar2");
+if(this.hasSidePanel){this.sidePanelBar=extend({},PanelBar);
+this.sidePanelBar.create(this)
+}var options=this.options=extend(Firebug.Panel.options,this.options);
+var panelId="fb"+this.name;
+if(options.isPreRendered){this.panelNode=$(panelId);
+this.tabNode=$(panelId+"Tab");
+this.tabNode.style.display="block";
+if(options.hasToolButtons){this.toolButtonsNode=$(panelId+"Buttons")
+}if(options.hasStatusBar){this.statusBarBox=$("fbStatusBarBox");
+this.statusBarNode=$(panelId+"StatusBar")
+}}else{var containerSufix=this.parentPanel?"2":"1";
+var panelNode=this.panelNode=createElement("div",{id:panelId,className:"fbPanel"});
+$("fbPanel"+containerSufix).appendChild(panelNode);
+var tabHTML='<span class="fbTabL"></span><span class="fbTabText">'+this.title+'</span><span class="fbTabR"></span>';
+var tabNode=this.tabNode=createElement("a",{id:panelId+"Tab",className:"fbTab fbHover",innerHTML:tabHTML});
+if(isIE6){tabNode.href="javascript:void(0)"
+}var panelBarNode=this.parentPanel?Firebug.chrome.getPanel(this.parentPanel).sidePanelBarNode:this.panelBarNode;
+panelBarNode.appendChild(tabNode);
+tabNode.style.display="block";
+if(options.hasToolButtons){this.toolButtonsNode=createElement("span",{id:panelId+"Buttons",className:"fbToolbarButtons"});
+$("fbToolbarButtons").appendChild(this.toolButtonsNode)
+}if(options.hasStatusBar){this.statusBarBox=$("fbStatusBarBox");
+this.statusBarNode=createElement("span",{id:panelId+"StatusBar",className:"fbToolbarButtons fbStatusBar"});
+this.statusBarBox.appendChild(this.statusBarNode)
+}}var contentNode=this.contentNode=createElement("div");
+this.panelNode.appendChild(contentNode);
+this.containerNode=this.panelNode.parentNode;
+if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.Panel.create",this.name)
+}this.onContextMenu=bind(this.onContextMenu,this)
+},destroy:function(state){if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.Panel.destroy",this.name)
+}if(this.hasSidePanel){this.sidePanelBar.destroy();
+this.sidePanelBar=null
+}this.options=null;
+this.name=null;
+this.parentPanel=null;
+this.tabNode=null;
+this.panelNode=null;
+this.contentNode=null;
+this.containerNode=null;
+this.toolButtonsNode=null;
+this.statusBarBox=null;
+this.statusBarNode=null
+},initialize:function(){if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.Panel.initialize",this.name)
+}if(this.hasSidePanel){this.sidePanelBar.initialize()
+}var options=this.options=extend(Firebug.Panel.options,this.options);
+var panelId="fb"+this.name;
+this.panelNode=$(panelId);
+this.tabNode=$(panelId+"Tab");
+this.tabNode.style.display="block";
+if(options.hasStatusBar){this.statusBarBox=$("fbStatusBarBox");
+this.statusBarNode=$(panelId+"StatusBar")
+}if(options.hasToolButtons){this.toolButtonsNode=$(panelId+"Buttons")
+}this.containerNode=this.panelNode.parentNode;
+this.containerNode.scrollTop=this.lastScrollTop;
+addEvent(this.containerNode,"contextmenu",this.onContextMenu)
+},shutdown:function(){if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.Panel.shutdown",this.name)
+}if(Firebug.chrome.largeCommandLineVisible){Firebug.chrome.hideLargeCommandLine()
+}if(this.hasSidePanel){}this.lastScrollTop=this.containerNode.scrollTop;
+removeEvent(this.containerNode,"contextmenu",this.onContextMenu)
+},detach:function(oldChrome,newChrome){if(oldChrome.selectedPanel.name==this.name){this.lastScrollTop=oldChrome.selectedPanel.containerNode.scrollTop
+}},reattach:function(doc){if(this.options.innerHTMLSync){this.synchronizeUI()
+}},synchronizeUI:function(){this.containerNode.scrollTop=this.lastScrollTop||0
+},show:function(state){var options=this.options;
+if(options.hasStatusBar){this.statusBarBox.style.display="inline";
+this.statusBarNode.style.display="inline"
+}if(options.hasToolButtons){this.toolButtonsNode.style.display="inline"
+}this.panelNode.style.display="block";
+this.visible=true;
+if(!this.parentPanel){Firebug.chrome.layout(this)
+}},hide:function(state){var options=this.options;
+if(options.hasStatusBar){this.statusBarBox.style.display="none";
+this.statusBarNode.style.display="none"
+}if(options.hasToolButtons){this.toolButtonsNode.style.display="none"
+}this.panelNode.style.display="none";
+this.visible=false
+},watchWindow:function(win){},unwatchWindow:function(win){},updateOption:function(name,value){},showToolbarButtons:function(buttonsId,show){try{if(!this.context.browser){if(FBTrace.DBG_ERRORS){FBTrace.sysout("firebug.Panel showToolbarButtons this.context has no browser, this:",this)
+}return
+}var buttons=this.context.browser.chrome.$(buttonsId);
+if(buttons){collapse(buttons,show?"false":"true")
+}}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.dumpProperties("firebug.Panel showToolbarButtons FAILS",exc);
+if(!this.context.browser){FBTrace.dumpStack("firebug.Panel showToolbarButtons no browser")
+}}}},supportsObject:function(object){return 0
+},hasObject:function(object){return false
+},select:function(object,forceUpdate){if(!object){object=this.getDefaultSelection(this.context)
+}if(FBTrace.DBG_PANELS){FBTrace.sysout("firebug.select "+this.name+" forceUpdate: "+forceUpdate+" "+object+((object==this.selection)?"==":"!=")+this.selection)
+}if(forceUpdate||object!=this.selection){this.selection=object;
+this.updateSelection(object)
+}},updateSelection:function(object){},markChange:function(skipSelf){if(this.dependents){if(skipSelf){for(var i=0;
+i<this.dependents.length;
+++i){var panelName=this.dependents[i];
+if(panelName!=this.name){this.context.invalidatePanels(panelName)
+}}}else{this.context.invalidatePanels.apply(this.context,this.dependents)
+}}},startInspecting:function(){},stopInspecting:function(object,cancelled){},getDefaultSelection:function(context){return null
+},search:function(text){},onContextMenu:function(event){if(!this.getContextMenuItems){return
+}cancelEvent(event,true);
+var target=event.target||event.srcElement;
+var menu=this.getContextMenuItems(this.selection,target);
+if(!menu){return
+}var contextMenu=new Menu({id:"fbPanelContextMenu",items:menu});
+contextMenu.show(event.clientX,event.clientY);
+return true
+}};
+Firebug.MeasureBox={startMeasuring:function(target){if(!this.measureBox){this.measureBox=target.ownerDocument.createElement("span");
+this.measureBox.className="measureBox"
+}copyTextStyles(target,this.measureBox);
+target.ownerDocument.body.appendChild(this.measureBox)
+},getMeasuringElement:function(){return this.measureBox
+},measureText:function(value){this.measureBox.innerHTML=value?escapeForSourceLine(value):"m";
+return{width:this.measureBox.offsetWidth,height:this.measureBox.offsetHeight-1}
+},measureInputText:function(value){value=value?escapeForTextNode(value):"m";
+if(!Firebug.showTextNodesWithWhitespace){value=value.replace(/\t/g,"mmmmmm").replace(/\ /g,"m")
+}this.measureBox.innerHTML=value;
+return{width:this.measureBox.offsetWidth,height:this.measureBox.offsetHeight-1}
+},getBox:function(target){var style=this.measureBox.ownerDocument.defaultView.getComputedStyle(this.measureBox,"");
+var box=getBoxFromStyles(style,this.measureBox);
+return box
+},stopMeasuring:function(){this.measureBox.parentNode.removeChild(this.measureBox)
+}};
+if(FBL.domplate){Firebug.Rep=domplate({className:"",inspectable:true,supportsObject:function(object,type){return false
+},inspectObject:function(object,context){Firebug.chrome.select(object)
+},browseObject:function(object,context){},persistObject:function(object,context){},getRealObject:function(object,context){return object
+},getTitle:function(object){var label=safeToString(object);
+var re=/\[object (.*?)\]/;
+var m=re.exec(label);
+if(m){return m[1]
+}else{if(isIE&&(label=="[object]"||typeof object=="object"&&typeof label=="undefined")){return"Object"
+}else{return label
+}}},getTooltip:function(object){return null
+},getContextMenuItems:function(object,target,context){return[]
+},STR:function(name){return $STR(name)
+},cropString:function(text){return cropString(text)
+},cropMultipleLines:function(text,limit){return cropMultipleLines(text,limit)
+},toLowerCase:function(text){return text?text.toLowerCase():text
+},plural:function(n){return n==1?"":"s"
+}})
+}}});
+FBL.ns(function(){with(FBL){FBL.Controller={controllers:null,controllerContext:null,initialize:function(context){this.controllers=[];
+this.controllerContext=context||Firebug.chrome
+},shutdown:function(){this.removeControllers()
+},addController:function(){for(var i=0,arg;
+arg=arguments[i];
+i++){if(typeof arg[0]=="string"){arg[0]=$$(arg[0],this.controllerContext)
+}var handler=arg[2];
+arg[2]=bind(handler,this);
+arg[3]=handler;
+this.controllers.push(arg);
+addEvent.apply(this,arg)
+}},removeController:function(){for(var i=0,arg;
+arg=arguments[i];
+i++){for(var j=0,c;
+c=this.controllers[j];
+j++){if(arg[0]==c[0]&&arg[1]==c[1]&&arg[2]==c[3]){removeEvent.apply(this,c)
+}}}},removeControllers:function(){for(var i=0,c;
+c=this.controllers[i];
+i++){removeEvent.apply(this,c)
+}}};
+FBL.PanelBar={panelMap:null,selectedPanel:null,parentPanelName:null,create:function(ownerPanel){this.panelMap={};
+this.ownerPanel=ownerPanel;
+if(ownerPanel){ownerPanel.sidePanelBarNode=createElement("span");
+ownerPanel.sidePanelBarNode.style.display="none";
+ownerPanel.sidePanelBarBoxNode.appendChild(ownerPanel.sidePanelBarNode)
+}var panels=Firebug.panelTypes;
+for(var i=0,p;
+p=panels[i];
+i++){if(!ownerPanel&&!p.prototype.parentPanel||ownerPanel&&p.prototype.parentPanel&&ownerPanel.name==p.prototype.parentPanel){this.addPanel(p.prototype.name)
+}}},destroy:function(){PanelBar.shutdown.call(this);
+for(var name in this.panelMap){this.removePanel(name);
+var panel=this.panelMap[name];
+panel.destroy();
+this.panelMap[name]=null;
+delete this.panelMap[name]
+}this.panelMap=null;
+this.ownerPanel=null
+},initialize:function(){if(this.ownerPanel){this.ownerPanel.sidePanelBarNode.style.display="inline"
+}for(var name in this.panelMap){(function(self,name){var onTabClick=function onTabClick(){self.selectPanel(name);
+return false
+};
+Firebug.chrome.addController([self.panelMap[name].tabNode,"mousedown",onTabClick])
+})(this,name)
+}},shutdown:function(){var selectedPanel=this.selectedPanel;
+if(selectedPanel){removeClass(selectedPanel.tabNode,"fbSelectedTab");
+selectedPanel.hide();
+selectedPanel.shutdown()
+}if(this.ownerPanel){this.ownerPanel.sidePanelBarNode.style.display="none"
+}this.selectedPanel=null
+},addPanel:function(panelName,parentPanel){var PanelType=Firebug.panelTypeMap[panelName];
+var panel=this.panelMap[panelName]=new PanelType();
+panel.create()
+},removePanel:function(panelName){var panel=this.panelMap[panelName];
+if(panel.hasOwnProperty(panelName)){panel.destroy()
+}},selectPanel:function(panelName){var selectedPanel=this.selectedPanel;
+var panel=this.panelMap[panelName];
+if(panel&&selectedPanel!=panel){if(selectedPanel){removeClass(selectedPanel.tabNode,"fbSelectedTab");
+selectedPanel.shutdown();
+selectedPanel.hide()
+}if(!panel.parentPanel){FirebugChrome.selectedPanelName=panelName
+}this.selectedPanel=panel;
+setClass(panel.tabNode,"fbSelectedTab");
+panel.show();
+panel.initialize()
+}},getPanel:function(panelName){var panel=this.panelMap[panelName];
+return panel
+}};
+FBL.Button=function(options){options=options||{};
+append(this,options);
+this.state="unpressed";
+this.display="unpressed";
+if(this.element){this.container=this.element.parentNode
+}else{this.shouldDestroy=true;
+this.container=this.owner.getPanel().toolButtonsNode;
+this.element=createElement("a",{className:this.baseClassName+" "+this.className+" fbHover",innerHTML:this.caption});
+if(this.title){this.element.title=this.title
+}this.container.appendChild(this.element)
+}};
+Button.prototype=extend(Controller,{type:"normal",caption:"caption",title:null,className:"",baseClassName:"fbButton",pressedClassName:"fbBtnPressed",element:null,container:null,owner:null,state:null,display:null,destroy:function(){this.shutdown();
+if(this.shouldDestroy){this.container.removeChild(this.element)
+}this.element=null;
+this.container=null;
+this.owner=null
+},initialize:function(){Controller.initialize.apply(this);
+var element=this.element;
+this.addController([element,"mousedown",this.handlePress]);
+if(this.type=="normal"){this.addController([element,"mouseup",this.handleUnpress],[element,"mouseout",this.handleUnpress],[element,"click",this.handleClick])
+}},shutdown:function(){Controller.shutdown.apply(this)
+},restore:function(){this.changeState("unpressed")
+},changeState:function(state){this.state=state;
+this.changeDisplay(state)
+},changeDisplay:function(display){if(display!=this.display){if(display=="pressed"){setClass(this.element,this.pressedClassName)
+}else{if(display=="unpressed"){removeClass(this.element,this.pressedClassName)
+}}this.display=display
+}},handlePress:function(event){cancelEvent(event,true);
+if(this.type=="normal"){this.changeDisplay("pressed");
+this.beforeClick=true
+}else{if(this.type=="toggle"){if(this.state=="pressed"){this.changeState("unpressed");
+if(this.onUnpress){this.onUnpress.apply(this.owner,arguments)
+}}else{this.changeState("pressed");
+if(this.onPress){this.onPress.apply(this.owner,arguments)
+}}if(this.onClick){this.onClick.apply(this.owner,arguments)
+}}}return false
+},handleUnpress:function(event){cancelEvent(event,true);
+if(this.beforeClick){this.changeDisplay("unpressed")
+}return false
+},handleClick:function(event){cancelEvent(event,true);
+if(this.type=="normal"){if(this.onClick){this.onClick.apply(this.owner)
+}this.changeState("unpressed")
+}this.beforeClick=false;
+return false
+}});
+FBL.IconButton=function(){Button.apply(this,arguments)
+};
+IconButton.prototype=extend(Button.prototype,{baseClassName:"fbIconButton",pressedClassName:"fbIconPressed"});
+var menuItemProps={"class":"$item.className",type:"$item.type",value:"$item.value",_command:"$item.command"};
+if(isIE6){menuItemProps.href="javascript:void(0)"
+}if(FBL.domplate){var MenuPlate=domplate(Firebug.Rep,{tag:DIV({"class":"fbMenu fbShadow"},DIV({"class":"fbMenuContent fbShadowContent"},FOR("item","$object.items|memberIterator",TAG("$item.tag",{item:"$item"})))),itemTag:A(menuItemProps,"$item.label"),checkBoxTag:A(extend(menuItemProps,{checked:"$item.checked"}),"$item.label"),radioButtonTag:A(extend(menuItemProps,{selected:"$item.selected"}),"$item.label"),groupTag:A(extend(menuItemProps,{child:"$item.child"}),"$item.label"),shortcutTag:A(menuItemProps,"$item.label",SPAN({"class":"fbMenuShortcutKey"},"$item.key")),separatorTag:SPAN({"class":"fbMenuSeparator"}),memberIterator:function(items){var result=[];
+for(var i=0,length=items.length;
+i<length;
+i++){var item=items[i];
+if(typeof item=="string"&&item.indexOf("-")==0){result.push({tag:this.separatorTag});
+continue
+}item=extend(item,{});
+item.type=item.type||"";
+item.value=item.value||"";
+var type=item.type;
+item.tag=this.itemTag;
+var className=item.className||"";
+className+="fbMenuOption fbHover ";
+if(type=="checkbox"){className+="fbMenuCheckBox ";
+item.tag=this.checkBoxTag
+}else{if(type=="radiobutton"){className+="fbMenuRadioButton ";
+item.tag=this.radioButtonTag
+}else{if(type=="group"){className+="fbMenuGroup ";
+item.tag=this.groupTag
+}else{if(type=="shortcut"){className+="fbMenuShortcut ";
+item.tag=this.shortcutTag
+}}}}if(item.checked){className+="fbMenuChecked "
+}else{if(item.selected){className+="fbMenuRadioSelected "
+}}if(item.disabled){className+="fbMenuDisabled "
+}item.className=className;
+item.label=$STR(item.label);
+result.push(item)
+}return result
+}})
+}FBL.Menu=function(options){if(!options.element){if(options.getItems){options.items=options.getItems()
+}options.element=MenuPlate.tag.append({object:options},getElementByClass(Firebug.chrome.document,"fbBody"),MenuPlate)
+}append(this,options);
+if(typeof this.element=="string"){this.id=this.element;
+this.element=$(this.id)
+}else{if(this.id){this.element.id=this.id
+}}this.element.firebugIgnore=true;
+this.elementStyle=this.element.style;
+this.isVisible=false;
+this.handleMouseDown=bind(this.handleMouseDown,this);
+this.handleMouseOver=bind(this.handleMouseOver,this);
+this.handleMouseOut=bind(this.handleMouseOut,this);
+this.handleWindowMouseDown=bind(this.handleWindowMouseDown,this)
+};
+var menuMap={};
+Menu.prototype=extend(Controller,{destroy:function(){this.hide();
+if(this.parentMenu){this.parentMenu.childMenu=null
+}this.element.parentNode.removeChild(this.element);
+this.element=null;
+this.elementStyle=null;
+this.parentMenu=null;
+this.parentTarget=null
+},initialize:function(){Controller.initialize.call(this);
+this.addController([this.element,"mousedown",this.handleMouseDown],[this.element,"mouseover",this.handleMouseOver])
+},shutdown:function(){Controller.shutdown.call(this)
+},show:function(x,y){this.initialize();
+if(this.isVisible){return
+}x=x||0;
+y=y||0;
+if(this.parentMenu){var oldChildMenu=this.parentMenu.childMenu;
+if(oldChildMenu&&oldChildMenu!=this){oldChildMenu.destroy()
+}this.parentMenu.childMenu=this
+}else{addEvent(Firebug.chrome.document,"mousedown",this.handleWindowMouseDown)
+}this.elementStyle.display="block";
+this.elementStyle.visibility="hidden";
+var size=Firebug.chrome.getSize();
+x=Math.min(x,size.width-this.element.clientWidth-10);
+x=Math.max(x,0);
+y=Math.min(y,size.height-this.element.clientHeight-10);
+y=Math.max(y,0);
+this.elementStyle.left=x+"px";
+this.elementStyle.top=y+"px";
+this.elementStyle.visibility="visible";
+this.isVisible=true;
+if(isFunction(this.onShow)){this.onShow.apply(this,arguments)
+}},hide:function(){this.clearHideTimeout();
+this.clearShowChildTimeout();
+if(!this.isVisible){return
+}this.elementStyle.display="none";
+if(this.childMenu){this.childMenu.destroy();
+this.childMenu=null
+}if(this.parentTarget){removeClass(this.parentTarget,"fbMenuGroupSelected")
+}this.isVisible=false;
+this.shutdown();
+if(isFunction(this.onHide)){this.onHide.apply(this,arguments)
+}},showChildMenu:function(target){var id=target.getAttribute("child");
+var parent=this;
+var target=target;
+this.showChildTimeout=Firebug.chrome.window.setTimeout(function(){var box=Firebug.chrome.getElementBox(target);
+var childMenuObject=menuMap.hasOwnProperty(id)?menuMap[id]:{element:$(id)};
+var childMenu=new Menu(extend(childMenuObject,{parentMenu:parent,parentTarget:target}));
+var offsetLeft=isIE6?-1:-6;
+childMenu.show(box.left+box.width+offsetLeft,box.top-6);
+setClass(target,"fbMenuGroupSelected")
+},350)
+},clearHideTimeout:function(){if(this.hideTimeout){Firebug.chrome.window.clearTimeout(this.hideTimeout);
+delete this.hideTimeout
+}},clearShowChildTimeout:function(){if(this.showChildTimeout){Firebug.chrome.window.clearTimeout(this.showChildTimeout);
+this.showChildTimeout=null
+}},handleMouseDown:function(event){cancelEvent(event,true);
+var topParent=this;
+while(topParent.parentMenu){topParent=topParent.parentMenu
+}var target=event.target||event.srcElement;
+target=getAncestorByClass(target,"fbMenuOption");
+if(!target||hasClass(target,"fbMenuGroup")){return false
+}if(target&&!hasClass(target,"fbMenuDisabled")){var type=target.getAttribute("type");
+if(type=="checkbox"){var checked=target.getAttribute("checked");
+var value=target.getAttribute("value");
+var wasChecked=hasClass(target,"fbMenuChecked");
+if(wasChecked){removeClass(target,"fbMenuChecked");
+target.setAttribute("checked","")
+}else{setClass(target,"fbMenuChecked");
+target.setAttribute("checked","true")
+}if(isFunction(this.onCheck)){this.onCheck.call(this,target,value,!wasChecked)
+}}if(type=="radiobutton"){var selectedRadios=getElementsByClass(target.parentNode,"fbMenuRadioSelected");
+var group=target.getAttribute("group");
+for(var i=0,length=selectedRadios.length;
+i<length;
+i++){radio=selectedRadios[i];
+if(radio.getAttribute("group")==group){removeClass(radio,"fbMenuRadioSelected");
+radio.setAttribute("selected","")
+}}setClass(target,"fbMenuRadioSelected");
+target.setAttribute("selected","true")
+}var handler=null;
+var cmd=target.command;
+if(isFunction(cmd)){handler=cmd
+}else{if(typeof cmd=="string"){handler=this[cmd]
+}}var closeMenu=true;
+if(handler){closeMenu=handler.call(this,target)!==false
+}if(closeMenu){topParent.hide()
+}}return false
+},handleWindowMouseDown:function(event){var target=event.target||event.srcElement;
+target=getAncestorByClass(target,"fbMenu");
+if(!target){removeEvent(Firebug.chrome.document,"mousedown",this.handleWindowMouseDown);
+this.hide()
+}},handleMouseOver:function(event){this.clearHideTimeout();
+this.clearShowChildTimeout();
+var target=event.target||event.srcElement;
+target=getAncestorByClass(target,"fbMenuOption");
+if(!target){return
+}var childMenu=this.childMenu;
+if(childMenu){removeClass(childMenu.parentTarget,"fbMenuGroupSelected");
+if(childMenu.parentTarget!=target&&childMenu.isVisible){childMenu.clearHideTimeout();
+childMenu.hideTimeout=Firebug.chrome.window.setTimeout(function(){childMenu.destroy()
+},300)
+}}if(hasClass(target,"fbMenuGroup")){this.showChildMenu(target)
+}}});
+append(Menu,{register:function(object){menuMap[object.id]=object
+},check:function(element){setClass(element,"fbMenuChecked");
+element.setAttribute("checked","true")
+},uncheck:function(element){removeClass(element,"fbMenuChecked");
+element.setAttribute("checked","")
+},disable:function(element){setClass(element,"fbMenuDisabled")
+},enable:function(element){removeClass(element,"fbMenuDisabled")
+}});
+function StatusBar(){}StatusBar.prototype=extend(Controller,{})
+}});
+FBL.ns(function(){with(FBL){var refreshDelay=300;
+var shouldFixElementFromPoint=isOpera||isSafari&&browserVersion<"532";
+var evalError="___firebug_evaluation_error___";
+var pixelsPerInch;
+var resetStyle="margin:0; padding:0; border:0; position:absolute; overflow:hidden; display:block;";
+var offscreenStyle=resetStyle+"top:-1234px; left:-1234px;";
+FBL.Context=function(win){this.window=win.window;
+this.document=win.document;
+this.browser=Env.browser;
+if(isIE&&!this.window.eval){this.window.execScript("null");
+if(!this.window.eval){throw new Error("Firebug Error: eval() method not found in this window")
+}}this.eval=this.window.eval("new Function('try{ return window.eval.apply(window,arguments) }catch(E){ E."+evalError+"=true; return E }')")
+};
+FBL.Context.prototype={browser:null,loaded:true,setTimeout:function(fn,delay){var win=this.window;
+if(win.setTimeout==this.setTimeout){throw new Error("setTimeout recursion")
+}var timeout=win.setTimeout.apply?win.setTimeout.apply(win,arguments):win.setTimeout(fn,delay);
+if(!this.timeouts){this.timeouts={}
+}this.timeouts[timeout]=1;
+return timeout
+},clearTimeout:function(timeout){clearTimeout(timeout);
+if(this.timeouts){delete this.timeouts[timeout]
+}},setInterval:function(fn,delay){var win=this.window;
+var timeout=win.setInterval.apply?win.setInterval.apply(win,arguments):win.setInterval(fn,delay);
+if(!this.intervals){this.intervals={}
+}this.intervals[timeout]=1;
+return timeout
+},clearInterval:function(timeout){clearInterval(timeout);
+if(this.intervals){delete this.intervals[timeout]
+}},invalidatePanels:function(){if(!this.invalidPanels){this.invalidPanels={}
+}for(var i=0;
+i<arguments.length;
+++i){var panelName=arguments[i];
+if(!Firebug.chrome||!Firebug.chrome.selectedPanel){return
+}var panel=Firebug.chrome.selectedPanel.sidePanelBar?Firebug.chrome.selectedPanel.sidePanelBar.getPanel(panelName,true):null;
+if(panel&&!panel.noRefresh){this.invalidPanels[panelName]=1
+}}if(this.refreshTimeout){this.clearTimeout(this.refreshTimeout);
+delete this.refreshTimeout
+}this.refreshTimeout=this.setTimeout(bindFixed(function(){var invalids=[];
+for(var panelName in this.invalidPanels){var panel=Firebug.chrome.selectedPanel.sidePanelBar?Firebug.chrome.selectedPanel.sidePanelBar.getPanel(panelName,true):null;
+if(panel){if(panel.visible&&!panel.editing){panel.refresh()
+}else{panel.needsRefresh=true
+}if(panel.editing){invalids.push(panelName)
+}}}delete this.invalidPanels;
+delete this.refreshTimeout;
+if(invalids.length){this.invalidatePanels.apply(this,invalids)
+}},this),refreshDelay)
+},evaluate:function(expr,context,api,errorHandler){expr=stripNewLines(expr);
+context=context||"window";
+var cmd,result;
+if(context=="window"){cmd=api?"with("+api+"){ ("+expr+") }":"("+expr+")";
+result=this.eval(cmd);
+if(result&&result[evalError]){cmd=api?"with("+api+"){ "+expr+" }":expr;
+result=this.eval(cmd)
+}}else{cmd=api?"(function(arguments){ with("+api+"){ return ("+expr+") } }).call("+context+",undefined)":"(function(arguments){ return ("+expr+") }).call("+context+",undefined)";
+result=this.eval(cmd);
+if(result&&result[evalError]){cmd=api?"(function(arguments){ with("+api+"){ "+expr+" } }).call("+context+",undefined)":"(function(arguments){ "+expr+" }).call("+context+",undefined)";
+result=this.eval(cmd)
+}}if(result&&result[evalError]){var msg=result.name?(result.name+": "):"";
+msg+=result.message||result;
+if(errorHandler){result=errorHandler(msg)
+}else{result=msg
+}}return result
+},getWindowSize:function(){var width=0,height=0,el;
+if(typeof this.window.innerWidth=="number"){width=this.window.innerWidth;
+height=this.window.innerHeight
+}else{if((el=this.document.documentElement)&&(el.clientHeight||el.clientWidth)){width=el.clientWidth;
+height=el.clientHeight
+}else{if((el=this.document.body)&&(el.clientHeight||el.clientWidth)){width=el.clientWidth;
+height=el.clientHeight
+}}}return{width:width,height:height}
+},getWindowScrollSize:function(){var width=0,height=0,el;
+if(!isIEQuiksMode&&(el=this.document.documentElement)&&(el.scrollHeight||el.scrollWidth)){width=el.scrollWidth;
+height=el.scrollHeight
+}if((el=this.document.body)&&(el.scrollHeight||el.scrollWidth)&&(el.scrollWidth>width||el.scrollHeight>height)){width=el.scrollWidth;
+height=el.scrollHeight
+}return{width:width,height:height}
+},getWindowScrollPosition:function(){var top=0,left=0,el;
+if(typeof this.window.pageYOffset=="number"){top=this.window.pageYOffset;
+left=this.window.pageXOffset
+}else{if((el=this.document.body)&&(el.scrollTop||el.scrollLeft)){top=el.scrollTop;
+left=el.scrollLeft
+}else{if((el=this.document.documentElement)&&(el.scrollTop||el.scrollLeft)){top=el.scrollTop;
+left=el.scrollLeft
+}}}return{top:top,left:left}
+},getElementFromPoint:function(x,y){if(shouldFixElementFromPoint){var scroll=this.getWindowScrollPosition();
+return this.document.elementFromPoint(x+scroll.left,y+scroll.top)
+}else{return this.document.elementFromPoint(x,y)
+}},getElementPosition:function(el){var left=0;
+var top=0;
+do{left+=el.offsetLeft;
+top+=el.offsetTop
+}while(el=el.offsetParent);
+return{left:left,top:top}
+},getElementBox:function(el){var result={};
+if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();
+var offset=isIE?this.document.body.clientTop||this.document.documentElement.clientTop:0;
+var scroll=this.getWindowScrollPosition();
+result.top=Math.round(rect.top-offset+scroll.top);
+result.left=Math.round(rect.left-offset+scroll.left);
+result.height=Math.round(rect.bottom-rect.top);
+result.width=Math.round(rect.right-rect.left)
+}else{var position=this.getElementPosition(el);
+result.top=position.top;
+result.left=position.left;
+result.height=el.offsetHeight;
+result.width=el.offsetWidth
+}return result
+},getMeasurement:function(el,name){var result={value:0,unit:"px"};
+var cssValue=this.getStyle(el,name);
+if(!cssValue){return result
+}if(cssValue.toLowerCase()=="auto"){return result
+}var reMeasure=/(\d+\.?\d*)(.*)/;
+var m=cssValue.match(reMeasure);
+if(m){result.value=m[1]-0;
+result.unit=m[2].toLowerCase()
+}return result
+},getMeasurementInPixels:function(el,name){if(!el){return null
+}var m=this.getMeasurement(el,name);
+var value=m.value;
+var unit=m.unit;
+if(unit=="px"){return value
+}else{if(unit=="pt"){return this.pointsToPixels(name,value)
+}}if(unit=="em"){return this.emToPixels(el,value)
+}else{if(unit=="%"){return this.percentToPixels(el,value)
+}}},getMeasurementBox1:function(el,name){var sufixes=["Top","Left","Bottom","Right"];
+var result=[];
+for(var i=0,sufix;
+sufix=sufixes[i];
+i++){result[i]=Math.round(this.getMeasurementInPixels(el,name+sufix))
+}return{top:result[0],left:result[1],bottom:result[2],right:result[3]}
+},getMeasurementBox:function(el,name){var result=[];
+var sufixes=name=="border"?["TopWidth","LeftWidth","BottomWidth","RightWidth"]:["Top","Left","Bottom","Right"];
+if(isIE){var propName,cssValue;
+var autoMargin=null;
+for(var i=0,sufix;
+sufix=sufixes[i];
+i++){propName=name+sufix;
+cssValue=el.currentStyle[propName]||el.style[propName];
+if(cssValue=="auto"){if(!autoMargin){autoMargin=this.getCSSAutoMarginBox(el)
+}result[i]=autoMargin[sufix.toLowerCase()]
+}else{result[i]=this.getMeasurementInPixels(el,propName)
+}}}else{for(var i=0,sufix;
+sufix=sufixes[i];
+i++){result[i]=this.getMeasurementInPixels(el,name+sufix)
+}}return{top:result[0],left:result[1],bottom:result[2],right:result[3]}
+},getCSSAutoMarginBox:function(el){if(isIE&&" meta title input script link a ".indexOf(" "+el.nodeName.toLowerCase()+" ")!=-1){return{top:0,left:0,bottom:0,right:0}
+}if(isIE&&" h1 h2 h3 h4 h5 h6 h7 ul p ".indexOf(" "+el.nodeName.toLowerCase()+" ")==-1){return{top:0,left:0,bottom:0,right:0}
+}var offsetTop=0;
+if(false&&isIEStantandMode){var scrollSize=Firebug.browser.getWindowScrollSize();
+offsetTop=scrollSize.height
+}var box=this.document.createElement("div");
+box.style.cssText="margin:0; padding:1px; border: 0; visibility: hidden;";
+var clone=el.cloneNode(false);
+var text=this.document.createTextNode("&nbsp;");
+clone.appendChild(text);
+box.appendChild(clone);
+this.document.body.appendChild(box);
+var marginTop=clone.offsetTop-box.offsetTop-1;
+var marginBottom=box.offsetHeight-clone.offsetHeight-2-marginTop;
+var marginLeft=clone.offsetLeft-box.offsetLeft-1;
+var marginRight=box.offsetWidth-clone.offsetWidth-2-marginLeft;
+this.document.body.removeChild(box);
+return{top:marginTop+offsetTop,left:marginLeft,bottom:marginBottom-offsetTop,right:marginRight}
+},getFontSizeInPixels:function(el){var size=this.getMeasurement(el,"fontSize");
+if(size.unit=="px"){return size.value
+}var computeDirtyFontSize=function(el,calibration){var div=this.document.createElement("div");
+var divStyle=offscreenStyle;
+if(calibration){divStyle+=" font-size:"+calibration+"px;"
+}div.style.cssText=divStyle;
+div.innerHTML="A";
+el.appendChild(div);
+var value=div.offsetHeight;
+el.removeChild(div);
+return value
+};
+var rate=200/225;
+var value=computeDirtyFontSize(el);
+return value*rate
+},pointsToPixels:function(name,value,returnFloat){var axis=/Top$|Bottom$/.test(name)?"y":"x";
+var result=value*pixelsPerInch[axis]/72;
+return returnFloat?result:Math.round(result)
+},emToPixels:function(el,value){if(!el){return null
+}var fontSize=this.getFontSizeInPixels(el);
+return Math.round(value*fontSize)
+},exToPixels:function(el,value){if(!el){return null
+}var div=this.document.createElement("div");
+div.style.cssText=offscreenStyle+"width:"+value+"ex;";
+el.appendChild(div);
+var value=div.offsetWidth;
+el.removeChild(div);
+return value
+},percentToPixels:function(el,value){if(!el){return null
+}var div=this.document.createElement("div");
+div.style.cssText=offscreenStyle+"width:"+value+"%;";
+el.appendChild(div);
+var value=div.offsetWidth;
+el.removeChild(div);
+return value
+},getStyle:isIE?function(el,name){return el.currentStyle[name]||el.style[name]||undefined
+}:function(el,name){return this.document.defaultView.getComputedStyle(el,null)[name]||el.style[name]||undefined
+}}
+}});
+FBL.ns(function(){with(FBL){var WindowDefaultOptions={type:"frame",id:"FirebugUI",height:250},commandLine,fbTop,fbContent,fbContentStyle,fbBottom,fbBtnInspect,fbToolbar,fbPanelBox1,fbPanelBox1Style,fbPanelBox2,fbPanelBox2Style,fbPanelBar2Box,fbPanelBar2BoxStyle,fbHSplitter,fbVSplitter,fbVSplitterStyle,fbPanel1,fbPanel1Style,fbPanel2,fbPanel2Style,fbConsole,fbConsoleStyle,fbHTML,fbCommandLine,fbLargeCommandLine,fbLargeCommandButtons,topHeight,topPartialHeight,chromeRedrawSkipRate=isIE?75:isOpera?80:75,lastSelectedPanelName,focusCommandLineState=0,lastFocusedPanelName,lastHSplitterMouseMove=0,onHSplitterMouseMoveBuffer=null,onHSplitterMouseMoveTimer=null,lastVSplitterMouseMove=0;
+FBL.FirebugChrome={isOpen:false,height:250,sidePanelWidth:350,selectedPanelName:"Console",selectedHTMLElementId:null,chromeMap:{},htmlSelectionStack:[],consoleMessageQueue:[],create:function(){if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("FirebugChrome.create","creating chrome window")
+}createChromeWindow()
+},initialize:function(){if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("FirebugChrome.initialize","initializing chrome window")
+}if(Env.chrome.type=="frame"||Env.chrome.type=="div"){ChromeMini.create(Env.chrome)
+}var chrome=Firebug.chrome=new Chrome(Env.chrome);
+FirebugChrome.chromeMap[chrome.type]=chrome;
+addGlobalEvent("keydown",onGlobalKeyDown);
+if(Env.Options.enablePersistent&&chrome.type=="popup"){var frame=FirebugChrome.chromeMap.frame;
+if(frame){frame.close()
+}chrome.initialize()
+}},clone:function(FBChrome){for(var name in FBChrome){var prop=FBChrome[name];
+if(FBChrome.hasOwnProperty(name)&&!isFunction(prop)){this[name]=prop
+}}}};
+var createChromeWindow=function(options){options=extend(WindowDefaultOptions,options||{});
+var chrome={},context=options.context||Env.browser,type=chrome.type=Env.Options.enablePersistent?"popup":options.type,isChromeFrame=type=="frame",useLocalSkin=Env.useLocalSkin,url=useLocalSkin?Env.Location.skin:"about:blank",body=context.document.getElementsByTagName("body")[0],formatNode=function(node){if(!Env.isDebugMode){node.firebugIgnore=true
+}node.style.border="0";
+node.style.visibility="hidden";
+node.style.zIndex="2147483647";
+node.style.position=noFixedPosition?"absolute":"fixed";
+node.style.width="100%";
+node.style.left="0";
+node.style.bottom=noFixedPosition?"-1px":"0";
+node.style.height=options.height+"px";
+if(isFirefox){node.style.display="none"
+}},createChromeDiv=function(){var node=chrome.node=createGlobalElement("div"),style=createGlobalElement("style"),css=FirebugChrome.Skin.CSS,rules=".fbBody *{margin:0;padding:0;font-size:11px;line-height:13px;color:inherit;}"+css+".fbBody #fbHSplitter{position:absolute !important;} .fbBody #fbHTML span{line-height:14px;} .fbBody .lineNo div{line-height:inherit !important;}";
+style.type="text/css";
+if(style.styleSheet){style.styleSheet.cssText=rules
+}else{style.appendChild(context.document.createTextNode(rules))
+}document.getElementsByTagName("head")[0].appendChild(style);
+node.className="fbBody";
+node.style.overflow="hidden";
+node.innerHTML=getChromeDivTemplate();
+if(isIE){setTimeout(function(){node.firstChild.style.height="1px";
+node.firstChild.style.position="static"
+},0)
+}formatNode(node);
+body.appendChild(node);
+chrome.window=window;
+chrome.document=document;
+onChromeLoad(chrome)
+};
+try{if(type=="div"){createChromeDiv();
+return
+}else{if(isChromeFrame){var node=chrome.node=createGlobalElement("iframe");
+node.setAttribute("src",url);
+node.setAttribute("frameBorder","0");
+formatNode(node);
+body.appendChild(node);
+node.id=options.id
+}else{var height=FirebugChrome.height||options.height,options=["true,top=",Math.max(screen.availHeight-height-61,0),",left=0,height=",height,",width=",screen.availWidth-10,",resizable"].join(""),node=chrome.node=context.window.open(url,"popup",options);
+if(node){try{node.focus()
+}catch(E){alert("Firebug Error: Firebug popup was blocked.");
+return
+}}else{alert("Firebug Error: Firebug popup was blocked.");
+return
+}}}if(!useLocalSkin){var tpl=getChromeTemplate(!isChromeFrame),doc=isChromeFrame?node.contentWindow.document:node.document;
+doc.write(tpl);
+doc.close()
+}var win,waitDelay=useLocalSkin?isChromeFrame?200:300:100,waitForWindow=function(){if(isChromeFrame&&(win=node.contentWindow)&&node.contentWindow.document.getElementById("fbCommandLine")||!isChromeFrame&&(win=node.window)&&node.document&&node.document.getElementById("fbCommandLine")){chrome.window=win.window;
+chrome.document=win.document;
+setTimeout(function(){onChromeLoad(chrome)
+},0)
+}else{setTimeout(waitForWindow,waitDelay)
+}};
+waitForWindow()
+}catch(e){var msg=e.message||e;
+if(/access/i.test(msg)){if(isChromeFrame){body.removeChild(node)
+}else{if(type=="popup"){node.close()
+}}createChromeDiv()
+}else{alert("Firebug Error: Firebug GUI could not be created.")
+}}};
+var onChromeLoad=function onChromeLoad(chrome){Env.chrome=chrome;
+if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Chrome onChromeLoad","chrome window loaded")
+}if(Env.Options.enablePersistent){Env.FirebugChrome=FirebugChrome;
+chrome.window.Firebug=chrome.window.Firebug||{};
+chrome.window.Firebug.SharedEnv=Env;
+if(Env.isDevelopmentMode){Env.browser.window.FBDev.loadChromeApplication(chrome)
+}else{var doc=chrome.document;
+var script=doc.createElement("script");
+script.src=Env.Location.app+"#remote,persist";
+doc.getElementsByTagName("head")[0].appendChild(script)
+}}else{if(chrome.type=="frame"||chrome.type=="div"){setTimeout(function(){FBL.Firebug.initialize()
+},0)
+}else{if(chrome.type=="popup"){var oldChrome=FirebugChrome.chromeMap.frame;
+var newChrome=new Chrome(chrome);
+dispatch(newChrome.panelMap,"detach",[oldChrome,newChrome]);
+if(oldChrome){oldChrome.close()
+}newChrome.reattach(oldChrome,newChrome)
+}}}};
+var getChromeDivTemplate=function(){return FirebugChrome.Skin.HTML
+};
+var getChromeTemplate=function(isPopup){var tpl=FirebugChrome.Skin;
+var r=[],i=-1;
+r[++i]='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">';
+r[++i]="<html><head><title>";
+r[++i]=Firebug.version;
+r[++i]="</title><style>html,body{margin:0;padding:0;overflow:hidden;}";
+r[++i]=tpl.CSS;
+r[++i]="</style>";
+r[++i]='</head><body class="fbBody'+(isPopup?" FirebugPopup":"")+'">';
+r[++i]=tpl.HTML;
+r[++i]="</body></html>";
+return r.join("")
+};
+var Chrome=function Chrome(chrome){var type=chrome.type;
+var Base=type=="frame"||type=="div"?ChromeFrameBase:ChromePopupBase;
+append(this,Base);
+append(this,chrome);
+append(this,new Context(chrome.window));
+FirebugChrome.chromeMap[type]=this;
+Firebug.chrome=this;
+Env.chrome=chrome.window;
+this.commandLineVisible=false;
+this.sidePanelVisible=false;
+this.create();
+return this
+};
+var ChromeBase={};
+append(ChromeBase,Controller);
+append(ChromeBase,PanelBar);
+append(ChromeBase,{node:null,type:null,document:null,window:null,sidePanelVisible:false,commandLineVisible:false,largeCommandLineVisible:false,inspectButton:null,create:function(){PanelBar.create.call(this);
+if(Firebug.Inspector){this.inspectButton=new Button({type:"toggle",element:$("fbChrome_btInspect"),owner:Firebug.Inspector,onPress:Firebug.Inspector.startInspecting,onUnpress:Firebug.Inspector.stopInspecting})
+}},destroy:function(){if(Firebug.Inspector){this.inspectButton.destroy()
+}PanelBar.destroy.call(this);
+this.shutdown()
+},testMenu:function(){var firebugMenu=new Menu({id:"fbFirebugMenu",items:[{label:"Open Firebug",type:"shortcut",key:isFirefox?"Shift+F12":"F12",checked:true,command:"toggleChrome"},{label:"Open Firebug in New Window",type:"shortcut",key:isFirefox?"Ctrl+Shift+F12":"Ctrl+F12",command:"openPopup"},{label:"Inspect Element",type:"shortcut",key:"Ctrl+Shift+C",command:"toggleInspect"},{label:"Command Line",type:"shortcut",key:"Ctrl+Shift+L",command:"focusCommandLine"},"-",{label:"Options",type:"group",child:"fbFirebugOptionsMenu"},"-",{label:"Firebug Lite Website...",command:"visitWebsite"},{label:"Discussion Group...",command:"visitDiscussionGroup"},{label:"Issue Tracker...",command:"visitIssueTracker"}],onHide:function(){iconButton.restore()
+},toggleChrome:function(){Firebug.chrome.toggle()
+},openPopup:function(){Firebug.chrome.toggle(true,true)
+},toggleInspect:function(){Firebug.Inspector.toggleInspect()
+},focusCommandLine:function(){Firebug.chrome.focusCommandLine()
+},visitWebsite:function(){this.visit("http://getfirebug.com/lite.html")
+},visitDiscussionGroup:function(){this.visit("http://groups.google.com/group/firebug")
+},visitIssueTracker:function(){this.visit("http://code.google.com/p/fbug/issues/list")
+},visit:function(url){window.open(url)
+}});
+var firebugOptionsMenu={id:"fbFirebugOptionsMenu",getItems:function(){var cookiesDisabled=!Firebug.saveCookies;
+return[{label:"Save Options in Cookies",type:"checkbox",value:"saveCookies",checked:Firebug.saveCookies,command:"saveOptions"},"-",{label:"Start Opened",type:"checkbox",value:"startOpened",checked:Firebug.startOpened,disabled:cookiesDisabled},{label:"Start in New Window",type:"checkbox",value:"startInNewWindow",checked:Firebug.startInNewWindow,disabled:cookiesDisabled},{label:"Show Icon When Hidden",type:"checkbox",value:"showIconWhenHidden",checked:Firebug.showIconWhenHidden,disabled:cookiesDisabled},"-",{label:"Override Console Object",type:"checkbox",value:"overrideConsole",checked:Firebug.overrideConsole,disabled:cookiesDisabled},{label:"Ignore Firebug Elements",type:"checkbox",value:"ignoreFirebugElements",checked:Firebug.ignoreFirebugElements,disabled:cookiesDisabled},{label:"Disable When Firebug Active",type:"checkbox",value:"disableWhenFirebugActive",checked:Firebug.disableWhenFirebugActive,disabled:cookiesDisabled},"-",{label:"Enable Trace Mode",type:"checkbox",value:"enableTrace",checked:Firebug.enableTrace,disabled:cookiesDisabled},{label:"Enable Persistent Mode (experimental)",type:"checkbox",value:"enablePersistent",checked:Firebug.enablePersistent,disabled:cookiesDisabled},"-",{label:"Restore Options",command:"restorePrefs",disabled:cookiesDisabled}]
+},onCheck:function(target,value,checked){Firebug.setPref(value,checked)
+},saveOptions:function(target){var saveEnabled=target.getAttribute("checked");
+if(!saveEnabled){this.restorePrefs()
+}this.updateMenu(target);
+return false
+},restorePrefs:function(target){Firebug.restorePrefs();
+if(Firebug.saveCookies){Firebug.savePrefs()
+}else{Firebug.erasePrefs()
+}if(target){this.updateMenu(target)
+}return false
+},updateMenu:function(target){var options=getElementsByClass(target.parentNode,"fbMenuOption");
+var firstOption=options[0];
+var enabled=Firebug.saveCookies;
+if(enabled){Menu.check(firstOption)
+}else{Menu.uncheck(firstOption)
+}if(enabled){Menu.check(options[0])
+}else{Menu.uncheck(options[0])
+}for(var i=1,length=options.length;
+i<length;
+i++){var option=options[i];
+var value=option.getAttribute("value");
+var pref=Firebug[value];
+if(pref){Menu.check(option)
+}else{Menu.uncheck(option)
+}if(enabled){Menu.enable(option)
+}else{Menu.disable(option)
+}}}};
+Menu.register(firebugOptionsMenu);
+var menu=firebugMenu;
+var testMenuClick=function(event){cancelEvent(event,true);
+var target=event.target||event.srcElement;
+if(menu.isVisible){menu.hide()
+}else{var offsetLeft=isIE6?1:-4,chrome=Firebug.chrome,box=chrome.getElementBox(target),offset=chrome.type=="div"?chrome.getElementPosition(chrome.node):{top:0,left:0};
+menu.show(box.left+offsetLeft-offset.left,box.top+box.height-5-offset.top)
+}return false
+};
+var iconButton=new IconButton({type:"toggle",element:$("fbFirebugButton"),onClick:testMenuClick});
+iconButton.initialize()
+},initialize:function(){if(Env.bookmarkletOutdated){Firebug.Console.logFormatted(["A new bookmarklet version is available. Please visit http://getfirebug.com/firebuglite#Install and update it."],Firebug.context,"warn")
+}if(Firebug.Console){Firebug.Console.flush()
+}if(Firebug.Trace){FBTrace.flush(Firebug.Trace)
+}if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.chrome.initialize","initializing chrome application")
+}Controller.initialize.call(this);
+PanelBar.initialize.call(this);
+fbTop=$("fbTop");
+fbContent=$("fbContent");
+fbContentStyle=fbContent.style;
+fbBottom=$("fbBottom");
+fbBtnInspect=$("fbBtnInspect");
+fbToolbar=$("fbToolbar");
+fbPanelBox1=$("fbPanelBox1");
+fbPanelBox1Style=fbPanelBox1.style;
+fbPanelBox2=$("fbPanelBox2");
+fbPanelBox2Style=fbPanelBox2.style;
+fbPanelBar2Box=$("fbPanelBar2Box");
+fbPanelBar2BoxStyle=fbPanelBar2Box.style;
+fbHSplitter=$("fbHSplitter");
+fbVSplitter=$("fbVSplitter");
+fbVSplitterStyle=fbVSplitter.style;
+fbPanel1=$("fbPanel1");
+fbPanel1Style=fbPanel1.style;
+fbPanel2=$("fbPanel2");
+fbPanel2Style=fbPanel2.style;
+fbConsole=$("fbConsole");
+fbConsoleStyle=fbConsole.style;
+fbHTML=$("fbHTML");
+fbCommandLine=$("fbCommandLine");
+fbLargeCommandLine=$("fbLargeCommandLine");
+fbLargeCommandButtons=$("fbLargeCommandButtons");
+topHeight=fbTop.offsetHeight;
+topPartialHeight=fbToolbar.offsetHeight;
+disableTextSelection($("fbToolbar"));
+disableTextSelection($("fbPanelBarBox"));
+disableTextSelection($("fbPanelBar1"));
+disableTextSelection($("fbPanelBar2"));
+if(isIE6&&Firebug.Selector){var as=$$(".fbHover");
+for(var i=0,a;
+a=as[i];
+i++){a.setAttribute("href","javascript:void(0)")
+}}if(Firebug.Inspector){this.inspectButton.initialize()
+}this.addController([$("fbLargeCommandLineIcon"),"click",this.showLargeCommandLine]);
+var self=this;
+setTimeout(function(){self.selectPanel(FirebugChrome.selectedPanelName);
+if(FirebugChrome.selectedPanelName=="Console"&&Firebug.CommandLine){Firebug.chrome.focusCommandLine()
+}},0);
+var onPanelMouseDown=function onPanelMouseDown(event){var target=event.target||event.srcElement;
+if(FBL.isLeftClick(event)){var editable=FBL.getAncestorByClass(target,"editable");
+if(editable){Firebug.Editor.startEditing(editable);
+FBL.cancelEvent(event)
+}else{if(!hasClass(target,"textEditorInner")){Firebug.Editor.stopEditing()
+}}}else{if(FBL.isMiddleClick(event)&&Firebug.getRepNode(target)){FBL.cancelEvent(event)
+}}};
+Firebug.getElementPanel=function(element){var panelNode=getAncestorByClass(element,"fbPanel");
+var id=panelNode.id.substr(2);
+var panel=Firebug.chrome.panelMap[id];
+if(!panel){if(Firebug.chrome.selectedPanel.sidePanelBar){panel=Firebug.chrome.selectedPanel.sidePanelBar.panelMap[id]
+}}return panel
+};
+var onKeyCodeListenersMap=[];
+var onKeyCodeListen=function(event){for(var keyCode in onKeyCodeListenersMap){var listeners=onKeyCodeListenersMap[keyCode];
+for(var i=0,listener;
+listener=listeners[i];
+i++){var filter=listener.filter||FBL.noKeyModifiers;
+if(event.keyCode==keyCode&&(!filter||filter(event))){listener.listener();
+FBL.cancelEvent(event,true);
+return false
+}}}};
+addEvent(Firebug.chrome.document,"keydown",onKeyCodeListen);
+Firebug.chrome.keyCodeListen=function(key,filter,listener,capture){var keyCode=KeyEvent["DOM_VK_"+key];
+if(!onKeyCodeListenersMap[keyCode]){onKeyCodeListenersMap[keyCode]=[]
+}onKeyCodeListenersMap[keyCode].push({filter:filter,listener:listener});
+return keyCode
+};
+Firebug.chrome.keyIgnore=function(keyCode){onKeyCodeListenersMap[keyCode]=null;
+delete onKeyCodeListenersMap[keyCode]
+};
+this.addController([fbPanel1,"mousedown",onPanelMouseDown],[fbPanel2,"mousedown",onPanelMouseDown]);
+if(FBL.domplate){this.testMenu()
+}},shutdown:function(){if(Firebug.Inspector){this.inspectButton.shutdown()
+}restoreTextSelection($("fbToolbar"));
+restoreTextSelection($("fbPanelBarBox"));
+restoreTextSelection($("fbPanelBar1"));
+restoreTextSelection($("fbPanelBar2"));
+Controller.shutdown.call(this);
+PanelBar.shutdown.call(this);
+fbTop=null;
+fbContent=null;
+fbContentStyle=null;
+fbBottom=null;
+fbBtnInspect=null;
+fbToolbar=null;
+fbPanelBox1=null;
+fbPanelBox1Style=null;
+fbPanelBox2=null;
+fbPanelBox2Style=null;
+fbPanelBar2Box=null;
+fbPanelBar2BoxStyle=null;
+fbHSplitter=null;
+fbVSplitter=null;
+fbVSplitterStyle=null;
+fbPanel1=null;
+fbPanel1Style=null;
+fbPanel2=null;
+fbConsole=null;
+fbConsoleStyle=null;
+fbHTML=null;
+fbCommandLine=null;
+fbLargeCommandLine=null;
+fbLargeCommandButtons=null;
+topHeight=null;
+topPartialHeight=null
+},toggle:function(forceOpen,popup){if(popup){this.detach()
+}else{if(isOpera&&Firebug.chrome.type=="popup"&&Firebug.chrome.node.closed){var frame=FirebugChrome.chromeMap.frame;
+frame.reattach();
+FirebugChrome.chromeMap.popup=null;
+frame.open();
+return
+}if(Firebug.chrome.type=="popup"){return
+}var shouldOpen=forceOpen||!FirebugChrome.isOpen;
+if(shouldOpen){this.open()
+}else{this.close()
+}}},detach:function(){if(!FirebugChrome.chromeMap.popup){createChromeWindow({type:"popup"})
+}},reattach:function(oldChrome,newChrome){Firebug.browser.window.Firebug=Firebug;
+var newPanelMap=newChrome.panelMap;
+var oldPanelMap=oldChrome.panelMap;
+var panel;
+for(var name in newPanelMap){panel=newPanelMap[name];
+if(panel.options.innerHTMLSync){panel.contentNode.innerHTML=oldPanelMap[name].contentNode.innerHTML
+}}Firebug.chrome=newChrome;
+if(newChrome.type=="popup"){newChrome.initialize()
+}else{FirebugChrome.selectedPanelName=oldChrome.selectedPanel.name
+}dispatch(newPanelMap,"reattach",[oldChrome,newChrome])
+},draw:function(){var size=this.getSize();
+var commandLineHeight=Firebug.chrome.commandLineVisible?fbCommandLine.offsetHeight:0,y=Math.max(size.height,topHeight),heightValue=Math.max(y-topHeight-commandLineHeight,0),height=heightValue+"px",sideWidthValue=Firebug.chrome.sidePanelVisible?FirebugChrome.sidePanelWidth:0,width=Math.max(size.width-sideWidthValue,0)+"px";
+fbPanelBox1Style.height=height;
+fbPanel1Style.height=height;
+if(isIE||isOpera){fbVSplitterStyle.height=Math.max(y-topPartialHeight-commandLineHeight,0)+"px"
+}fbPanelBox1Style.width=width;
+fbPanel1Style.width=width;
+if(Firebug.chrome.sidePanelVisible){sideWidthValue=Math.max(sideWidthValue-6,0);
+var sideWidth=sideWidthValue+"px";
+fbPanelBox2Style.width=sideWidth;
+fbVSplitterStyle.right=sideWidth;
+if(Firebug.chrome.largeCommandLineVisible){fbLargeCommandLine=$("fbLargeCommandLine");
+fbLargeCommandLine.style.height=heightValue-4+"px";
+fbLargeCommandLine.style.width=sideWidthValue-2+"px";
+fbLargeCommandButtons=$("fbLargeCommandButtons");
+fbLargeCommandButtons.style.width=sideWidth
+}else{fbPanel2Style.height=height;
+fbPanel2Style.width=sideWidth;
+fbPanelBar2BoxStyle.width=sideWidth
+}}},getSize:function(){return this.type=="div"?{height:this.node.offsetHeight,width:this.node.offsetWidth}:this.getWindowSize()
+},resize:function(){var self=this;
+setTimeout(function(){self.draw();
+if(noFixedPosition&&(self.type=="frame"||self.type=="div")){self.fixIEPosition()
+}},0)
+},layout:function(panel){if(FBTrace.DBG_CHROME){FBTrace.sysout("Chrome.layout","")
+}var options=panel.options;
+changeCommandLineVisibility(options.hasCommandLine);
+changeSidePanelVisibility(panel.hasSidePanel);
+Firebug.chrome.draw()
+},showLargeCommandLine:function(hideToggleIcon){var chrome=Firebug.chrome;
+if(!chrome.largeCommandLineVisible){chrome.largeCommandLineVisible=true;
+if(chrome.selectedPanel.options.hasCommandLine){if(Firebug.CommandLine){Firebug.CommandLine.blur()
+}changeCommandLineVisibility(false)
+}changeSidePanelVisibility(true);
+fbLargeCommandLine.style.display="block";
+fbLargeCommandButtons.style.display="block";
+fbPanel2Style.display="none";
+fbPanelBar2BoxStyle.display="none";
+chrome.draw();
+fbLargeCommandLine.focus();
+if(Firebug.CommandLine){Firebug.CommandLine.setMultiLine(true)
+}}},hideLargeCommandLine:function(){if(Firebug.chrome.largeCommandLineVisible){Firebug.chrome.largeCommandLineVisible=false;
+if(Firebug.CommandLine){Firebug.CommandLine.setMultiLine(false)
+}fbLargeCommandLine.blur();
+fbPanel2Style.display="block";
+fbPanelBar2BoxStyle.display="block";
+fbLargeCommandLine.style.display="none";
+fbLargeCommandButtons.style.display="none";
+changeSidePanelVisibility(false);
+if(Firebug.chrome.selectedPanel.options.hasCommandLine){changeCommandLineVisibility(true)
+}Firebug.chrome.draw()
+}},focusCommandLine:function(){var selectedPanelName=this.selectedPanel.name,panelToSelect;
+if(focusCommandLineState==0||selectedPanelName!="Console"){focusCommandLineState=0;
+lastFocusedPanelName=selectedPanelName;
+panelToSelect="Console"
+}if(focusCommandLineState==1){panelToSelect=lastFocusedPanelName
+}this.selectPanel(panelToSelect);
+try{if(Firebug.CommandLine){if(panelToSelect=="Console"){Firebug.CommandLine.focus()
+}else{Firebug.CommandLine.blur()
+}}}catch(e){}focusCommandLineState=++focusCommandLineState%2
+}});
+var ChromeFrameBase=extend(ChromeBase,{create:function(){ChromeBase.create.call(this);
+if(isFirefox){this.node.style.display="block"
+}if(Env.Options.startInNewWindow){this.close();
+this.toggle(true,true);
+return
+}if(Env.Options.startOpened){this.open()
+}else{this.close()
+}},destroy:function(){removeGlobalEvent("keydown",onGlobalKeyDown);
+ChromeBase.destroy.call(this);
+this.document=null;
+delete this.document;
+this.window=null;
+delete this.window;
+this.node.parentNode.removeChild(this.node);
+this.node=null;
+delete this.node
+},initialize:function(){ChromeBase.initialize.call(this);
+this.addController([Firebug.browser.window,"resize",this.resize],[$("fbWindow_btClose"),"click",this.close],[$("fbWindow_btDetach"),"click",this.detach],[$("fbWindow_btDeactivate"),"click",this.deactivate]);
+if(!Env.Options.enablePersistent){this.addController([Firebug.browser.window,"unload",Firebug.shutdown])
+}if(noFixedPosition){this.addController([Firebug.browser.window,"scroll",this.fixIEPosition])
+}fbVSplitter.onmousedown=onVSplitterMouseDown;
+fbHSplitter.onmousedown=onHSplitterMouseDown;
+this.isInitialized=true
+},shutdown:function(){fbVSplitter.onmousedown=null;
+fbHSplitter.onmousedown=null;
+ChromeBase.shutdown.apply(this);
+this.isInitialized=false
+},reattach:function(){var frame=FirebugChrome.chromeMap.frame;
+ChromeBase.reattach(FirebugChrome.chromeMap.popup,this)
+},open:function(){if(!FirebugChrome.isOpen){FirebugChrome.isOpen=true;
+if(Env.isChromeExtension){localStorage.setItem("Firebug","1,1")
+}var node=this.node;
+node.style.visibility="hidden";
+if(Firebug.showIconWhenHidden){if(ChromeMini.isInitialized){ChromeMini.shutdown()
+}}else{node.style.display="block"
+}var main=$("fbChrome");
+main.style.display="block";
+var self=this;
+setTimeout(function(){node.style.visibility="visible";
+self.initialize();
+if(noFixedPosition){self.fixIEPosition()
+}self.draw()
+},10)
+}},close:function(){if(FirebugChrome.isOpen||!this.isInitialized){if(this.isInitialized){this.shutdown()
+}FirebugChrome.isOpen=false;
+if(Env.isChromeExtension){localStorage.setItem("Firebug","1,0")
+}var node=this.node;
+if(Firebug.showIconWhenHidden){node.style.visibility="hidden";
+var main=$("fbChrome",FirebugChrome.chromeMap.frame.document);
+main.style.display="none";
+ChromeMini.initialize();
+node.style.visibility="visible"
+}else{node.style.display="none"
+}}},deactivate:function(){Firebug.shutdown();
+if(Env.isChromeExtension){localStorage.removeItem("Firebug");
+chromeExtensionDispatch("FB_deactivate")
+}},fixIEPosition:function(){var doc=this.document;
+var offset=isIE?doc.body.clientTop||doc.documentElement.clientTop:0;
+var size=Firebug.browser.getWindowSize();
+var scroll=Firebug.browser.getWindowScrollPosition();
+var maxHeight=size.height;
+var height=this.node.offsetHeight;
+var bodyStyle=doc.body.currentStyle;
+this.node.style.top=maxHeight-height+scroll.top+"px";
+if((this.type=="frame"||this.type=="div")&&(bodyStyle.marginLeft||bodyStyle.marginRight)){this.node.style.width=size.width+"px"
+}if(fbVSplitterStyle){fbVSplitterStyle.right=FirebugChrome.sidePanelWidth+"px"
+}this.draw()
+}});
+var ChromeMini=extend(Controller,{create:function(chrome){append(this,chrome);
+this.type="mini"
+},initialize:function(){Controller.initialize.apply(this);
+var doc=FirebugChrome.chromeMap.frame.document;
+var mini=$("fbMiniChrome",doc);
+mini.style.display="block";
+var miniIcon=$("fbMiniIcon",doc);
+var width=miniIcon.offsetWidth+10;
+miniIcon.title="Open "+Firebug.version;
+var errors=$("fbMiniErrors",doc);
+if(errors.offsetWidth){width+=errors.offsetWidth+10
+}var node=this.node;
+node.style.height="27px";
+node.style.width=width+"px";
+node.style.left="";
+node.style.right=0;
+if(this.node.nodeName.toLowerCase()=="iframe"){node.setAttribute("allowTransparency","true");
+this.document.body.style.backgroundColor="transparent"
+}else{node.style.background="transparent"
+}if(noFixedPosition){this.fixIEPosition()
+}this.addController([$("fbMiniIcon",doc),"click",onMiniIconClick]);
+if(noFixedPosition){this.addController([Firebug.browser.window,"scroll",this.fixIEPosition])
+}this.isInitialized=true
+},shutdown:function(){var node=this.node;
+node.style.height=FirebugChrome.height+"px";
+node.style.width="100%";
+node.style.left=0;
+node.style.right="";
+if(this.node.nodeName.toLowerCase()=="iframe"){node.setAttribute("allowTransparency","false");
+this.document.body.style.backgroundColor="#fff"
+}else{node.style.background="#fff"
+}if(noFixedPosition){this.fixIEPosition()
+}var doc=FirebugChrome.chromeMap.frame.document;
+var mini=$("fbMiniChrome",doc);
+mini.style.display="none";
+Controller.shutdown.apply(this);
+this.isInitialized=false
+},draw:function(){},fixIEPosition:ChromeFrameBase.fixIEPosition});
+var ChromePopupBase=extend(ChromeBase,{initialize:function(){setClass(this.document.body,"FirebugPopup");
+ChromeBase.initialize.call(this);
+this.addController([Firebug.chrome.window,"resize",this.resize],[Firebug.chrome.window,"unload",this.destroy]);
+if(Env.Options.enablePersistent){this.persist=bind(this.persist,this);
+addEvent(Firebug.browser.window,"unload",this.persist)
+}else{this.addController([Firebug.browser.window,"unload",this.close])
+}fbVSplitter.onmousedown=onVSplitterMouseDown
+},destroy:function(){var frame=FirebugChrome.chromeMap.frame;
+if(frame){dispatch(frame.panelMap,"detach",[this,frame]);
+frame.reattach(this,frame)
+}if(Env.Options.enablePersistent){removeEvent(Firebug.browser.window,"unload",this.persist)
+}ChromeBase.destroy.apply(this);
+FirebugChrome.chromeMap.popup=null;
+this.node.close()
+},persist:function(){persistTimeStart=new Date().getTime();
+removeEvent(Firebug.browser.window,"unload",this.persist);
+Firebug.Inspector.destroy();
+Firebug.browser.window.FirebugOldBrowser=true;
+var persistTimeStart=new Date().getTime();
+var waitMainWindow=function(){var doc,head;
+try{if(window.opener&&!window.opener.FirebugOldBrowser&&(doc=window.opener.document)){try{window.Firebug=Firebug;
+window.opener.Firebug=Firebug;
+Env.browser=window.opener;
+Firebug.browser=Firebug.context=new Context(Env.browser);
+registerConsole();
+var persistDelay=new Date().getTime()-persistTimeStart;
+var chrome=Firebug.chrome;
+addEvent(Firebug.browser.window,"unload",chrome.persist);
+FBL.cacheDocument();
+Firebug.Inspector.create();
+var htmlPanel=chrome.getPanel("HTML");
+htmlPanel.createUI();
+Firebug.Console.logFormatted(["Firebug could not capture console calls during "+persistDelay+"ms"],Firebug.context,"info")
+}catch(pE){alert("persist error: "+(pE.message||pE))
+}}else{window.setTimeout(waitMainWindow,0)
+}}catch(E){window.close()
+}};
+waitMainWindow()
+},close:function(){this.destroy()
+}});
+var changeCommandLineVisibility=function changeCommandLineVisibility(visibility){var last=Firebug.chrome.commandLineVisible;
+var visible=Firebug.chrome.commandLineVisible=typeof visibility=="boolean"?visibility:!Firebug.chrome.commandLineVisible;
+if(visible!=last){if(visible){fbBottom.className="";
+if(Firebug.CommandLine){Firebug.CommandLine.activate()
+}}else{if(Firebug.CommandLine){Firebug.CommandLine.deactivate()
+}fbBottom.className="hide"
+}}};
+var changeSidePanelVisibility=function changeSidePanelVisibility(visibility){var last=Firebug.chrome.sidePanelVisible;
+Firebug.chrome.sidePanelVisible=typeof visibility=="boolean"?visibility:!Firebug.chrome.sidePanelVisible;
+if(Firebug.chrome.sidePanelVisible!=last){fbPanelBox2.className=Firebug.chrome.sidePanelVisible?"":"hide";
+fbPanelBar2Box.className=Firebug.chrome.sidePanelVisible?"":"hide"
+}};
+var onGlobalKeyDown=function onGlobalKeyDown(event){var keyCode=event.keyCode;
+var shiftKey=event.shiftKey;
+var ctrlKey=event.ctrlKey;
+if(keyCode==123&&(!isFirefox&&!shiftKey||shiftKey&&isFirefox)){Firebug.chrome.toggle(false,ctrlKey);
+cancelEvent(event,true)
+}else{if(keyCode==67&&ctrlKey&&shiftKey){Firebug.Inspector.toggleInspect();
+cancelEvent(event,true)
+}else{if(keyCode==76&&ctrlKey&&shiftKey){Firebug.chrome.focusCommandLine();
+cancelEvent(event,true)
+}}}};
+var onMiniIconClick=function onMiniIconClick(event){Firebug.chrome.toggle(false,event.ctrlKey);
+cancelEvent(event,true)
+};
+var onHSplitterMouseDown=function onHSplitterMouseDown(event){addGlobalEvent("mousemove",onHSplitterMouseMove);
+addGlobalEvent("mouseup",onHSplitterMouseUp);
+if(isIE){addEvent(Firebug.browser.document.documentElement,"mouseleave",onHSplitterMouseUp)
+}fbHSplitter.className="fbOnMovingHSplitter";
+return false
+};
+var onHSplitterMouseMove=function onHSplitterMouseMove(event){cancelEvent(event,true);
+var clientY=event.clientY;
+var win=isIE?event.srcElement.ownerDocument.parentWindow:event.target.ownerDocument&&event.target.ownerDocument.defaultView;
+if(!win){return
+}if(win!=win.parent){var frameElement=win.frameElement;
+if(frameElement){var framePos=Firebug.browser.getElementPosition(frameElement).top;
+clientY+=framePos;
+if(frameElement.style.position!="fixed"){clientY-=Firebug.browser.getWindowScrollPosition().top
+}}}if(isOpera&&isQuiksMode&&win.frameElement.id=="FirebugUI"){clientY=Firebug.browser.getWindowSize().height-win.frameElement.offsetHeight+clientY
+}onHSplitterMouseMoveBuffer=clientY;
+if(new Date().getTime()-lastHSplitterMouseMove>chromeRedrawSkipRate){lastHSplitterMouseMove=new Date().getTime();
+handleHSplitterMouseMove()
+}else{if(!onHSplitterMouseMoveTimer){onHSplitterMouseMoveTimer=setTimeout(handleHSplitterMouseMove,chromeRedrawSkipRate)
+}}cancelEvent(event,true);
+return false
+};
+var handleHSplitterMouseMove=function(){if(onHSplitterMouseMoveTimer){clearTimeout(onHSplitterMouseMoveTimer);
+onHSplitterMouseMoveTimer=null
+}var clientY=onHSplitterMouseMoveBuffer;
+var windowSize=Firebug.browser.getWindowSize();
+var scrollSize=Firebug.browser.getWindowScrollSize();
+var commandLineHeight=Firebug.chrome.commandLineVisible?fbCommandLine.offsetHeight:0;
+var fixedHeight=topHeight+commandLineHeight;
+var chromeNode=Firebug.chrome.node;
+var scrollbarSize=!isIE&&(scrollSize.width>windowSize.width)?17:0;
+var height=windowSize.height;
+var chromeHeight=Math.max(height-clientY+5-scrollbarSize,fixedHeight);
+chromeHeight=Math.min(chromeHeight,windowSize.height-scrollbarSize);
+FirebugChrome.height=chromeHeight;
+chromeNode.style.height=chromeHeight+"px";
+if(noFixedPosition){Firebug.chrome.fixIEPosition()
+}Firebug.chrome.draw()
+};
+var onHSplitterMouseUp=function onHSplitterMouseUp(event){removeGlobalEvent("mousemove",onHSplitterMouseMove);
+removeGlobalEvent("mouseup",onHSplitterMouseUp);
+if(isIE){removeEvent(Firebug.browser.document.documentElement,"mouseleave",onHSplitterMouseUp)
+}fbHSplitter.className="";
+Firebug.chrome.draw();
+return false
+};
+var onVSplitterMouseDown=function onVSplitterMouseDown(event){addGlobalEvent("mousemove",onVSplitterMouseMove);
+addGlobalEvent("mouseup",onVSplitterMouseUp);
+return false
+};
+var onVSplitterMouseMove=function onVSplitterMouseMove(event){if(new Date().getTime()-lastVSplitterMouseMove>chromeRedrawSkipRate){var target=event.target||event.srcElement;
+if(target&&target.ownerDocument){var clientX=event.clientX;
+var win=document.all?event.srcElement.ownerDocument.parentWindow:event.target.ownerDocument.defaultView;
+if(win!=win.parent){clientX+=win.frameElement?win.frameElement.offsetLeft:0
+}var size=Firebug.chrome.getSize();
+var x=Math.max(size.width-clientX+3,6);
+FirebugChrome.sidePanelWidth=x;
+Firebug.chrome.draw()
+}lastVSplitterMouseMove=new Date().getTime()
+}cancelEvent(event,true);
+return false
+};
+var onVSplitterMouseUp=function onVSplitterMouseUp(event){removeGlobalEvent("mousemove",onVSplitterMouseMove);
+removeGlobalEvent("mouseup",onVSplitterMouseUp);
+Firebug.chrome.draw()
+}
+}});
+FBL.ns(function(){with(FBL){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true;
+[0,0].sort(function(){baseHasDuplicate=false;
+return 0
+});
+var Sizzle=function(selector,context,results,seed){results=results||[];
+var origContext=context=context||document;
+if(context.nodeType!==1&&context.nodeType!==9){return[]
+}if(!selector||typeof selector!=="string"){return results
+}var parts=[],m,set,checkSet,check,mode,extra,prune=true,contextXML=isXML(context),soFar=selector;
+while((chunker.exec(""),m=chunker.exec(soFar))!==null){soFar=m[3];
+parts.push(m[1]);
+if(m[2]){extra=m[3];
+break
+}}if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context)
+}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);
+while(parts.length){selector=parts.shift();
+if(Expr.relative[selector]){selector+=parts.shift()
+}set=posProcess(selector,set)
+}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){var ret=Sizzle.find(parts.shift(),context,contextXML);
+context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0]
+}if(context){var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML);
+set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;
+if(parts.length>0){checkSet=makeArray(set)
+}else{prune=false
+}while(parts.length){var cur=parts.pop(),pop=cur;
+if(!Expr.relative[cur]){cur=""
+}else{pop=parts.pop()
+}if(pop==null){pop=context
+}Expr.relative[cur](checkSet,pop,contextXML)
+}}else{checkSet=parts=[]
+}}if(!checkSet){checkSet=set
+}if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector)
+}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet)
+}else{if(context&&context.nodeType===1){for(var i=0;
+checkSet[i]!=null;
+i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i])
+}}}else{for(var i=0;
+checkSet[i]!=null;
+i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i])
+}}}}}else{makeArray(checkSet,results)
+}if(extra){Sizzle(extra,origContext,results,seed);
+Sizzle.uniqueSort(results)
+}return results
+};
+Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=baseHasDuplicate;
+results.sort(sortOrder);
+if(hasDuplicate){for(var i=1;
+i<results.length;
+i++){if(results[i]===results[i-1]){results.splice(i--,1)
+}}}}return results
+};
+Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set)
+};
+Sizzle.find=function(expr,context,isXML){var set,match;
+if(!expr){return[]
+}for(var i=0,l=Expr.order.length;
+i<l;
+i++){var type=Expr.order[i],match;
+if((match=Expr.leftMatch[type].exec(expr))){var left=match[1];
+match.splice(1,1);
+if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");
+set=Expr.find[type](match,context,isXML);
+if(set!=null){expr=expr.replace(Expr.match[type],"");
+break
+}}}}if(!set){set=context.getElementsByTagName("*")
+}return{set:set,expr:expr}
+};
+Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);
+while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;
+anyFound=false;
+if(curLoop==result){result=[]
+}if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);
+if(!match){anyFound=found=true
+}else{if(match===true){continue
+}}}if(match){for(var i=0;
+(item=curLoop[i])!=null;
+i++){if(item){found=filter(item,match,i,curLoop);
+var pass=not^!!found;
+if(inplace&&found!=null){if(pass){anyFound=true
+}else{curLoop[i]=false
+}}else{if(pass){result.push(item);
+anyFound=true
+}}}}}if(found!==undefined){if(!inplace){curLoop=result
+}expr=expr.replace(Expr.match[type],"");
+if(!anyFound){return[]
+}break
+}}}if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr
+}else{break
+}}old=expr
+}return curLoop
+};
+var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href")
+}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;
+if(isTag&&!isXML){part=part.toUpperCase()
+}for(var i=0,l=checkSet.length,elem;
+i<l;
+i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part
+}}if(isPartStrNotTag){Sizzle.filter(part,checkSet,true)
+}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";
+if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();
+for(var i=0,l=checkSet.length;
+i<l;
+i++){var elem=checkSet[i];
+if(elem){var parent=elem.parentNode;
+checkSet[i]=parent.nodeName===part?parent:false
+}}}else{for(var i=0,l=checkSet.length;
+i<l;
+i++){var elem=checkSet[i];
+if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part
+}}if(isPartStr){Sizzle.filter(part,checkSet,true)
+}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;
+if(!/\W/.test(part)){var nodeCheck=part=isXML?part:part.toUpperCase();
+checkFn=dirNodeCheck
+}checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML)
+},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;
+if(typeof part==="string"&&!/\W/.test(part)){var nodeCheck=part=isXML?part:part.toUpperCase();
+checkFn=dirNodeCheck
+}checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML)
+}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);
+return m?[m]:[]
+}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);
+for(var i=0,l=results.length;
+i<l;
+i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i])
+}}return ret.length===0?null:ret
+}},TAG:function(match,context){return context.getElementsByTagName(match[1])
+}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";
+if(isXML){return match
+}for(var i=0,elem;
+(elem=curLoop[i])!=null;
+i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace){result.push(elem)
+}}else{if(inplace){curLoop[i]=false
+}}}}return false
+},ID:function(match){return match[1].replace(/\\/g,"")
+},TAG:function(match,curLoop){for(var i=0;
+curLoop[i]===false;
+i++){}return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase()
+},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);
+match[2]=(test[1]+(test[2]||1))-0;
+match[3]=test[3]-0
+}match[0]=done++;
+return match
+},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");
+if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name]
+}if(match[2]==="~="){match[4]=" "+match[4]+" "
+}return match
+},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if((chunker.exec(match[3])||"").length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop)
+}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);
+if(!inplace){result.push.apply(result,ret)
+}return false
+}}else{if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true
+}}return match
+},POS:function(match){match.unshift(true);
+return match
+}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden"
+},disabled:function(elem){return elem.disabled===true
+},checked:function(elem){return elem.checked===true
+},selected:function(elem){elem.parentNode.selectedIndex;
+return elem.selected===true
+},parent:function(elem){return !!elem.firstChild
+},empty:function(elem){return !elem.firstChild
+},has:function(elem,i,match){return !!Sizzle(match[3],elem).length
+},header:function(elem){return/h\d/i.test(elem.nodeName)
+},text:function(elem){return"text"===elem.type
+},radio:function(elem){return"radio"===elem.type
+},checkbox:function(elem){return"checkbox"===elem.type
+},file:function(elem){return"file"===elem.type
+},password:function(elem){return"password"===elem.type
+},submit:function(elem){return"submit"===elem.type
+},image:function(elem){return"image"===elem.type
+},reset:function(elem){return"reset"===elem.type
+},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON"
+},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName)
+}},setFilters:{first:function(elem,i){return i===0
+},last:function(elem,i,match,array){return i===array.length-1
+},even:function(elem,i){return i%2===0
+},odd:function(elem,i){return i%2===1
+},lt:function(elem,i,match){return i<match[3]-0
+},gt:function(elem,i,match){return i>match[3]-0
+},nth:function(elem,i,match){return match[3]-0==i
+},eq:function(elem,i,match){return match[3]-0==i
+}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];
+if(filter){return filter(elem,i,match,array)
+}else{if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0
+}else{if(name==="not"){var not=match[3];
+for(var i=0,l=not.length;
+i<l;
+i++){if(not[i]===elem){return false
+}}return true
+}}}},CHILD:function(elem,match){var type=match[1],node=elem;
+switch(type){case"only":case"first":while((node=node.previousSibling)){if(node.nodeType===1){return false
+}}if(type=="first"){return true
+}node=elem;
+case"last":while((node=node.nextSibling)){if(node.nodeType===1){return false
+}}return true;
+case"nth":var first=match[2],last=match[3];
+if(first==1&&last==0){return true
+}var doneName=match[0],parent=elem.parentNode;
+if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;
+for(node=parent.firstChild;
+node;
+node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count
+}}parent.sizcache=doneName
+}var diff=elem.nodeIndex-last;
+if(first==0){return diff==0
+}else{return(diff%first==0&&diff/first>=0)
+}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match
+},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match
+},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1
+},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];
+return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false
+},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];
+if(filter){return filter(elem,i,match,array)
+}}}};
+var origPOS=Expr.match.POS;
+for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);
+Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source)
+}var makeArray=function(array,results){array=Array.prototype.slice.call(array,0);
+if(results){results.push.apply(results,array);
+return results
+}return array
+};
+try{Array.prototype.slice.call(document.documentElement.childNodes,0)
+}catch(e){makeArray=function(array,results){var ret=results||[];
+if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array)
+}else{if(typeof array.length==="number"){for(var i=0,l=array.length;
+i<l;
+i++){ret.push(array[i])
+}}else{for(var i=0;
+array[i];
+i++){ret.push(array[i])
+}}}return ret
+}
+}var sortOrder;
+if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){if(!a.compareDocumentPosition||!b.compareDocumentPosition){if(a==b){hasDuplicate=true
+}return 0
+}var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;
+if(ret===0){hasDuplicate=true
+}return ret
+}
+}else{if("sourceIndex" in document.documentElement){sortOrder=function(a,b){if(!a.sourceIndex||!b.sourceIndex){if(a==b){hasDuplicate=true
+}return 0
+}var ret=a.sourceIndex-b.sourceIndex;
+if(ret===0){hasDuplicate=true
+}return ret
+}
+}else{if(document.createRange){sortOrder=function(a,b){if(!a.ownerDocument||!b.ownerDocument){if(a==b){hasDuplicate=true
+}return 0
+}var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();
+aRange.setStart(a,0);
+aRange.setEnd(a,0);
+bRange.setStart(b,0);
+bRange.setEnd(b,0);
+var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);
+if(ret===0){hasDuplicate=true
+}return ret
+}
+}}}(function(){var form=document.createElement("div"),id="script"+(new Date).getTime();
+form.innerHTML="<a name='"+id+"'/>";
+var root=document.documentElement;
+root.insertBefore(form,root.firstChild);
+if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);
+return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[]
+}};
+Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");
+return elem.nodeType===1&&node&&node.nodeValue===match
+}
+}root.removeChild(form);
+root=form=null
+})();
+(function(){var div=document.createElement("div");
+div.appendChild(document.createComment(""));
+if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);
+if(match[1]==="*"){var tmp=[];
+for(var i=0;
+results[i];
+i++){if(results[i].nodeType===1){tmp.push(results[i])
+}}results=tmp
+}return results
+}
+}div.innerHTML="<a href='#'></a>";
+if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2)
+}
+}div=null
+})();
+if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");
+div.innerHTML="<p class='TEST'></p>";
+if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return
+}Sizzle=function(query,context,extra,seed){context=context||document;
+if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra)
+}catch(e){}}return oldSizzle(query,context,extra,seed)
+};
+for(var prop in oldSizzle){Sizzle[prop]=oldSizzle[prop]
+}div=null
+})()
+}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var div=document.createElement("div");
+div.innerHTML="<div class='test e'></div><div class='test'></div>";
+if(div.getElementsByClassName("e").length===0){return
+}div.lastChild.className="e";
+if(div.getElementsByClassName("e").length===1){return
+}Expr.order.splice(1,0,"CLASS");
+Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1])
+}};
+div=null
+})()
+}function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;
+for(var i=0,l=checkSet.length;
+i<l;
+i++){var elem=checkSet[i];
+if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;
+elem.sizset=i
+}elem=elem[dir];
+var match=false;
+while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];
+break
+}if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;
+elem.sizset=i
+}if(elem.nodeName===cur){match=elem;
+break
+}elem=elem[dir]
+}checkSet[i]=match
+}}}function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;
+for(var i=0,l=checkSet.length;
+i<l;
+i++){var elem=checkSet[i];
+if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;
+elem.sizset=i
+}elem=elem[dir];
+var match=false;
+while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];
+break
+}if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;
+elem.sizset=i
+}if(typeof cur!=="string"){if(elem===cur){match=true;
+break
+}}else{if(Sizzle.filter(cur,[elem]).length>0){match=elem;
+break
+}}}elem=elem[dir]
+}checkSet[i]=match
+}}}var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16
+}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)
+};
+var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&elem.ownerDocument.documentElement.nodeName!=="HTML"
+};
+var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;
+while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];
+selector=selector.replace(Expr.match.PSEUDO,"")
+}selector=Expr.relative[selector]?selector+"*":selector;
+for(var i=0,l=root.length;
+i<l;
+i++){Sizzle(selector,root[i],tmpSet)
+}return Sizzle.filter(later,tmpSet)
+};
+Firebug.Selector=Sizzle
+}});
+function DomplateTag(tagName){this.tagName=tagName
+}function DomplateEmbed(){}function DomplateLoop(){}(function(){var womb=null;
+var domplate=FBL.domplate=function(){var lastSubject;
+for(var i=0;
+i<arguments.length;
+++i){lastSubject=lastSubject?copyObject(lastSubject,arguments[i]):arguments[i]
+}for(var name in lastSubject){var val=lastSubject[name];
+if(isTag(val)){val.tag.subject=lastSubject
+}}return lastSubject
+};
+domplate.context=function(context,fn){var lastContext=domplate.lastContext;
+domplate.topContext=context;
+fn.apply(context);
+domplate.topContext=lastContext
+};
+FBL.TAG=function(){var embed=new DomplateEmbed();
+return embed.merge(arguments)
+};
+FBL.FOR=function(){var loop=new DomplateLoop();
+return loop.merge(arguments)
+};
+DomplateTag.prototype={merge:function(args,oldTag){if(oldTag){this.tagName=oldTag.tagName
+}this.context=oldTag?oldTag.context:null;
+this.subject=oldTag?oldTag.subject:null;
+this.attrs=oldTag?copyObject(oldTag.attrs):{};
+this.classes=oldTag?copyObject(oldTag.classes):{};
+this.props=oldTag?copyObject(oldTag.props):null;
+this.listeners=oldTag?copyArray(oldTag.listeners):null;
+this.children=oldTag?copyArray(oldTag.children):[];
+this.vars=oldTag?copyArray(oldTag.vars):[];
+var attrs=args.length?args[0]:null;
+var hasAttrs=typeof(attrs)=="object"&&!isTag(attrs);
+this.children=[];
+if(domplate.topContext){this.context=domplate.topContext
+}if(args.length){parseChildren(args,hasAttrs?1:0,this.vars,this.children)
+}if(hasAttrs){this.parseAttrs(attrs)
+}return creator(this,DomplateTag)
+},parseAttrs:function(args){for(var name in args){var val=parseValue(args[name]);
+readPartNames(val,this.vars);
+if(name.indexOf("on")==0){var eventName=name.substr(2);
+if(!this.listeners){this.listeners=[]
+}this.listeners.push(eventName,val)
+}else{if(name.indexOf("_")==0){var propName=name.substr(1);
+if(!this.props){this.props={}
+}this.props[propName]=val
+}else{if(name.indexOf("$")==0){var className=name.substr(1);
+if(!this.classes){this.classes={}
+}this.classes[className]=val
+}else{if(name=="class"&&this.attrs.hasOwnProperty(name)){this.attrs[name]+=" "+val
+}else{this.attrs[name]=val
+}}}}}},compile:function(){if(this.renderMarkup){return
+}this.compileMarkup();
+this.compileDOM()
+},compileMarkup:function(){this.markupArgs=[];
+var topBlock=[],topOuts=[],blocks=[],info={args:this.markupArgs,argIndex:0};
+this.generateMarkup(topBlock,topOuts,blocks,info);
+this.addCode(topBlock,topOuts,blocks);
+var fnBlock=["r=(function (__code__, __context__, __in__, __out__"];
+for(var i=0;
+i<info.argIndex;
+++i){fnBlock.push(", s",i)
+}fnBlock.push(") {");
+if(this.subject){fnBlock.push("with (this) {")
+}if(this.context){fnBlock.push("with (__context__) {")
+}fnBlock.push("with (__in__) {");
+fnBlock.push.apply(fnBlock,blocks);
+if(this.subject){fnBlock.push("}")
+}if(this.context){fnBlock.push("}")
+}fnBlock.push("}})");
+function __link__(tag,code,outputs,args){if(!tag||!tag.tag){return
+}tag.tag.compile();
+var tagOutputs=[];
+var markupArgs=[code,tag.tag.context,args,tagOutputs];
+markupArgs.push.apply(markupArgs,tag.tag.markupArgs);
+tag.tag.renderMarkup.apply(tag.tag.subject,markupArgs);
+outputs.push(tag);
+outputs.push(tagOutputs)
+}function __escape__(value){function replaceChars(ch){switch(ch){case"<":return"&lt;";
+case">":return"&gt;";
+case"&":return"&amp;";
+case"'":return"&#39;";
+case'"':return"&quot;"
+}return"?"
+}return String(value).replace(/[<>&"']/g,replaceChars)
+}function __loop__(iter,outputs,fn){var iterOuts=[];
+outputs.push(iterOuts);
+if(iter instanceof Array){iter=new ArrayIterator(iter)
+}try{while(1){var value=iter.next();
+var itemOuts=[0,0];
+iterOuts.push(itemOuts);
+fn.apply(this,[value,itemOuts])
+}}catch(exc){if(exc!=StopIteration){throw exc
+}}}var js=fnBlock.join("");
+var r=null;
+eval(js);
+this.renderMarkup=r
+},getVarNames:function(args){if(this.vars){args.push.apply(args,this.vars)
+}for(var i=0;
+i<this.children.length;
+++i){var child=this.children[i];
+if(isTag(child)){child.tag.getVarNames(args)
+}else{if(child instanceof Parts){for(var i=0;
+i<child.parts.length;
+++i){if(child.parts[i] instanceof Variable){var name=child.parts[i].name;
+var names=name.split(".");
+args.push(names[0])
+}}}}}},generateMarkup:function(topBlock,topOuts,blocks,info){topBlock.push(',"<',this.tagName,'"');
+for(var name in this.attrs){if(name!="class"){var val=this.attrs[name];
+topBlock.push(', " ',name,'=\\""');
+addParts(val,",",topBlock,info,true);
+topBlock.push(', "\\""')
+}}if(this.listeners){for(var i=0;
+i<this.listeners.length;
+i+=2){readPartNames(this.listeners[i+1],topOuts)
+}}if(this.props){for(var name in this.props){readPartNames(this.props[name],topOuts)
+}}if(this.attrs.hasOwnProperty("class")||this.classes){topBlock.push(', " class=\\""');
+if(this.attrs.hasOwnProperty("class")){addParts(this.attrs["class"],",",topBlock,info,true)
+}topBlock.push(', " "');
+for(var name in this.classes){topBlock.push(", (");
+addParts(this.classes[name],"",topBlock,info);
+topBlock.push(' ? "',name,'" + " " : "")')
+}topBlock.push(', "\\""')
+}topBlock.push(',">"');
+this.generateChildMarkup(topBlock,topOuts,blocks,info);
+topBlock.push(',"</',this.tagName,'>"')
+},generateChildMarkup:function(topBlock,topOuts,blocks,info){for(var i=0;
+i<this.children.length;
+++i){var child=this.children[i];
+if(isTag(child)){child.tag.generateMarkup(topBlock,topOuts,blocks,info)
+}else{addParts(child,",",topBlock,info,true)
+}}},addCode:function(topBlock,topOuts,blocks){if(topBlock.length){blocks.push('__code__.push(""',topBlock.join(""),");")
+}if(topOuts.length){blocks.push("__out__.push(",topOuts.join(","),");")
+}topBlock.splice(0,topBlock.length);
+topOuts.splice(0,topOuts.length)
+},addLocals:function(blocks){var varNames=[];
+this.getVarNames(varNames);
+var map={};
+for(var i=0;
+i<varNames.length;
+++i){var name=varNames[i];
+if(map.hasOwnProperty(name)){continue
+}map[name]=1;
+var names=name.split(".");
+blocks.push("var ",names[0]+" = __in__."+names[0]+";")
+}},compileDOM:function(){var path=[];
+var blocks=[];
+this.domArgs=[];
+path.embedIndex=0;
+path.loopIndex=0;
+path.staticIndex=0;
+path.renderIndex=0;
+var nodeCount=this.generateDOM(path,blocks,this.domArgs);
+var fnBlock=["r=(function (root, context, o"];
+for(var i=0;
+i<path.staticIndex;
+++i){fnBlock.push(", ","s"+i)
+}for(var i=0;
+i<path.renderIndex;
+++i){fnBlock.push(", ","d"+i)
+}fnBlock.push(") {");
+for(var i=0;
+i<path.loopIndex;
+++i){fnBlock.push("var l",i," = 0;")
+}for(var i=0;
+i<path.embedIndex;
+++i){fnBlock.push("var e",i," = 0;")
+}if(this.subject){fnBlock.push("with (this) {")
+}if(this.context){fnBlock.push("with (context) {")
+}fnBlock.push(blocks.join(""));
+if(this.subject){fnBlock.push("}")
+}if(this.context){fnBlock.push("}")
+}fnBlock.push("return ",nodeCount,";");
+fnBlock.push("})");
+function __bind__(object,fn){return function(event){return fn.apply(object,[event])
+}
+}function __link__(node,tag,args){if(!tag||!tag.tag){return
+}tag.tag.compile();
+var domArgs=[node,tag.tag.context,0];
+domArgs.push.apply(domArgs,tag.tag.domArgs);
+domArgs.push.apply(domArgs,args);
+return tag.tag.renderDOM.apply(tag.tag.subject,domArgs)
+}var self=this;
+function __loop__(iter,fn){var nodeCount=0;
+for(var i=0;
+i<iter.length;
+++i){iter[i][0]=i;
+iter[i][1]=nodeCount;
+nodeCount+=fn.apply(this,iter[i])
+}return nodeCount
+}function __path__(parent,offset){var root=parent;
+for(var i=2;
+i<arguments.length;
+++i){var index=arguments[i];
+if(i==3){index+=offset
+}if(index==-1){parent=parent.parentNode
+}else{parent=parent.childNodes[index]
+}}return parent
+}var js=fnBlock.join("");
+var r=null;
+eval(js);
+this.renderDOM=r
+},generateDOM:function(path,blocks,args){if(this.listeners||this.props){this.generateNodePath(path,blocks)
+}if(this.listeners){for(var i=0;
+i<this.listeners.length;
+i+=2){var val=this.listeners[i+1];
+var arg=generateArg(val,path,args);
+blocks.push('addEvent(node, "',this.listeners[i],'", __bind__(this, ',arg,"), false);")
+}}if(this.props){for(var name in this.props){var val=this.props[name];
+var arg=generateArg(val,path,args);
+blocks.push("node.",name," = ",arg,";")
+}}this.generateChildDOM(path,blocks,args);
+return 1
+},generateNodePath:function(path,blocks){blocks.push("var node = __path__(root, o");
+for(var i=0;
+i<path.length;
+++i){blocks.push(",",path[i])
+}blocks.push(");")
+},generateChildDOM:function(path,blocks,args){path.push(0);
+for(var i=0;
+i<this.children.length;
+++i){var child=this.children[i];
+if(isTag(child)){path[path.length-1]+="+"+child.tag.generateDOM(path,blocks,args)
+}else{path[path.length-1]+="+1"
+}}path.pop()
+}};
+DomplateEmbed.prototype=copyObject(DomplateTag.prototype,{merge:function(args,oldTag){this.value=oldTag?oldTag.value:parseValue(args[0]);
+this.attrs=oldTag?oldTag.attrs:{};
+this.vars=oldTag?copyArray(oldTag.vars):[];
+var attrs=args[1];
+for(var name in attrs){var val=parseValue(attrs[name]);
+this.attrs[name]=val;
+readPartNames(val,this.vars)
+}return creator(this,DomplateEmbed)
+},getVarNames:function(names){if(this.value instanceof Parts){names.push(this.value.parts[0].name)
+}if(this.vars){names.push.apply(names,this.vars)
+}},generateMarkup:function(topBlock,topOuts,blocks,info){this.addCode(topBlock,topOuts,blocks);
+blocks.push("__link__(");
+addParts(this.value,"",blocks,info);
+blocks.push(", __code__, __out__, {");
+var lastName=null;
+for(var name in this.attrs){if(lastName){blocks.push(",")
+}lastName=name;
+var val=this.attrs[name];
+blocks.push('"',name,'":');
+addParts(val,"",blocks,info)
+}blocks.push("});")
+},generateDOM:function(path,blocks,args){var embedName="e"+path.embedIndex++;
+this.generateNodePath(path,blocks);
+var valueName="d"+path.renderIndex++;
+var argsName="d"+path.renderIndex++;
+blocks.push(embedName+" = __link__(node, ",valueName,", ",argsName,");");
+return embedName
+}});
+DomplateLoop.prototype=copyObject(DomplateTag.prototype,{merge:function(args,oldTag){this.varName=oldTag?oldTag.varName:args[0];
+this.iter=oldTag?oldTag.iter:parseValue(args[1]);
+this.vars=[];
+this.children=oldTag?copyArray(oldTag.children):[];
+var offset=Math.min(args.length,2);
+parseChildren(args,offset,this.vars,this.children);
+return creator(this,DomplateLoop)
+},getVarNames:function(names){if(this.iter instanceof Parts){names.push(this.iter.parts[0].name)
+}DomplateTag.prototype.getVarNames.apply(this,[names])
+},generateMarkup:function(topBlock,topOuts,blocks,info){this.addCode(topBlock,topOuts,blocks);
+var iterName;
+if(this.iter instanceof Parts){var part=this.iter.parts[0];
+iterName=part.name;
+if(part.format){for(var i=0;
+i<part.format.length;
+++i){iterName=part.format[i]+"("+iterName+")"
+}}}else{iterName=this.iter
+}blocks.push("__loop__.apply(this, [",iterName,", __out__, function(",this.varName,", __out__) {");
+this.generateChildMarkup(topBlock,topOuts,blocks,info);
+this.addCode(topBlock,topOuts,blocks);
+blocks.push("}]);")
+},generateDOM:function(path,blocks,args){var iterName="d"+path.renderIndex++;
+var counterName="i"+path.loopIndex;
+var loopName="l"+path.loopIndex++;
+if(!path.length){path.push(-1,0)
+}var preIndex=path.renderIndex;
+path.renderIndex=0;
+var nodeCount=0;
+var subBlocks=[];
+var basePath=path[path.length-1];
+for(var i=0;
+i<this.children.length;
+++i){path[path.length-1]=basePath+"+"+loopName+"+"+nodeCount;
+var child=this.children[i];
+if(isTag(child)){nodeCount+="+"+child.tag.generateDOM(path,subBlocks,args)
+}else{nodeCount+="+1"
+}}path[path.length-1]=basePath+"+"+loopName;
+blocks.push(loopName," = __loop__.apply(this, [",iterName,", function(",counterName,",",loopName);
+for(var i=0;
+i<path.renderIndex;
+++i){blocks.push(",d"+i)
+}blocks.push(") {");
+blocks.push(subBlocks.join(""));
+blocks.push("return ",nodeCount,";");
+blocks.push("}]);");
+path.renderIndex=preIndex;
+return loopName
+}});
+function Variable(name,format){this.name=name;
+this.format=format
+}function Parts(parts){this.parts=parts
+}function parseParts(str){var re=/\$([_A-Za-z][_A-Za-z0-9.|]*)/g;
+var index=0;
+var parts=[];
+var m;
+while(m=re.exec(str)){var pre=str.substr(index,(re.lastIndex-m[0].length)-index);
+if(pre){parts.push(pre)
+}var expr=m[1].split("|");
+parts.push(new Variable(expr[0],expr.slice(1)));
+index=re.lastIndex
+}if(!index){return str
+}var post=str.substr(index);
+if(post){parts.push(post)
+}return new Parts(parts)
+}function parseValue(val){return typeof(val)=="string"?parseParts(val):val
+}function parseChildren(args,offset,vars,children){for(var i=offset;
+i<args.length;
+++i){var val=parseValue(args[i]);
+children.push(val);
+readPartNames(val,vars)
+}}function readPartNames(val,vars){if(val instanceof Parts){for(var i=0;
+i<val.parts.length;
+++i){var part=val.parts[i];
+if(part instanceof Variable){vars.push(part.name)
+}}}}function generateArg(val,path,args){if(val instanceof Parts){var vals=[];
+for(var i=0;
+i<val.parts.length;
+++i){var part=val.parts[i];
+if(part instanceof Variable){var varName="d"+path.renderIndex++;
+if(part.format){for(var j=0;
+j<part.format.length;
+++j){varName=part.format[j]+"("+varName+")"
+}}vals.push(varName)
+}else{vals.push('"'+part.replace(/"/g,'\\"')+'"')
+}}return vals.join("+")
+}else{args.push(val);
+return"s"+path.staticIndex++
+}}function addParts(val,delim,block,info,escapeIt){var vals=[];
+if(val instanceof Parts){for(var i=0;
+i<val.parts.length;
+++i){var part=val.parts[i];
+if(part instanceof Variable){var partName=part.name;
+if(part.format){for(var j=0;
+j<part.format.length;
+++j){partName=part.format[j]+"("+partName+")"
+}}if(escapeIt){vals.push("__escape__("+partName+")")
+}else{vals.push(partName)
+}}else{vals.push('"'+part+'"')
+}}}else{if(isTag(val)){info.args.push(val);
+vals.push("s"+info.argIndex++)
+}else{vals.push('"'+val+'"')
+}}var parts=vals.join(delim);
+if(parts){block.push(delim,parts)
+}}function isTag(obj){return(typeof(obj)=="function"||obj instanceof Function)&&!!obj.tag
+}function creator(tag,cons){var fn=new Function("var tag = arguments.callee.tag;var cons = arguments.callee.cons;var newTag = new cons();return newTag.merge(arguments, tag);");
+fn.tag=tag;
+fn.cons=cons;
+extend(fn,Renderer);
+return fn
+}function copyArray(oldArray){var ary=[];
+if(oldArray){for(var i=0;
+i<oldArray.length;
+++i){ary.push(oldArray[i])
+}}return ary
+}function copyObject(l,r){var m={};
+extend(m,l);
+extend(m,r);
+return m
+}function extend(l,r){for(var n in r){l[n]=r[n]
+}}function addEvent(object,name,handler){if(document.all){object.attachEvent("on"+name,handler)
+}else{object.addEventListener(name,handler,false)
+}}function ArrayIterator(array){var index=-1;
+this.next=function(){if(++index>=array.length){throw StopIteration
+}return array[index]
+}
+}function StopIteration(){}FBL.$break=function(){throw StopIteration
+};
+var Renderer={renderHTML:function(args,outputs,self){var code=[];
+var markupArgs=[code,this.tag.context,args,outputs];
+markupArgs.push.apply(markupArgs,this.tag.markupArgs);
+this.tag.renderMarkup.apply(self?self:this.tag.subject,markupArgs);
+return code.join("")
+},insertRows:function(args,before,self){this.tag.compile();
+var outputs=[];
+var html=this.renderHTML(args,outputs,self);
+var doc=before.ownerDocument;
+var div=doc.createElement("div");
+div.innerHTML="<table><tbody>"+html+"</tbody></table>";
+var tbody=div.firstChild.firstChild;
+var parent=before.tagName=="TR"?before.parentNode:before;
+var after=before.tagName=="TR"?before.nextSibling:null;
+var firstRow=tbody.firstChild,lastRow;
+while(tbody.firstChild){lastRow=tbody.firstChild;
+if(after){parent.insertBefore(lastRow,after)
+}else{parent.appendChild(lastRow)
+}}var offset=0;
+if(before.tagName=="TR"){var node=firstRow.parentNode.firstChild;
+for(;
+node&&node!=firstRow;
+node=node.nextSibling){++offset
+}}var domArgs=[firstRow,this.tag.context,offset];
+domArgs.push.apply(domArgs,this.tag.domArgs);
+domArgs.push.apply(domArgs,outputs);
+this.tag.renderDOM.apply(self?self:this.tag.subject,domArgs);
+return[firstRow,lastRow]
+},insertBefore:function(args,before,self){return this.insertNode(args,before.ownerDocument,before,false,self)
+},insertAfter:function(args,after,self){return this.insertNode(args,after.ownerDocument,after,true,self)
+},insertNode:function(args,doc,element,isAfter,self){if(!args){args={}
+}this.tag.compile();
+var outputs=[];
+var html=this.renderHTML(args,outputs,self);
+var doc=element.ownerDocument;
+if(!womb||womb.ownerDocument!=doc){womb=doc.createElement("div")
+}womb.innerHTML=html;
+var root=womb.firstChild;
+if(isAfter){while(womb.firstChild){if(element.nextSibling){element.parentNode.insertBefore(womb.firstChild,element.nextSibling)
+}else{element.parentNode.appendChild(womb.firstChild)
+}}}else{while(womb.lastChild){element.parentNode.insertBefore(womb.lastChild,element)
+}}var domArgs=[root,this.tag.context,0];
+domArgs.push.apply(domArgs,this.tag.domArgs);
+domArgs.push.apply(domArgs,outputs);
+this.tag.renderDOM.apply(self?self:this.tag.subject,domArgs);
+return root
+},replace:function(args,parent,self){this.tag.compile();
+var outputs=[];
+var html=this.renderHTML(args,outputs,self);
+var root;
+if(parent.nodeType==1){parent.innerHTML=html;
+root=parent.firstChild
+}else{if(!parent||parent.nodeType!=9){parent=document
+}if(!womb||womb.ownerDocument!=parent){womb=parent.createElement("div")
+}womb.innerHTML=html;
+root=womb.firstChild
+}var domArgs=[root,this.tag.context,0];
+domArgs.push.apply(domArgs,this.tag.domArgs);
+domArgs.push.apply(domArgs,outputs);
+this.tag.renderDOM.apply(self?self:this.tag.subject,domArgs);
+return root
+},append:function(args,parent,self){this.tag.compile();
+var outputs=[];
+var html=this.renderHTML(args,outputs,self);
+if(!womb||womb.ownerDocument!=parent.ownerDocument){womb=parent.ownerDocument.createElement("div")
+}womb.innerHTML=html;
+var root=womb.firstChild;
+while(womb.firstChild){parent.appendChild(womb.firstChild)
+}womb=null;
+var domArgs=[root,this.tag.context,0];
+domArgs.push.apply(domArgs,this.tag.domArgs);
+domArgs.push.apply(domArgs,outputs);
+this.tag.renderDOM.apply(self?self:this.tag.subject,domArgs);
+return root
+}};
+function defineTags(){for(var i=0;
+i<arguments.length;
+++i){var tagName=arguments[i];
+var fn=new Function("var newTag = new arguments.callee.DomplateTag('"+tagName+"'); return newTag.merge(arguments);");
+fn.DomplateTag=DomplateTag;
+var fnName=tagName.toUpperCase();
+FBL[fnName]=fn
+}}defineTags("a","button","br","canvas","code","col","colgroup","div","fieldset","form","h1","h2","h3","hr","img","input","label","legend","li","ol","optgroup","option","p","pre","select","span","strong","table","tbody","td","textarea","tfoot","th","thead","tr","tt","ul","iframe")
+})();
+var FirebugReps=FBL.ns(function(){with(FBL){var OBJECTBOX=this.OBJECTBOX=SPAN({"class":"objectBox objectBox-$className"});
+var OBJECTBLOCK=this.OBJECTBLOCK=DIV({"class":"objectBox objectBox-$className"});
+var OBJECTLINK=this.OBJECTLINK=isIE6?A({"class":"objectLink objectLink-$className a11yFocus",href:"javascript:void(0)",_repObject:"$object"}):A({"class":"objectLink objectLink-$className a11yFocus",_repObject:"$object"});
+this.Undefined=domplate(Firebug.Rep,{tag:OBJECTBOX("undefined"),className:"undefined",supportsObject:function(object,type){return type=="undefined"
+}});
+this.Null=domplate(Firebug.Rep,{tag:OBJECTBOX("null"),className:"null",supportsObject:function(object,type){return object==null
+}});
+this.Nada=domplate(Firebug.Rep,{tag:SPAN(""),className:"nada"});
+this.Number=domplate(Firebug.Rep,{tag:OBJECTBOX("$object"),className:"number",supportsObject:function(object,type){return type=="boolean"||type=="number"
+}});
+this.String=domplate(Firebug.Rep,{tag:OBJECTBOX("&quot;$object&quot;"),shortTag:OBJECTBOX("&quot;$object|cropString&quot;"),className:"string",supportsObject:function(object,type){return type=="string"
+}});
+this.Text=domplate(Firebug.Rep,{tag:OBJECTBOX("$object"),shortTag:OBJECTBOX("$object|cropString"),className:"text"});
+this.Caption=domplate(Firebug.Rep,{tag:SPAN({"class":"caption"},"$object")});
+this.Warning=domplate(Firebug.Rep,{tag:DIV({"class":"warning focusRow",role:"listitem"},"$object|STR")});
+this.Func=domplate(Firebug.Rep,{tag:OBJECTLINK("$object|summarizeFunction"),summarizeFunction:function(fn){var fnRegex=/function ([^(]+\([^)]*\)) \{/;
+var fnText=safeToString(fn);
+var m=fnRegex.exec(fnText);
+return m?m[1]:"function()"
+},copySource:function(fn){copyToClipboard(safeToString(fn))
+},monitor:function(fn,script,monitored){if(monitored){Firebug.Debugger.unmonitorScript(fn,script,"monitor")
+}else{Firebug.Debugger.monitorScript(fn,script,"monitor")
+}},className:"function",supportsObject:function(object,type){return isFunction(object)
+},inspectObject:function(fn,context){var sourceLink=findSourceForFunction(fn,context);
+if(sourceLink){Firebug.chrome.select(sourceLink)
+}if(FBTrace.DBG_FUNCTION_NAME){FBTrace.sysout("reps.function.inspectObject selected sourceLink is ",sourceLink)
+}},getTooltip:function(fn,context){var script=findScriptForFunctionInContext(context,fn);
+if(script){return $STRF("Line",[normalizeURL(script.fileName),script.baseLineNumber])
+}else{if(fn.toString){return fn.toString()
+}}},getTitle:function(fn,context){var name=fn.name?fn.name:"function";
+return name+"()"
+},getContextMenuItems:function(fn,target,context,script){if(!script){script=findScriptForFunctionInContext(context,fn)
+}if(!script){return
+}var scriptInfo=getSourceFileAndLineByScript(context,script);
+var monitored=scriptInfo?fbs.isMonitored(scriptInfo.sourceFile.href,scriptInfo.lineNo):false;
+var name=script?getFunctionName(script,context):fn.name;
+return[{label:"CopySource",command:bindFixed(this.copySource,this,fn)},"-",{label:$STRF("ShowCallsInConsole",[name]),nol10n:true,type:"checkbox",checked:monitored,command:bindFixed(this.monitor,this,fn,script,monitored)}]
+}});
+this.Obj=domplate(Firebug.Rep,{tag:OBJECTLINK(SPAN({"class":"objectTitle"},"$object|getTitle "),SPAN({"class":"objectProps"},SPAN({"class":"objectLeftBrace",role:"presentation"},"{"),FOR("prop","$object|propIterator",SPAN({"class":"objectPropName",role:"presentation"},"$prop.name"),SPAN({"class":"objectEqual",role:"presentation"},"$prop.equal"),TAG("$prop.tag",{object:"$prop.object"}),SPAN({"class":"objectComma",role:"presentation"},"$prop.delim")),SPAN({"class":"objectRightBrace"},"}"))),propNumberTag:SPAN({"class":"objectProp-number"},"$object"),propStringTag:SPAN({"class":"objectProp-string"},"&quot;$object&quot;"),propObjectTag:SPAN({"class":"objectProp-object"},"$object"),propIterator:function(object){maxLength=55;
+if(!object){return[]
+}var props=[];
+var length=0;
+var numProperties=0;
+var numPropertiesShown=0;
+var maxLengthReached=false;
+var lib=this;
+var propRepsMap={"boolean":this.propNumberTag,number:this.propNumberTag,string:this.propStringTag,object:this.propObjectTag};
+try{var title=Firebug.Rep.getTitle(object);
+length+=title.length;
+for(var name in object){var value;
+try{value=object[name]
+}catch(exc){continue
+}var type=typeof(value);
+if(type=="boolean"||type=="number"||(type=="string"&&value)||(type=="object"&&value&&value.toString)){var tag=propRepsMap[type];
+var value=(type=="object")?Firebug.getRep(value).getTitle(value):value+"";
+length+=name.length+value.length+4;
+if(length<=maxLength){props.push({tag:tag,name:name,object:value,equal:"=",delim:", "});
+numPropertiesShown++
+}else{maxLengthReached=true
+}}numProperties++;
+if(maxLengthReached&&numProperties>numPropertiesShown){break
+}}if(numProperties>numPropertiesShown){props.push({object:"...",tag:FirebugReps.Caption.tag,name:"",equal:"",delim:""})
+}else{if(props.length>0){props[props.length-1].delim=""
+}}}catch(exc){}return props
+},fb_1_6_propIterator:function(object,max){max=max||3;
+if(!object){return[]
+}var props=[];
+var len=0,count=0;
+try{for(var name in object){var value;
+try{value=object[name]
+}catch(exc){continue
+}var t=typeof(value);
+if(t=="boolean"||t=="number"||(t=="string"&&value)||(t=="object"&&value&&value.toString)){var rep=Firebug.getRep(value);
+var tag=rep.shortTag||rep.tag;
+if(t=="object"){value=rep.getTitle(value);
+tag=rep.titleTag
+}count++;
+if(count<=max){props.push({tag:tag,name:name,object:value,equal:"=",delim:", "})
+}else{break
+}}}if(count>max){props[Math.max(1,max-1)]={object:"more...",tag:FirebugReps.Caption.tag,name:"",equal:"",delim:""}
+}else{if(props.length>0){props[props.length-1].delim=""
+}}}catch(exc){}return props
+},className:"object",supportsObject:function(object,type){return true
+}});
+this.Arr=domplate(Firebug.Rep,{tag:OBJECTBOX({_repObject:"$object"},SPAN({"class":"arrayLeftBracket",role:"presentation"},"["),FOR("item","$object|arrayIterator",TAG("$item.tag",{object:"$item.object"}),SPAN({"class":"arrayComma",role:"presentation"},"$item.delim")),SPAN({"class":"arrayRightBracket",role:"presentation"},"]")),shortTag:OBJECTBOX({_repObject:"$object"},SPAN({"class":"arrayLeftBracket",role:"presentation"},"["),FOR("item","$object|shortArrayIterator",TAG("$item.tag",{object:"$item.object"}),SPAN({"class":"arrayComma",role:"presentation"},"$item.delim")),SPAN({"class":"arrayRightBracket"},"]")),arrayIterator:function(array){var items=[];
+for(var i=0;
+i<array.length;
+++i){var value=array[i];
+var rep=Firebug.getRep(value);
+var tag=rep.shortTag?rep.shortTag:rep.tag;
+var delim=(i==array.length-1?"":", ");
+items.push({object:value,tag:tag,delim:delim})
+}return items
+},shortArrayIterator:function(array){var items=[];
+for(var i=0;
+i<array.length&&i<3;
+++i){var value=array[i];
+var rep=Firebug.getRep(value);
+var tag=rep.shortTag?rep.shortTag:rep.tag;
+var delim=(i==array.length-1?"":", ");
+items.push({object:value,tag:tag,delim:delim})
+}if(array.length>3){items.push({object:(array.length-3)+" more...",tag:FirebugReps.Caption.tag,delim:""})
+}return items
+},shortPropIterator:this.Obj.propIterator,getItemIndex:function(child){var arrayIndex=0;
+for(child=child.previousSibling;
+child;
+child=child.previousSibling){if(child.repObject){++arrayIndex
+}}return arrayIndex
+},className:"array",supportsObject:function(object){return this.isArray(object)
+},isArray:function(obj){try{if(!obj){return false
+}else{if(isIE&&!isFunction(obj)&&typeof obj=="object"&&isFinite(obj.length)&&obj.nodeType!=8){return true
+}else{if(isFinite(obj.length)&&isFunction(obj.splice)){return true
+}else{if(isFinite(obj.length)&&isFunction(obj.callee)){return true
+}else{if(instanceOf(obj,"HTMLCollection")){return true
+}else{if(instanceOf(obj,"NodeList")){return true
+}else{return false
+}}}}}}}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("isArray FAILS:",exc);
+FBTrace.sysout("isArray Fails on obj",obj)
+}}return false
+},getTitle:function(object,context){return"["+object.length+"]"
+}});
+this.Property=domplate(Firebug.Rep,{supportsObject:function(object){return object instanceof Property
+},getRealObject:function(prop,context){return prop.object[prop.name]
+},getTitle:function(prop,context){return prop.name
+}});
+this.NetFile=domplate(this.Obj,{supportsObject:function(object){return object instanceof Firebug.NetFile
+},browseObject:function(file,context){openNewTab(file.href);
+return true
+},getRealObject:function(file,context){return null
+}});
+this.Except=domplate(Firebug.Rep,{tag:OBJECTBOX({_repObject:"$object"},"$object.message"),className:"exception",supportsObject:function(object){return object instanceof ErrorCopy
+}});
+this.Element=domplate(Firebug.Rep,{tag:OBJECTLINK("&lt;",SPAN({"class":"nodeTag"},"$object.nodeName|toLowerCase"),FOR("attr","$object|attrIterator","&nbsp;$attr.nodeName=&quot;",SPAN({"class":"nodeValue"},"$attr.nodeValue"),"&quot;"),"&gt;"),shortTag:OBJECTLINK(SPAN({"class":"$object|getVisible"},SPAN({"class":"selectorTag"},"$object|getSelectorTag"),SPAN({"class":"selectorId"},"$object|getSelectorId"),SPAN({"class":"selectorClass"},"$object|getSelectorClass"),SPAN({"class":"selectorValue"},"$object|getValue"))),getVisible:function(elt){return isVisible(elt)?"":"selectorHidden"
+},getSelectorTag:function(elt){return elt.nodeName.toLowerCase()
+},getSelectorId:function(elt){return elt.id?"#"+elt.id:""
+},getSelectorClass:function(elt){return elt.className?"."+elt.className.split(" ")[0]:""
+},getValue:function(elt){return"";
+var value;
+if(elt instanceof HTMLImageElement){value=getFileName(elt.src)
+}else{if(elt instanceof HTMLAnchorElement){value=getFileName(elt.href)
+}else{if(elt instanceof HTMLInputElement){value=elt.value
+}else{if(elt instanceof HTMLFormElement){value=getFileName(elt.action)
+}else{if(elt instanceof HTMLScriptElement){value=getFileName(elt.src)
+}}}}}return value?" "+cropString(value,20):""
+},attrIterator:function(elt){var attrs=[];
+var idAttr,classAttr;
+if(elt.attributes){for(var i=0;
+i<elt.attributes.length;
+++i){var attr=elt.attributes[i];
+if(attr.nodeName&&attr.nodeName.indexOf("firebug-")!=-1){continue
+}else{if(attr.nodeName=="id"){idAttr=attr
+}else{if(attr.nodeName=="class"){classAttr=attr
+}else{attrs.push(attr)
+}}}}}if(classAttr){attrs.splice(0,0,classAttr)
+}if(idAttr){attrs.splice(0,0,idAttr)
+}return attrs
+},shortAttrIterator:function(elt){var attrs=[];
+if(elt.attributes){for(var i=0;
+i<elt.attributes.length;
+++i){var attr=elt.attributes[i];
+if(attr.nodeName=="id"||attr.nodeName=="class"){attrs.push(attr)
+}}}return attrs
+},getHidden:function(elt){return isVisible(elt)?"":"nodeHidden"
+},getXPath:function(elt){return getElementTreeXPath(elt)
+},getNodeText:function(element){var text=element.textContent;
+if(Firebug.showFullTextNodes){return text
+}else{return cropString(text,50)
+}},copyHTML:function(elt){var html=getElementXML(elt);
+copyToClipboard(html)
+},copyInnerHTML:function(elt){copyToClipboard(elt.innerHTML)
+},copyXPath:function(elt){var xpath=getElementXPath(elt);
+copyToClipboard(xpath)
+},persistor:function(context,xpath){var elts=xpath?getElementsByXPath(context.window.document,xpath):null;
+return elts&&elts.length?elts[0]:null
+},className:"element",supportsObject:function(object){return instanceOf(object,"Element")
+},browseObject:function(elt,context){var tag=elt.nodeName.toLowerCase();
+if(tag=="script"){openNewTab(elt.src)
+}else{if(tag=="link"){openNewTab(elt.href)
+}else{if(tag=="a"){openNewTab(elt.href)
+}else{if(tag=="img"){openNewTab(elt.src)
+}}}}return true
+},persistObject:function(elt,context){var xpath=getElementXPath(elt);
+return bind(this.persistor,top,xpath)
+},getTitle:function(element,context){return getElementCSSSelector(element)
+},getTooltip:function(elt){return this.getXPath(elt)
+},getContextMenuItems:function(elt,target,context){var monitored=areEventsMonitored(elt,null,context);
+return[{label:"CopyHTML",command:bindFixed(this.copyHTML,this,elt)},{label:"CopyInnerHTML",command:bindFixed(this.copyInnerHTML,this,elt)},{label:"CopyXPath",command:bindFixed(this.copyXPath,this,elt)},"-",{label:"ShowEventsInConsole",type:"checkbox",checked:monitored,command:bindFixed(toggleMonitorEvents,FBL,elt,null,monitored,context)},"-",{label:"ScrollIntoView",command:bindFixed(elt.scrollIntoView,elt)}]
+}});
+this.TextNode=domplate(Firebug.Rep,{tag:OBJECTLINK("&lt;",SPAN({"class":"nodeTag"},"TextNode"),"&nbsp;textContent=&quot;",SPAN({"class":"nodeValue"},"$object.textContent|cropString"),"&quot;","&gt;"),className:"textNode",supportsObject:function(object){return object instanceof Text
+}});
+this.Document=domplate(Firebug.Rep,{tag:OBJECTLINK("Document ",SPAN({"class":"objectPropValue"},"$object|getLocation")),getLocation:function(doc){return doc.location?getFileName(doc.location.href):""
+},className:"object",supportsObject:function(object){return instanceOf(object,"Document")
+},browseObject:function(doc,context){openNewTab(doc.location.href);
+return true
+},persistObject:function(doc,context){return this.persistor
+},persistor:function(context){return context.window.document
+},getTitle:function(win,context){return"document"
+},getTooltip:function(doc){return doc.location.href
+}});
+this.StyleSheet=domplate(Firebug.Rep,{tag:OBJECTLINK("StyleSheet ",SPAN({"class":"objectPropValue"},"$object|getLocation")),getLocation:function(styleSheet){return getFileName(styleSheet.href)
+},copyURL:function(styleSheet){copyToClipboard(styleSheet.href)
+},openInTab:function(styleSheet){openNewTab(styleSheet.href)
+},className:"object",supportsObject:function(object){return instanceOf(object,"CSSStyleSheet")
+},browseObject:function(styleSheet,context){openNewTab(styleSheet.href);
+return true
+},persistObject:function(styleSheet,context){return bind(this.persistor,top,styleSheet.href)
+},getTooltip:function(styleSheet){return styleSheet.href
+},getContextMenuItems:function(styleSheet,target,context){return[{label:"CopyLocation",command:bindFixed(this.copyURL,this,styleSheet)},"-",{label:"OpenInTab",command:bindFixed(this.openInTab,this,styleSheet)}]
+},persistor:function(context,href){return getStyleSheetByHref(href,context)
+}});
+this.Window=domplate(Firebug.Rep,{tag:OBJECTLINK("Window ",SPAN({"class":"objectPropValue"},"$object|getLocation")),getLocation:function(win){try{return(win&&win.location&&!win.closed)?getFileName(win.location.href):""
+}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("reps.Window window closed?")
+}}},className:"object",supportsObject:function(object){return instanceOf(object,"Window")
+},browseObject:function(win,context){openNewTab(win.location.href);
+return true
+},persistObject:function(win,context){return this.persistor
+},persistor:function(context){return context.window
+},getTitle:function(win,context){return"window"
+},getTooltip:function(win){if(win&&!win.closed){return win.location.href
+}}});
+this.Event=domplate(Firebug.Rep,{tag:TAG("$copyEventTag",{object:"$object|copyEvent"}),copyEventTag:OBJECTLINK("$object|summarizeEvent"),summarizeEvent:function(event){var info=[event.type," "];
+var eventFamily=getEventFamily(event.type);
+if(eventFamily=="mouse"){info.push("clientX=",event.clientX,", clientY=",event.clientY)
+}else{if(eventFamily=="key"){info.push("charCode=",event.charCode,", keyCode=",event.keyCode)
+}}return info.join("")
+},copyEvent:function(event){return new EventCopy(event)
+},className:"object",supportsObject:function(object){return instanceOf(object,"Event")||instanceOf(object,"EventCopy")
+},getTitle:function(event,context){return"Event "+event.type
+}});
+this.SourceLink=domplate(Firebug.Rep,{tag:OBJECTLINK({$collapsed:"$object|hideSourceLink"},"$object|getSourceLinkTitle"),hideSourceLink:function(sourceLink){return sourceLink?sourceLink.href.indexOf("XPCSafeJSObjectWrapper")!=-1:true
+},getSourceLinkTitle:function(sourceLink){if(!sourceLink){return""
+}try{var fileName=getFileName(sourceLink.href);
+fileName=decodeURIComponent(fileName);
+fileName=cropString(fileName,17)
+}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("reps.getSourceLinkTitle decodeURIComponent fails for '"+fileName+"': "+exc,exc)
+}}return typeof sourceLink.line=="number"?fileName+" (line "+sourceLink.line+")":fileName
+},copyLink:function(sourceLink){copyToClipboard(sourceLink.href)
+},openInTab:function(sourceLink){openNewTab(sourceLink.href)
+},className:"sourceLink",supportsObject:function(object){return object instanceof SourceLink
+},getTooltip:function(sourceLink){return decodeURI(sourceLink.href)
+},inspectObject:function(sourceLink,context){if(sourceLink.type=="js"){var scriptFile=getSourceFileByHref(sourceLink.href,context);
+if(scriptFile){return Firebug.chrome.select(sourceLink)
+}}else{if(sourceLink.type=="css"){if(sourceLink.object){Firebug.chrome.select(sourceLink.object);
+return
+}var stylesheet=getStyleSheetByHref(sourceLink.href,context);
+if(stylesheet){var ownerNode=stylesheet.ownerNode;
+if(ownerNode){Firebug.chrome.select(sourceLink,"html");
+return
+}var panel=context.getPanel("stylesheet");
+if(panel&&panel.getRuleByLine(stylesheet,sourceLink.line)){return Firebug.chrome.select(sourceLink)
+}}}}viewSource(sourceLink.href,sourceLink.line)
+},browseObject:function(sourceLink,context){openNewTab(sourceLink.href);
+return true
+},getContextMenuItems:function(sourceLink,target,context){return[{label:"CopyLocation",command:bindFixed(this.copyLink,this,sourceLink)},"-",{label:"OpenInTab",command:bindFixed(this.openInTab,this,sourceLink)}]
+}});
+this.SourceFile=domplate(this.SourceLink,{tag:OBJECTLINK({$collapsed:"$object|hideSourceLink"},"$object|getSourceLinkTitle"),persistor:function(context,href){return getSourceFileByHref(href,context)
+},className:"sourceFile",supportsObject:function(object){return object instanceof SourceFile
+},persistObject:function(sourceFile){return bind(this.persistor,top,sourceFile.href)
+},browseObject:function(sourceLink,context){},getTooltip:function(sourceFile){return sourceFile.href
+}});
+this.StackFrame=domplate(Firebug.Rep,{tag:OBJECTBLOCK(A({"class":"objectLink objectLink-function focusRow a11yFocus",_repObject:"$object.fn"},"$object|getCallName")," ( ",FOR("arg","$object|argIterator",TAG("$arg.tag",{object:"$arg.value"}),SPAN({"class":"arrayComma"},"$arg.delim"))," )",SPAN({"class":"objectLink-sourceLink objectLink"},"$object|getSourceLinkTitle")),getCallName:function(frame){return frame.name||"anonymous"
+},getSourceLinkTitle:function(frame){var fileName=cropString(getFileName(frame.href),20);
+return fileName+(frame.lineNo?" (line "+frame.lineNo+")":"");
+var fileName=cropString(getFileName(frame.href),17);
+return $STRF("Line",[fileName,frame.lineNo])
+},argIterator:function(frame){if(!frame.args){return[]
+}var items=[];
+for(var i=0;
+i<frame.args.length;
+++i){var arg=frame.args[i];
+if(!arg){break
+}var rep=Firebug.getRep(arg.value);
+var tag=rep.shortTag?rep.shortTag:rep.tag;
+var delim=(i==frame.args.length-1?"":", ");
+items.push({name:arg.name,value:arg.value,tag:tag,delim:delim})
+}return items
+},className:"stackFrame",supportsObject:function(object){return object instanceof StackFrame
+},inspectObject:function(stackFrame,context){var sourceLink=new SourceLink(stackFrame.href,stackFrame.lineNo,"js");
+Firebug.chrome.select(sourceLink)
+},getTooltip:function(stackFrame,context){return $STRF("Line",[stackFrame.href,stackFrame.lineNo])
+}});
+this.StackTrace=domplate(Firebug.Rep,{tag:FOR("frame","$object.frames focusRow",TAG(this.StackFrame.tag,{object:"$frame"})),className:"stackTrace",supportsObject:function(object){return object instanceof StackTrace
+}});
+this.jsdStackFrame=domplate(Firebug.Rep,{inspectable:false,supportsObject:function(object){return(object instanceof jsdIStackFrame)&&(object.isValid)
+},getTitle:function(frame,context){if(!frame.isValid){return"(invalid frame)"
+}return getFunctionName(frame.script,context)
+},getTooltip:function(frame,context){if(!frame.isValid){return"(invalid frame)"
+}var sourceInfo=FBL.getSourceFileAndLineByScript(context,frame.script,frame);
+if(sourceInfo){return $STRF("Line",[sourceInfo.sourceFile.href,sourceInfo.lineNo])
+}else{return $STRF("Line",[frame.script.fileName,frame.line])
+}},getContextMenuItems:function(frame,target,context){var fn=frame.script.functionObject.getWrappedValue();
+return FirebugReps.Func.getContextMenuItems(fn,target,context,frame.script)
+}});
+this.ErrorMessage=domplate(Firebug.Rep,{tag:OBJECTBOX({$hasTwisty:"$object|hasStackTrace",$hasBreakSwitch:"$object|hasBreakSwitch",$breakForError:"$object|hasErrorBreak",_repObject:"$object",_stackTrace:"$object|getLastErrorStackTrace",onclick:"$onToggleError"},DIV({"class":"errorTitle a11yFocus",role:"checkbox","aria-checked":"false"},"$object.message|getMessage"),DIV({"class":"errorTrace"}),DIV({"class":"errorSourceBox errorSource-$object|getSourceType"},IMG({"class":"errorBreak a11yFocus",src:"blank.gif",role:"checkbox","aria-checked":"false",title:"Break on this error"}),A({"class":"errorSource a11yFocus"},"$object|getLine")),TAG(this.SourceLink.tag,{object:"$object|getSourceLink"})),getLastErrorStackTrace:function(error){return error.trace
+},hasStackTrace:function(error){var url=error.href.toString();
+var fromCommandLine=(url.indexOf("XPCSafeJSObjectWrapper")!=-1);
+return !fromCommandLine&&error.trace
+},hasBreakSwitch:function(error){return error.href&&error.lineNo>0
+},hasErrorBreak:function(error){return fbs.hasErrorBreakpoint(error.href,error.lineNo)
+},getMessage:function(message){var re=/\[Exception... "(.*?)" nsresult:/;
+var m=re.exec(message);
+return m?m[1]:message
+},getLine:function(error){if(error.category=="js"){if(error.source){return cropString(error.source,80)
+}else{if(error.href&&error.href.indexOf("XPCSafeJSObjectWrapper")==-1){return cropString(error.getSourceLine(),80)
+}}}},getSourceLink:function(error){var ext=error.category=="css"?"css":"js";
+return error.lineNo?new SourceLink(error.href,error.lineNo,ext):null
+},getSourceType:function(error){if(error.source){return"syntax"
+}else{if(error.lineNo==1&&getFileExtension(error.href)!="js"){return"none"
+}else{if(error.category=="css"){return"none"
+}else{if(!error.href||!error.lineNo){return"none"
+}else{return"exec"
+}}}}},onToggleError:function(event){var target=event.currentTarget;
+if(hasClass(event.target,"errorBreak")){this.breakOnThisError(target.repObject)
+}else{if(hasClass(event.target,"errorSource")){var panel=Firebug.getElementPanel(event.target);
+this.inspectObject(target.repObject,panel.context)
+}else{if(hasClass(event.target,"errorTitle")){var traceBox=target.childNodes[1];
+toggleClass(target,"opened");
+event.target.setAttribute("aria-checked",hasClass(target,"opened"));
+if(hasClass(target,"opened")){if(target.stackTrace){var node=FirebugReps.StackTrace.tag.append({object:target.stackTrace},traceBox)
+}if(Firebug.A11yModel.enabled){var panel=Firebug.getElementPanel(event.target);
+dispatch([Firebug.A11yModel],"onLogRowContentCreated",[panel,traceBox])
+}}else{clearNode(traceBox)
+}}}}},copyError:function(error){var message=[this.getMessage(error.message),error.href,"Line "+error.lineNo];
+copyToClipboard(message.join("\n"))
+},breakOnThisError:function(error){if(this.hasErrorBreak(error)){Firebug.Debugger.clearErrorBreakpoint(error.href,error.lineNo)
+}else{Firebug.Debugger.setErrorBreakpoint(error.href,error.lineNo)
+}},className:"errorMessage",inspectable:false,supportsObject:function(object){return object instanceof ErrorMessage
+},inspectObject:function(error,context){var sourceLink=this.getSourceLink(error);
+FirebugReps.SourceLink.inspectObject(sourceLink,context)
+},getContextMenuItems:function(error,target,context){var breakOnThisError=this.hasErrorBreak(error);
+var items=[{label:"CopyError",command:bindFixed(this.copyError,this,error)}];
+if(error.category=="css"){items.push("-",{label:"BreakOnThisError",type:"checkbox",checked:breakOnThisError,command:bindFixed(this.breakOnThisError,this,error)},optionMenu("BreakOnAllErrors","breakOnErrors"))
+}return items
+}});
+this.Assert=domplate(Firebug.Rep,{tag:DIV(DIV({"class":"errorTitle"}),DIV({"class":"assertDescription"})),className:"assert",inspectObject:function(error,context){var sourceLink=this.getSourceLink(error);
+Firebug.chrome.select(sourceLink)
+},getContextMenuItems:function(error,target,context){var breakOnThisError=this.hasErrorBreak(error);
+return[{label:"CopyError",command:bindFixed(this.copyError,this,error)},"-",{label:"BreakOnThisError",type:"checkbox",checked:breakOnThisError,command:bindFixed(this.breakOnThisError,this,error)},{label:"BreakOnAllErrors",type:"checkbox",checked:Firebug.breakOnErrors,command:bindFixed(this.breakOnAllErrors,this,error)}]
+}});
+this.SourceText=domplate(Firebug.Rep,{tag:DIV(FOR("line","$object|lineIterator",DIV({"class":"sourceRow",role:"presentation"},SPAN({"class":"sourceLine",role:"presentation"},"$line.lineNo"),SPAN({"class":"sourceRowText",role:"presentation"},"$line.text")))),lineIterator:function(sourceText){var maxLineNoChars=(sourceText.lines.length+"").length;
+var list=[];
+for(var i=0;
+i<sourceText.lines.length;
+++i){var lineNo=(i+1)+"";
+while(lineNo.length<maxLineNoChars){lineNo=" "+lineNo
+}list.push({lineNo:lineNo,text:sourceText.lines[i]})
+}return list
+},getHTML:function(sourceText){return getSourceLineRange(sourceText,1,sourceText.lines.length)
+}});
+this.nsIDOMHistory=domplate(Firebug.Rep,{tag:OBJECTBOX({onclick:"$showHistory"},OBJECTLINK("$object|summarizeHistory")),className:"nsIDOMHistory",summarizeHistory:function(history){try{var items=history.length;
+return items+" history entries"
+}catch(exc){return"object does not support history (nsIDOMHistory)"
+}},showHistory:function(history){try{var items=history.length;
+Firebug.chrome.select(history)
+}catch(exc){}},supportsObject:function(object,type){return(object instanceof Ci.nsIDOMHistory)
+}});
+this.ApplicationCache=domplate(Firebug.Rep,{tag:OBJECTBOX({onclick:"$showApplicationCache"},OBJECTLINK("$object|summarizeCache")),summarizeCache:function(applicationCache){try{return applicationCache.length+" items in offline cache"
+}catch(exc){return"https://bugzilla.mozilla.org/show_bug.cgi?id=422264"
+}},showApplicationCache:function(event){openNewTab("https://bugzilla.mozilla.org/show_bug.cgi?id=422264")
+},className:"applicationCache",supportsObject:function(object,type){if(Ci.nsIDOMOfflineResourceList){return(object instanceof Ci.nsIDOMOfflineResourceList)
+}}});
+this.Storage=domplate(Firebug.Rep,{tag:OBJECTBOX({onclick:"$show"},OBJECTLINK("$object|summarize")),summarize:function(storage){return storage.length+" items in Storage"
+},show:function(storage){openNewTab("http://dev.w3.org/html5/webstorage/#storage-0")
+},className:"Storage",supportsObject:function(object,type){return(object instanceof Storage)
+}});
+Firebug.registerRep(this.Undefined,this.Null,this.Number,this.String,this.Window,this.Element,this.Document,this.StyleSheet,this.Event,this.Property,this.Except,this.Arr);
+Firebug.setDefaultReps(this.Func,this.Obj)
+}});
+FBL.ns(function(){with(FBL){var saveTimeout=400;
+var pageAmount=10;
+var currentTarget=null;
+var currentGroup=null;
+var currentPanel=null;
+var currentEditor=null;
+var defaultEditor=null;
+var originalClassName=null;
+var originalValue=null;
+var defaultValue=null;
+var previousValue=null;
+var invalidEditor=false;
+var ignoreNextInput=false;
+Firebug.Editor=extend(Firebug.Module,{supportsStopEvent:true,dispatchName:"editor",tabCharacter:"    ",startEditing:function(target,value,editor){this.stopEditing();
+if(hasClass(target,"insertBefore")||hasClass(target,"insertAfter")){return
+}var panel=Firebug.getElementPanel(target);
+if(!panel.editable){return
+}if(FBTrace.DBG_EDITOR){FBTrace.sysout("editor.startEditing "+value,target)
+}defaultValue=target.getAttribute("defaultValue");
+if(value==undefined){var textContent=isIE?"innerText":"textContent";
+value=target[textContent];
+if(value==defaultValue){value=""
+}}originalValue=previousValue=value;
+invalidEditor=false;
+currentTarget=target;
+currentPanel=panel;
+currentGroup=getAncestorByClass(target,"editGroup");
+currentPanel.editing=true;
+var panelEditor=currentPanel.getEditor(target,value);
+currentEditor=editor?editor:panelEditor;
+if(!currentEditor){currentEditor=getDefaultEditor(currentPanel)
+}var inlineParent=getInlineParent(target);
+var targetSize=getOffsetSize(inlineParent);
+setClass(panel.panelNode,"editing");
+setClass(target,"editing");
+if(currentGroup){setClass(currentGroup,"editing")
+}currentEditor.show(target,currentPanel,value,targetSize);
+currentEditor.beginEditing(target,value);
+if(FBTrace.DBG_EDITOR){FBTrace.sysout("Editor start panel "+currentPanel.name)
+}this.attachListeners(currentEditor,panel.context)
+},stopEditing:function(cancel){if(!currentTarget){return
+}if(FBTrace.DBG_EDITOR){FBTrace.sysout("editor.stopEditing cancel:"+cancel+" saveTimeout: "+this.saveTimeout)
+}clearTimeout(this.saveTimeout);
+delete this.saveTimeout;
+this.detachListeners(currentEditor,currentPanel.context);
+removeClass(currentPanel.panelNode,"editing");
+removeClass(currentTarget,"editing");
+if(currentGroup){removeClass(currentGroup,"editing")
+}var value=currentEditor.getValue();
+if(value==defaultValue){value=""
+}var removeGroup=currentEditor.endEditing(currentTarget,value,cancel);
+try{if(cancel){if(value!=originalValue){this.saveEditAndNotifyListeners(currentTarget,originalValue,previousValue)
+}if(removeGroup&&!originalValue&&currentGroup){currentGroup.parentNode.removeChild(currentGroup)
+}}else{if(!value){this.saveEditAndNotifyListeners(currentTarget,null,previousValue);
+if(removeGroup&&currentGroup){currentGroup.parentNode.removeChild(currentGroup)
+}}else{this.save(value)
+}}}catch(exc){}currentEditor.hide();
+currentPanel.editing=false;
+currentTarget=null;
+currentGroup=null;
+currentPanel=null;
+currentEditor=null;
+originalValue=null;
+invalidEditor=false;
+return value
+},cancelEditing:function(){return this.stopEditing(true)
+},update:function(saveNow){if(this.saveTimeout){clearTimeout(this.saveTimeout)
+}invalidEditor=true;
+currentEditor.layout();
+if(saveNow){this.save()
+}else{var context=currentPanel.context;
+this.saveTimeout=context.setTimeout(bindFixed(this.save,this),saveTimeout);
+if(FBTrace.DBG_EDITOR){FBTrace.sysout("editor.update saveTimeout: "+this.saveTimeout)
+}}},save:function(value){if(!invalidEditor){return
+}if(value==undefined){value=currentEditor.getValue()
+}if(FBTrace.DBG_EDITOR){FBTrace.sysout("editor.save saveTimeout: "+this.saveTimeout+" currentPanel: "+(currentPanel?currentPanel.name:"null"))
+}try{this.saveEditAndNotifyListeners(currentTarget,value,previousValue);
+previousValue=value;
+invalidEditor=false
+}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("editor.save FAILS "+exc,exc)
+}}},saveEditAndNotifyListeners:function(currentTarget,value,previousValue){currentEditor.saveEdit(currentTarget,value,previousValue)
+},setEditTarget:function(element){if(!element){dispatch([Firebug.A11yModel],"onInlineEditorClose",[currentPanel,currentTarget,true]);
+this.stopEditing()
+}else{if(hasClass(element,"insertBefore")){this.insertRow(element,"before")
+}else{if(hasClass(element,"insertAfter")){this.insertRow(element,"after")
+}else{this.startEditing(element)
+}}}},tabNextEditor:function(){if(!currentTarget){return
+}var value=currentEditor.getValue();
+var nextEditable=currentTarget;
+do{nextEditable=!value&&currentGroup?getNextOutsider(nextEditable,currentGroup):getNextByClass(nextEditable,"editable")
+}while(nextEditable&&!nextEditable.offsetHeight);
+this.setEditTarget(nextEditable)
+},tabPreviousEditor:function(){if(!currentTarget){return
+}var value=currentEditor.getValue();
+var prevEditable=currentTarget;
+do{prevEditable=!value&&currentGroup?getPreviousOutsider(prevEditable,currentGroup):getPreviousByClass(prevEditable,"editable")
+}while(prevEditable&&!prevEditable.offsetHeight);
+this.setEditTarget(prevEditable)
+},insertRow:function(relative,insertWhere){var group=relative||getAncestorByClass(currentTarget,"editGroup")||currentTarget;
+var value=this.stopEditing();
+currentPanel=Firebug.getElementPanel(group);
+currentEditor=currentPanel.getEditor(group,value);
+if(!currentEditor){currentEditor=getDefaultEditor(currentPanel)
+}currentGroup=currentEditor.insertNewRow(group,insertWhere);
+if(!currentGroup){return
+}var editable=hasClass(currentGroup,"editable")?currentGroup:getNextByClass(currentGroup,"editable");
+if(editable){this.setEditTarget(editable)
+}},insertRowForObject:function(relative){var container=getAncestorByClass(relative,"insertInto");
+if(container){relative=getChildByClass(container,"insertBefore");
+if(relative){this.insertRow(relative,"before")
+}}},attachListeners:function(editor,context){var win=isIE?currentTarget.ownerDocument.parentWindow:currentTarget.ownerDocument.defaultView;
+addEvent(win,"resize",this.onResize);
+addEvent(win,"blur",this.onBlur);
+var chrome=Firebug.chrome;
+this.listeners=[chrome.keyCodeListen("ESCAPE",null,bind(this.cancelEditing,this))];
+if(editor.arrowCompletion){this.listeners.push(chrome.keyCodeListen("UP",null,bindFixed(editor.completeValue,editor,-1)),chrome.keyCodeListen("DOWN",null,bindFixed(editor.completeValue,editor,1)),chrome.keyCodeListen("PAGE_UP",null,bindFixed(editor.completeValue,editor,-pageAmount)),chrome.keyCodeListen("PAGE_DOWN",null,bindFixed(editor.completeValue,editor,pageAmount)))
+}if(currentEditor.tabNavigation){this.listeners.push(chrome.keyCodeListen("RETURN",null,bind(this.tabNextEditor,this)),chrome.keyCodeListen("RETURN",isControl,bind(this.insertRow,this,null,"after")),chrome.keyCodeListen("TAB",null,bind(this.tabNextEditor,this)),chrome.keyCodeListen("TAB",isShift,bind(this.tabPreviousEditor,this)))
+}else{if(currentEditor.multiLine){this.listeners.push(chrome.keyCodeListen("TAB",null,insertTab))
+}else{this.listeners.push(chrome.keyCodeListen("RETURN",null,bindFixed(this.stopEditing,this)));
+if(currentEditor.tabCompletion){this.listeners.push(chrome.keyCodeListen("TAB",null,bind(editor.completeValue,editor,1)),chrome.keyCodeListen("TAB",isShift,bind(editor.completeValue,editor,-1)))
+}}}},detachListeners:function(editor,context){if(!this.listeners){return
+}var win=isIE?currentTarget.ownerDocument.parentWindow:currentTarget.ownerDocument.defaultView;
+removeEvent(win,"resize",this.onResize);
+removeEvent(win,"blur",this.onBlur);
+var chrome=Firebug.chrome;
+if(chrome){for(var i=0;
+i<this.listeners.length;
+++i){chrome.keyIgnore(this.listeners[i])
+}}delete this.listeners
+},onResize:function(event){currentEditor.layout(true)
+},onBlur:function(event){if(currentEditor.enterOnBlur&&isAncestor(event.target,currentEditor.box)){this.stopEditing()
+}},initialize:function(){Firebug.Module.initialize.apply(this,arguments);
+this.onResize=bindFixed(this.onResize,this);
+this.onBlur=bind(this.onBlur,this)
+},disable:function(){this.stopEditing()
+},showContext:function(browser,context){this.stopEditing()
+},showPanel:function(browser,panel){this.stopEditing()
+}});
+Firebug.BaseEditor=extend(Firebug.MeasureBox,{getValue:function(){},setValue:function(value){},show:function(target,panel,value,textSize,targetSize){},hide:function(){},layout:function(forceAll){},getContextMenuItems:function(target){var items=[];
+items.push({label:"Cut",commandID:"cmd_cut"});
+items.push({label:"Copy",commandID:"cmd_copy"});
+items.push({label:"Paste",commandID:"cmd_paste"});
+return items
+},beginEditing:function(target,value){},saveEdit:function(target,value,previousValue){},endEditing:function(target,value,cancel){return true
+},insertNewRow:function(target,insertWhere){}});
+var inlineEditorAttributes={"class":"textEditorInner",type:"text",spellcheck:"false",onkeypress:"$onKeyPress",onoverflow:"$onOverflow",oncontextmenu:"$onContextMenu"};
+if(isIE){inlineEditorAttributes.onpropertychange="$onInput";
+inlineEditorAttributes.onkeydown="$onKeyDown"
+}else{inlineEditorAttributes.oninput="$onInput"
+}Firebug.InlineEditor=function(doc){this.initializeInline(doc)
+};
+Firebug.InlineEditor.prototype=domplate(Firebug.BaseEditor,{enterOnBlur:true,outerMargin:8,shadowExpand:7,tag:DIV({"class":"inlineEditor"},DIV({"class":"textEditorTop1"},DIV({"class":"textEditorTop2"})),DIV({"class":"textEditorInner1"},DIV({"class":"textEditorInner2"},INPUT(inlineEditorAttributes))),DIV({"class":"textEditorBottom1"},DIV({"class":"textEditorBottom2"}))),inputTag:INPUT({"class":"textEditorInner",type:"text",onkeypress:"$onKeyPress",onoverflow:"$onOverflow"}),expanderTag:IMG({"class":"inlineExpander",src:"blank.gif"}),initialize:function(){this.fixedWidth=false;
+this.completeAsYouType=true;
+this.tabNavigation=true;
+this.multiLine=false;
+this.tabCompletion=false;
+this.arrowCompletion=true;
+this.noWrap=true;
+this.numeric=false
+},destroy:function(){this.destroyInput()
+},initializeInline:function(doc){if(FBTrace.DBG_EDITOR){FBTrace.sysout("Firebug.InlineEditor initializeInline()")
+}this.box=this.tag.append({},doc.body,this);
+this.input=this.box.getElementsByTagName("input")[0];
+if(isIElt8){this.input.style.top="-8px"
+}this.expander=this.expanderTag.replace({},doc,this);
+this.initialize()
+},destroyInput:function(){},getValue:function(){return this.input.value
+},setValue:function(value){return this.input.value=stripNewLines(value)
+},show:function(target,panel,value,targetSize){this.target=target;
+this.panel=panel;
+this.targetSize=targetSize;
+var innerHTML=target.innerHTML;
+var isEmptyElement=!innerHTML;
+if(isEmptyElement){target.innerHTML="."
+}this.targetOffset={x:target.offsetLeft,y:target.offsetTop};
+if(isEmptyElement){target.innerHTML=innerHTML
+}this.originalClassName=this.box.className;
+var classNames=target.className.split(" ");
+for(var i=0;
+i<classNames.length;
+++i){setClass(this.box,"editor-"+classNames[i])
+}copyTextStyles(target,this.box);
+this.setValue(value);
+if(this.fixedWidth){this.updateLayout(true)
+}else{this.startMeasuring(target);
+this.textSize=this.measureInputText(value);
+var parent=this.input.parentNode;
+if(hasClass(parent,"textEditorInner2")){var yDiff=this.textSize.height-this.shadowExpand;
+if(isIE6){yDiff-=2
+}parent.style.height=yDiff+"px";
+parent.parentNode.style.height=yDiff+"px"
+}this.updateLayout(true)
+}this.getAutoCompleter().reset();
+if(isIElt8){panel.panelNode.appendChild(this.box)
+}else{target.offsetParent.appendChild(this.box)
+}if(isIE){this.input.style.fontFamily="Monospace";
+this.input.style.fontSize="11px"
+}if(!this.fixedWidth){copyBoxStyles(target,this.expander);
+target.parentNode.replaceChild(this.expander,target);
+collapse(target,true);
+this.expander.parentNode.insertBefore(target,this.expander)
+}this.box.style.display="block";
+var self=this;
+setTimeout(function(){self.input.focus();
+self.input.select()
+},0)
+},hide:function(){this.box.className=this.originalClassName;
+if(!this.fixedWidth){this.stopMeasuring();
+collapse(this.target,false);
+if(this.expander.parentNode){this.expander.parentNode.removeChild(this.expander)
+}}if(this.box.parentNode){this.input.blur();
+this.box.parentNode.removeChild(this.box)
+}delete this.target;
+delete this.panel
+},layout:function(forceAll){if(!this.fixedWidth){this.textSize=this.measureInputText(this.input.value)
+}if(forceAll){this.targetOffset=getClientOffset(this.expander)
+}this.updateLayout(false,forceAll)
+},beginEditing:function(target,value){},saveEdit:function(target,value,previousValue){},endEditing:function(target,value,cancel){return true
+},insertNewRow:function(target,insertWhere){},advanceToNext:function(target,charCode){return false
+},getAutoCompleteRange:function(value,offset){},getAutoCompleteList:function(preExpr,expr,postExpr){},getAutoCompleter:function(){if(!this.autoCompleter){this.autoCompleter=new Firebug.AutoCompleter(null,bind(this.getAutoCompleteRange,this),bind(this.getAutoCompleteList,this),true,false)
+}return this.autoCompleter
+},completeValue:function(amt){var selectRangeCallback=this.getAutoCompleter().complete(currentPanel.context,this.input,true,amt<0);
+if(selectRangeCallback){Firebug.Editor.update(true);
+if(isSafari){setTimeout(selectRangeCallback,0)
+}else{selectRangeCallback()
+}}else{this.incrementValue(amt)
+}},incrementValue:function(amt){var value=this.input.value;
+if(isIE){var start=getInputSelectionStart(this.input),end=start
+}else{var start=this.input.selectionStart,end=this.input.selectionEnd
+}var range=this.getAutoCompleteRange(value,start);
+if(!range||range.type!="int"){range={start:0,end:value.length-1}
+}var expr=value.substr(range.start,range.end-range.start+1);
+preExpr=value.substr(0,range.start);
+postExpr=value.substr(range.end+1);
+var intValue=parseInt(expr);
+if(!!intValue||intValue==0){var m=/\d+/.exec(expr);
+var digitPost=expr.substr(m.index+m[0].length);
+var completion=intValue-amt;
+this.input.value=preExpr+completion+digitPost+postExpr;
+setSelectionRange(this.input,start,end);
+Firebug.Editor.update(true);
+return true
+}else{return false
+}},onKeyPress:function(event){if(event.keyCode==27&&!this.completeAsYouType){var reverted=this.getAutoCompleter().revert(this.input);
+if(reverted){cancelEvent(event)
+}}else{if(event.charCode&&this.advanceToNext(this.target,event.charCode)){Firebug.Editor.tabNextEditor();
+cancelEvent(event)
+}else{if(this.numeric&&event.charCode&&(event.charCode<48||event.charCode>57)&&event.charCode!=45&&event.charCode!=46){FBL.cancelEvent(event)
+}else{this.ignoreNextInput=event.keyCode==8
+}}}},onOverflow:function(){this.updateLayout(false,false,3)
+},onKeyDown:function(event){if(event.keyCode>46||event.keyCode==32||event.keyCode==8){this.keyDownPressed=true
+}},onInput:function(event){if(isIE){if(event.propertyName!="value"||!isVisible(this.input)||!this.keyDownPressed){return
+}this.keyDownPressed=false
+}var selectRangeCallback;
+if(this.ignoreNextInput){this.ignoreNextInput=false;
+this.getAutoCompleter().reset()
+}else{if(this.completeAsYouType){selectRangeCallback=this.getAutoCompleter().complete(currentPanel.context,this.input,false)
+}else{this.getAutoCompleter().reset()
+}}Firebug.Editor.update();
+if(selectRangeCallback){if(isSafari){setTimeout(selectRangeCallback,0)
+}else{selectRangeCallback()
+}}},onContextMenu:function(event){cancelEvent(event);
+var popup=$("fbInlineEditorPopup");
+FBL.eraseNode(popup);
+var target=event.target||event.srcElement;
+var menu=this.getContextMenuItems(target);
+if(menu){for(var i=0;
+i<menu.length;
+++i){FBL.createMenuItem(popup,menu[i])
+}}if(!popup.firstChild){return false
+}popup.openPopupAtScreen(event.screenX,event.screenY,true);
+return true
+},updateLayout:function(initial,forceAll,extraWidth){if(this.fixedWidth){this.box.style.left=(this.targetOffset.x)+"px";
+this.box.style.top=(this.targetOffset.y)+"px";
+var w=this.target.offsetWidth;
+var h=this.target.offsetHeight;
+this.input.style.width=w+"px";
+this.input.style.height=(h-3)+"px"
+}else{if(initial||forceAll){this.box.style.left=this.targetOffset.x+"px";
+this.box.style.top=this.targetOffset.y+"px"
+}var approxTextWidth=this.textSize.width;
+var maxWidth=(currentPanel.panelNode.scrollWidth-this.targetOffset.x)-this.outerMargin;
+var wrapped=initial?this.noWrap&&this.targetSize.height>this.textSize.height+3:this.noWrap&&approxTextWidth>maxWidth;
+if(wrapped){var style=isIE?this.target.currentStyle:this.target.ownerDocument.defaultView.getComputedStyle(this.target,"");
+targetMargin=parseInt(style.marginLeft)+parseInt(style.marginRight);
+approxTextWidth=maxWidth-targetMargin;
+this.input.style.width="100%";
+this.box.style.width=approxTextWidth+"px"
+}else{var charWidth=this.measureInputText("m").width;
+if(extraWidth){charWidth*=extraWidth
+}var inputWidth=approxTextWidth+charWidth;
+if(initial){if(isIE){var xDiff=13;
+this.box.style.width=(inputWidth+xDiff)+"px"
+}else{this.box.style.width="auto"
+}}else{var xDiff=isIE?13:this.box.scrollWidth-this.input.offsetWidth;
+this.box.style.width=(inputWidth+xDiff)+"px"
+}this.input.style.width=inputWidth+"px"
+}this.expander.style.width=approxTextWidth+"px";
+this.expander.style.height=Math.max(this.textSize.height-3,0)+"px"
+}if(forceAll){scrollIntoCenterView(this.box,null,true)
+}}});
+Firebug.AutoCompleter=function(getExprOffset,getRange,evaluator,selectMode,caseSensitive){var candidates=null;
+var originalValue=null;
+var originalOffset=-1;
+var lastExpr=null;
+var lastOffset=-1;
+var exprOffset=0;
+var lastIndex=0;
+var preParsed=null;
+var preExpr=null;
+var postExpr=null;
+this.revert=function(textBox){if(originalOffset!=-1){textBox.value=originalValue;
+setSelectionRange(textBox,originalOffset,originalOffset);
+this.reset();
+return true
+}else{this.reset();
+return false
+}};
+this.reset=function(){candidates=null;
+originalValue=null;
+originalOffset=-1;
+lastExpr=null;
+lastOffset=0;
+exprOffset=0
+};
+this.complete=function(context,textBox,cycle,reverse){var value=textBox.value;
+var offset=getInputSelectionStart(textBox);
+if(isSafari&&!cycle&&offset>=0){offset++
+}if(!selectMode&&originalOffset!=-1){offset=originalOffset
+}if(!candidates||!cycle||offset!=lastOffset){originalOffset=offset;
+originalValue=value;
+var parseStart=getExprOffset?getExprOffset(value,offset,context):0;
+preParsed=value.substr(0,parseStart);
+var parsed=value.substr(parseStart);
+var range=getRange?getRange(parsed,offset-parseStart,context):null;
+if(!range){range={start:0,end:parsed.length-1}
+}var expr=parsed.substr(range.start,range.end-range.start+1);
+preExpr=parsed.substr(0,range.start);
+postExpr=parsed.substr(range.end+1);
+exprOffset=parseStart+range.start;
+if(!cycle){if(!expr){return
+}else{if(lastExpr&&lastExpr.indexOf(expr)!=0){candidates=null
+}else{if(lastExpr&&lastExpr.length>=expr.length){candidates=null;
+lastExpr=expr;
+return
+}}}}lastExpr=expr;
+lastOffset=offset;
+var searchExpr;
+if(expr&&offset!=parseStart+range.end+1){if(cycle){offset=range.start;
+searchExpr=expr;
+expr=""
+}else{return
+}}var values=evaluator(preExpr,expr,postExpr,context);
+if(!values){return
+}if(expr){candidates=[];
+if(caseSensitive){for(var i=0;
+i<values.length;
+++i){var name=values[i];
+if(name.indexOf&&name.indexOf(expr)==0){candidates.push(name)
+}}}else{var lowerExpr=caseSensitive?expr:expr.toLowerCase();
+for(var i=0;
+i<values.length;
+++i){var name=values[i];
+if(name.indexOf&&name.toLowerCase().indexOf(lowerExpr)==0){candidates.push(name)
+}}}lastIndex=reverse?candidates.length-1:0
+}else{if(searchExpr){var searchIndex=-1;
+if(caseSensitive){searchIndex=values.indexOf(expr)
+}else{var lowerExpr=searchExpr.toLowerCase();
+for(var i=0;
+i<values.length;
+++i){var name=values[i];
+if(name&&name.toLowerCase().indexOf(lowerExpr)==0){searchIndex=i;
+break
+}}}if(searchIndex==-1){return this.reset()
+}expr=searchExpr;
+candidates=cloneArray(values);
+lastIndex=searchIndex
+}else{expr="";
+candidates=[];
+for(var i=0;
+i<values.length;
+++i){if(values[i].substr){candidates.push(values[i])
+}}lastIndex=-1
+}}}if(cycle){expr=lastExpr;
+lastIndex+=reverse?-1:1
+}if(!candidates.length){return
+}if(lastIndex>=candidates.length){lastIndex=0
+}else{if(lastIndex<0){lastIndex=candidates.length-1
+}}var completion=candidates[lastIndex];
+var preCompletion=expr.substr(0,offset-exprOffset);
+var postCompletion=completion.substr(offset-exprOffset);
+textBox.value=preParsed+preExpr+preCompletion+postCompletion+postExpr;
+var offsetEnd=preParsed.length+preExpr.length+completion.length;
+return function(){if(selectMode){setSelectionRange(textBox,offset,offsetEnd)
+}else{setSelectionRange(textBox,offsetEnd,offsetEnd)
+}}
+}
+};
+var getDefaultEditor=function getDefaultEditor(panel){if(!defaultEditor){var doc=panel.document;
+defaultEditor=new Firebug.InlineEditor(doc)
+}return defaultEditor
+};
+var getOutsider=function getOutsider(element,group,stepper){var parentGroup=getAncestorByClass(group.parentNode,"editGroup");
+var next;
+do{next=stepper(next||element)
+}while(isAncestor(next,group)||isGroupInsert(next,parentGroup));
+return next
+};
+var isGroupInsert=function isGroupInsert(next,group){return(!group||isAncestor(next,group))&&(hasClass(next,"insertBefore")||hasClass(next,"insertAfter"))
+};
+var getNextOutsider=function getNextOutsider(element,group){return getOutsider(element,group,bind(getNextByClass,FBL,"editable"))
+};
+var getPreviousOutsider=function getPreviousOutsider(element,group){return getOutsider(element,group,bind(getPreviousByClass,FBL,"editable"))
+};
+var getInlineParent=function getInlineParent(element){var lastInline=element;
+for(;
+element;
+element=element.parentNode){var s=isIE?element.currentStyle:element.ownerDocument.defaultView.getComputedStyle(element,"");
+if(s.display!="inline"){return lastInline
+}else{lastInline=element
+}}return null
+};
+var insertTab=function insertTab(){insertTextIntoElement(currentEditor.input,Firebug.Editor.tabCharacter)
+};
+Firebug.registerModule(Firebug.Editor)
+}});
+FBL.ns(function(){with(FBL){var inspectorTS,inspectorTimer,isInspecting;
+Firebug.Inspector={create:function(){offlineFragment=Env.browser.document.createDocumentFragment();
+createBoxModelInspector();
+createOutlineInspector()
+},destroy:function(){destroyBoxModelInspector();
+destroyOutlineInspector();
+offlineFragment=null
+},toggleInspect:function(){if(isInspecting){this.stopInspecting()
+}else{Firebug.chrome.inspectButton.changeState("pressed");
+this.startInspecting()
+}},startInspecting:function(){isInspecting=true;
+Firebug.chrome.selectPanel("HTML");
+createInspectorFrame();
+var size=Firebug.browser.getWindowScrollSize();
+fbInspectFrame.style.width=size.width+"px";
+fbInspectFrame.style.height=size.height+"px";
+addEvent(fbInspectFrame,"mousemove",Firebug.Inspector.onInspecting);
+addEvent(fbInspectFrame,"mousedown",Firebug.Inspector.onInspectingClick)
+},stopInspecting:function(){isInspecting=false;
+if(outlineVisible){this.hideOutline()
+}removeEvent(fbInspectFrame,"mousemove",Firebug.Inspector.onInspecting);
+removeEvent(fbInspectFrame,"mousedown",Firebug.Inspector.onInspectingClick);
+destroyInspectorFrame();
+Firebug.chrome.inspectButton.restore();
+if(Firebug.chrome.type=="popup"){Firebug.chrome.node.focus()
+}},onInspectingClick:function(e){fbInspectFrame.style.display="none";
+var targ=Firebug.browser.getElementFromPoint(e.clientX,e.clientY);
+fbInspectFrame.style.display="block";
+var id=targ.id;
+if(id&&/^fbOutline\w$/.test(id)){return
+}if(id=="FirebugUI"){return
+}while(targ.nodeType!=1){targ=targ.parentNode
+}Firebug.Inspector.stopInspecting()
+},onInspecting:function(e){if(new Date().getTime()-lastInspecting>30){fbInspectFrame.style.display="none";
+var targ=Firebug.browser.getElementFromPoint(e.clientX,e.clientY);
+fbInspectFrame.style.display="block";
+var id=targ.id;
+if(id&&/^fbOutline\w$/.test(id)){return
+}if(id=="FirebugUI"){return
+}while(targ.nodeType!=1){targ=targ.parentNode
+}if(targ.nodeName.toLowerCase()=="body"){return
+}Firebug.Inspector.drawOutline(targ);
+if(targ[cacheID]){var target=""+targ[cacheID];
+var lazySelect=function(){inspectorTS=new Date().getTime();
+Firebug.HTML.selectTreeNode(""+targ[cacheID])
+};
+if(inspectorTimer){clearTimeout(inspectorTimer);
+inspectorTimer=null
+}if(new Date().getTime()-inspectorTS>200){setTimeout(lazySelect,0)
+}else{inspectorTimer=setTimeout(lazySelect,300)
+}}lastInspecting=new Date().getTime()
+}},onInspectingBody:function(e){if(new Date().getTime()-lastInspecting>30){var targ=e.target;
+var id=targ.id;
+if(id&&/^fbOutline\w$/.test(id)){return
+}if(id=="FirebugUI"){return
+}while(targ.nodeType!=1){targ=targ.parentNode
+}if(targ.nodeName.toLowerCase()=="body"){return
+}Firebug.Inspector.drawOutline(targ);
+if(targ[cacheID]){FBL.Firebug.HTML.selectTreeNode(""+targ[cacheID])
+}lastInspecting=new Date().getTime()
+}},drawOutline:function(el){var border=2;
+var scrollbarSize=17;
+var windowSize=Firebug.browser.getWindowSize();
+var scrollSize=Firebug.browser.getWindowScrollSize();
+var scrollPosition=Firebug.browser.getWindowScrollPosition();
+var box=Firebug.browser.getElementBox(el);
+var top=box.top;
+var left=box.left;
+var height=box.height;
+var width=box.width;
+var freeHorizontalSpace=scrollPosition.left+windowSize.width-left-width-(!isIE&&scrollSize.height>windowSize.height?scrollbarSize:0);
+var freeVerticalSpace=scrollPosition.top+windowSize.height-top-height-(!isIE&&scrollSize.width>windowSize.width?scrollbarSize:0);
+var numVerticalBorders=freeVerticalSpace>0?2:1;
+var o=outlineElements;
+var style;
+style=o.fbOutlineT.style;
+style.top=top-border+"px";
+style.left=left+"px";
+style.height=border+"px";
+style.width=width+"px";
+style=o.fbOutlineL.style;
+style.top=top-border+"px";
+style.left=left-border+"px";
+style.height=height+numVerticalBorders*border+"px";
+style.width=border+"px";
+style=o.fbOutlineB.style;
+if(freeVerticalSpace>0){style.top=top+height+"px";
+style.left=left+"px";
+style.width=width+"px"
+}else{style.top=-2*border+"px";
+style.left=-2*border+"px";
+style.width=border+"px"
+}style=o.fbOutlineR.style;
+if(freeHorizontalSpace>0){style.top=top-border+"px";
+style.left=left+width+"px";
+style.height=height+numVerticalBorders*border+"px";
+style.width=(freeHorizontalSpace<border?freeHorizontalSpace:border)+"px"
+}else{style.top=-2*border+"px";
+style.left=-2*border+"px";
+style.height=border+"px";
+style.width=border+"px"
+}if(!outlineVisible){this.showOutline()
+}},hideOutline:function(){if(!outlineVisible){return
+}for(var name in outline){offlineFragment.appendChild(outlineElements[name])
+}outlineVisible=false
+},showOutline:function(){if(outlineVisible){return
+}if(boxModelVisible){this.hideBoxModel()
+}for(var name in outline){Firebug.browser.document.getElementsByTagName("body")[0].appendChild(outlineElements[name])
+}outlineVisible=true
+},drawBoxModel:function(el){if(!el||!el.parentNode){return
+}var box=Firebug.browser.getElementBox(el);
+var windowSize=Firebug.browser.getWindowSize();
+var scrollPosition=Firebug.browser.getWindowScrollPosition();
+var offsetHeight=Firebug.chrome.type=="frame"?FirebugChrome.height:0;
+if(box.top>scrollPosition.top+windowSize.height-offsetHeight||box.left>scrollPosition.left+windowSize.width||scrollPosition.top>box.top+box.height||scrollPosition.left>box.left+box.width){return
+}var top=box.top;
+var left=box.left;
+var height=box.height;
+var width=box.width;
+var margin=Firebug.browser.getMeasurementBox(el,"margin");
+var padding=Firebug.browser.getMeasurementBox(el,"padding");
+var border=Firebug.browser.getMeasurementBox(el,"border");
+boxModelStyle.top=top-margin.top+"px";
+boxModelStyle.left=left-margin.left+"px";
+boxModelStyle.height=height+margin.top+margin.bottom+"px";
+boxModelStyle.width=width+margin.left+margin.right+"px";
+boxBorderStyle.top=margin.top+"px";
+boxBorderStyle.left=margin.left+"px";
+boxBorderStyle.height=height+"px";
+boxBorderStyle.width=width+"px";
+boxPaddingStyle.top=margin.top+border.top+"px";
+boxPaddingStyle.left=margin.left+border.left+"px";
+boxPaddingStyle.height=height-border.top-border.bottom+"px";
+boxPaddingStyle.width=width-border.left-border.right+"px";
+boxContentStyle.top=margin.top+border.top+padding.top+"px";
+boxContentStyle.left=margin.left+border.left+padding.left+"px";
+boxContentStyle.height=height-border.top-padding.top-padding.bottom-border.bottom+"px";
+boxContentStyle.width=width-border.left-padding.left-padding.right-border.right+"px";
+if(!boxModelVisible){this.showBoxModel()
+}},hideBoxModel:function(){if(!boxModelVisible){return
+}offlineFragment.appendChild(boxModel);
+boxModelVisible=false
+},showBoxModel:function(){if(boxModelVisible){return
+}if(outlineVisible){this.hideOutline()
+}Firebug.browser.document.getElementsByTagName("body")[0].appendChild(boxModel);
+boxModelVisible=true
+}};
+var offlineFragment=null;
+var boxModelVisible=false;
+var boxModel,boxModelStyle,boxMargin,boxMarginStyle,boxBorder,boxBorderStyle,boxPadding,boxPaddingStyle,boxContent,boxContentStyle;
+var resetStyle="margin:0; padding:0; border:0; position:absolute; overflow:hidden; display:block;";
+var offscreenStyle=resetStyle+"top:-1234px; left:-1234px;";
+var inspectStyle=resetStyle+"z-index: 2147483500;";
+var inspectFrameStyle=resetStyle+"z-index: 2147483550; top:0; left:0; background:url("+Env.Location.skinDir+"pixel_transparent.gif);";
+var inspectModelOpacity=isIE?"filter:alpha(opacity=80);":"opacity:0.8;";
+var inspectModelStyle=inspectStyle+inspectModelOpacity;
+var inspectMarginStyle=inspectStyle+"background: #EDFF64; height:100%; width:100%;";
+var inspectBorderStyle=inspectStyle+"background: #666;";
+var inspectPaddingStyle=inspectStyle+"background: SlateBlue;";
+var inspectContentStyle=inspectStyle+"background: SkyBlue;";
+var outlineStyle={fbHorizontalLine:"background: #3875D7;height: 2px;",fbVerticalLine:"background: #3875D7;width: 2px;"};
+var lastInspecting=0;
+var fbInspectFrame=null;
+var outlineVisible=false;
+var outlineElements={};
+var outline={fbOutlineT:"fbHorizontalLine",fbOutlineL:"fbVerticalLine",fbOutlineB:"fbHorizontalLine",fbOutlineR:"fbVerticalLine"};
+var getInspectingTarget=function(){};
+var createInspectorFrame=function createInspectorFrame(){fbInspectFrame=createGlobalElement("div");
+fbInspectFrame.id="fbInspectFrame";
+fbInspectFrame.firebugIgnore=true;
+fbInspectFrame.style.cssText=inspectFrameStyle;
+Firebug.browser.document.getElementsByTagName("body")[0].appendChild(fbInspectFrame)
+};
+var destroyInspectorFrame=function destroyInspectorFrame(){if(fbInspectFrame){Firebug.browser.document.getElementsByTagName("body")[0].removeChild(fbInspectFrame);
+fbInspectFrame=null
+}};
+var createOutlineInspector=function createOutlineInspector(){for(var name in outline){var el=outlineElements[name]=createGlobalElement("div");
+el.id=name;
+el.firebugIgnore=true;
+el.style.cssText=inspectStyle+outlineStyle[outline[name]];
+offlineFragment.appendChild(el)
+}};
+var destroyOutlineInspector=function destroyOutlineInspector(){for(var name in outline){var el=outlineElements[name];
+el.parentNode.removeChild(el)
+}};
+var createBoxModelInspector=function createBoxModelInspector(){boxModel=createGlobalElement("div");
+boxModel.id="fbBoxModel";
+boxModel.firebugIgnore=true;
+boxModelStyle=boxModel.style;
+boxModelStyle.cssText=inspectModelStyle;
+boxMargin=createGlobalElement("div");
+boxMargin.id="fbBoxMargin";
+boxMarginStyle=boxMargin.style;
+boxMarginStyle.cssText=inspectMarginStyle;
+boxModel.appendChild(boxMargin);
+boxBorder=createGlobalElement("div");
+boxBorder.id="fbBoxBorder";
+boxBorderStyle=boxBorder.style;
+boxBorderStyle.cssText=inspectBorderStyle;
+boxModel.appendChild(boxBorder);
+boxPadding=createGlobalElement("div");
+boxPadding.id="fbBoxPadding";
+boxPaddingStyle=boxPadding.style;
+boxPaddingStyle.cssText=inspectPaddingStyle;
+boxModel.appendChild(boxPadding);
+boxContent=createGlobalElement("div");
+boxContent.id="fbBoxContent";
+boxContentStyle=boxContent.style;
+boxContentStyle.cssText=inspectContentStyle;
+boxModel.appendChild(boxContent);
+offlineFragment.appendChild(boxModel)
+};
+var destroyBoxModelInspector=function destroyBoxModelInspector(){boxModel.parentNode.removeChild(boxModel)
+}
+}});
+FBL.ns(function(){with(FBL){var consoleQueue=[];
+var lastHighlightedObject;
+var FirebugContext=Env.browser;
+var maxQueueRequests=500;
+Firebug.ConsoleBase={log:function(object,context,className,rep,noThrottle,sourceLink){return this.logRow(appendObject,object,context,className,rep,sourceLink,noThrottle)
+},logFormatted:function(objects,context,className,noThrottle,sourceLink){return this.logRow(appendFormatted,objects,context,className,null,sourceLink,noThrottle)
+},openGroup:function(objects,context,className,rep,noThrottle,sourceLink,noPush){return this.logRow(appendOpenGroup,objects,context,className,rep,sourceLink,noThrottle)
+},closeGroup:function(context,noThrottle){return this.logRow(appendCloseGroup,null,context,null,null,null,noThrottle,true)
+},logRow:function(appender,objects,context,className,rep,sourceLink,noThrottle,noRow){noThrottle=true;
+if(!context){context=FirebugContext
+}if(FBTrace.DBG_ERRORS&&!context){FBTrace.sysout("Console.logRow has no context, skipping objects",objects)
+}if(!context){return
+}if(noThrottle||!context){var panel=this.getPanel(context);
+if(panel){var row=panel.append(appender,objects,className,rep,sourceLink,noRow);
+var container=panel.panelNode;
+return row
+}else{consoleQueue.push([appender,objects,context,className,rep,sourceLink,noThrottle,noRow])
+}}else{if(!context.throttle){return
+}var args=[appender,objects,context,className,rep,sourceLink,true,noRow];
+context.throttle(this.logRow,this,args)
+}},appendFormatted:function(args,row,context){if(!context){context=FirebugContext
+}var panel=this.getPanel(context);
+panel.appendFormatted(args,row)
+},clear:function(context){if(!context){context=Firebug.context
+}var panel=this.getPanel(context,true);
+if(panel){panel.clear()
+}},getPanel:function(context,noCreate){return Firebug.chrome?Firebug.chrome.getPanel("Console"):null
+}};
+var ActivableConsole=extend(Firebug.ConsoleBase,{isAlwaysEnabled:function(){return true
+}});
+Firebug.Console=Firebug.Console=extend(ActivableConsole,{dispatchName:"console",error:function(){Firebug.Console.logFormatted(arguments,Firebug.browser,"error")
+},flush:function(){for(var i=0,length=consoleQueue.length;
+i<length;
+i++){var args=consoleQueue[i];
+this.logRow.apply(this,args)
+}},showPanel:function(browser,panel){},getFirebugConsoleElement:function(context,win){var element=win.document.getElementById("_firebugConsole");
+if(!element){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("getFirebugConsoleElement forcing element")
+}var elementForcer="(function(){var r=null; try { r = window._getFirebugConsoleElement();}catch(exc){r=exc;} return r;})();";
+if(context.stopped){Firebug.Console.injector.evaluateConsoleScript(context)
+}else{var r=Firebug.CommandLine.evaluateInWebPage(elementForcer,context,win)
+}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("getFirebugConsoleElement forcing element result "+r,r)
+}var element=win.document.getElementById("_firebugConsole");
+if(!element){if(FBTrace.DBG_ERRORS){FBTrace.sysout("console.getFirebugConsoleElement: no _firebugConsole in win:",win)
+}Firebug.Console.logFormatted(["Firebug cannot find _firebugConsole element",r,win],context,"error",true)
+}}return element
+},isReadyElsePreparing:function(context,win){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.isReadyElsePreparing, win is "+(win?"an argument: ":"null, context.window: ")+(win?win.location:context.window.location),(win?win:context.window))
+}if(win){return this.injector.attachIfNeeded(context,win)
+}else{var attached=true;
+for(var i=0;
+i<context.windows.length;
+i++){attached=attached&&this.injector.attachIfNeeded(context,context.windows[i])
+}if(context.windows.indexOf(context.window)==-1){FBTrace.sysout("isReadyElsePreparing ***************** context.window not in context.windows")
+}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.isReadyElsePreparing attached to "+context.windows.length+" and returns "+attached)
+}return attached
+}},initialize:function(){this.panelName="console"
+},enable:function(){if(Firebug.Console.isAlwaysEnabled()){this.watchForErrors()
+}},disable:function(){if(Firebug.Console.isAlwaysEnabled()){this.unwatchForErrors()
+}},initContext:function(context,persistedState){Firebug.ActivableModule.initContext.apply(this,arguments);
+context.consoleReloadWarning=true
+},loadedContext:function(context){for(var url in context.sourceFileMap){return
+}this.clearReloadWarning(context)
+},clearReloadWarning:function(context){if(context.consoleReloadWarning){var panel=context.getPanel(this.panelName);
+panel.clearReloadWarning();
+delete context.consoleReloadWarning
+}},togglePersist:function(context){var panel=context.getPanel(this.panelName);
+panel.persistContent=panel.persistContent?false:true;
+Firebug.chrome.setGlobalAttribute("cmd_togglePersistConsole","checked",panel.persistContent)
+},showContext:function(browser,context){Firebug.chrome.setGlobalAttribute("cmd_clearConsole","disabled",!context);
+Firebug.ActivableModule.showContext.apply(this,arguments)
+},destroyContext:function(context,persistedState){Firebug.Console.injector.detachConsole(context,context.window)
+},onPanelEnable:function(panelName){if(panelName!=this.panelName){return
+}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.onPanelEnable**************")
+}this.watchForErrors();
+Firebug.Debugger.addDependentModule(this)
+},onPanelDisable:function(panelName){if(panelName!=this.panelName){return
+}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.onPanelDisable**************")
+}Firebug.Debugger.removeDependentModule(this);
+this.unwatchForErrors();
+this.clear()
+},onSuspendFirebug:function(){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.onSuspendFirebug\n")
+}if(Firebug.Console.isAlwaysEnabled()){this.unwatchForErrors()
+}},onResumeFirebug:function(){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.onResumeFirebug\n")
+}if(Firebug.Console.isAlwaysEnabled()){this.watchForErrors()
+}},watchForErrors:function(){Firebug.Errors.checkEnabled();
+$("fbStatusIcon").setAttribute("console","on")
+},unwatchForErrors:function(){Firebug.Errors.checkEnabled();
+$("fbStatusIcon").removeAttribute("console")
+},onMonitorScript:function(context,frame){Firebug.Console.log(frame,context)
+},onFunctionCall:function(context,frame,depth,calling){if(calling){Firebug.Console.openGroup([frame,"depth:"+depth],context)
+}else{Firebug.Console.closeGroup(context)
+}},logRow:function(appender,objects,context,className,rep,sourceLink,noThrottle,noRow){if(!context){context=FirebugContext
+}if(FBTrace.DBG_WINDOWS&&!context){FBTrace.sysout("Console.logRow: no context \n")
+}if(this.isAlwaysEnabled()){return Firebug.ConsoleBase.logRow.apply(this,arguments)
+}}});
+Firebug.ConsoleListener={log:function(context,object,className,sourceLink){},logFormatted:function(context,objects,className,sourceLink){}};
+Firebug.ConsolePanel=function(){};
+Firebug.ConsolePanel.prototype=extend(Firebug.Panel,{wasScrolledToBottom:false,messageCount:0,lastLogTime:0,groups:null,limit:null,append:function(appender,objects,className,rep,sourceLink,noRow){var container=this.getTopContainer();
+if(noRow){appender.apply(this,[objects])
+}else{var row=this.createRow("logRow",className);
+appender.apply(this,[objects,row,rep]);
+if(sourceLink){FirebugReps.SourceLink.tag.append({object:sourceLink},row)
+}container.appendChild(row);
+this.filterLogRow(row,this.wasScrolledToBottom);
+if(this.wasScrolledToBottom){scrollToBottom(this.panelNode)
+}return row
+}},clear:function(){if(this.panelNode){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("ConsolePanel.clear")
+}clearNode(this.panelNode);
+this.insertLogLimit(this.context)
+}},insertLogLimit:function(){var row=this.createRow("limitRow");
+var limitInfo={totalCount:0,limitPrefsTitle:$STRF("LimitPrefsTitle",[Firebug.prefDomain+".console.logLimit"])};
+return;
+var netLimitRep=Firebug.NetMonitor.NetLimit;
+var nodes=netLimitRep.createTable(row,limitInfo);
+this.limit=nodes[1];
+var container=this.panelNode;
+container.insertBefore(nodes[0],container.firstChild)
+},insertReloadWarning:function(){this.warningRow=this.append(appendObject,$STR("message.Reload to activate window console"),"info")
+},clearReloadWarning:function(){if(this.warningRow){this.warningRow.parentNode.removeChild(this.warningRow);
+delete this.warningRow
+}},appendObject:function(object,row,rep){if(!rep){rep=Firebug.getRep(object)
+}return rep.tag.append({object:object},row)
+},appendFormatted:function(objects,row,rep){if(!objects||!objects.length){return
+}function logText(text,row){var node=row.ownerDocument.createTextNode(text);
+row.appendChild(node)
+}var format=objects[0];
+var objIndex=0;
+if(typeof(format)!="string"){format="";
+objIndex=-1
+}else{if(objects.length===1){if(format.length<1){logText("(an empty string)",row);
+return
+}}}var parts=parseFormat(format);
+var trialIndex=objIndex;
+for(var i=0;
+i<parts.length;
+i++){var part=parts[i];
+if(part&&typeof(part)=="object"){if(++trialIndex>objects.length){format="";
+objIndex=-1;
+parts.length=0;
+break
+}}}for(var i=0;
+i<parts.length;
+++i){var part=parts[i];
+if(part&&typeof(part)=="object"){var object=objects[++objIndex];
+if(typeof(object)!="undefined"){this.appendObject(object,row,part.rep)
+}else{this.appendObject(part.type,row,FirebugReps.Text)
+}}else{FirebugReps.Text.tag.append({object:part},row)
+}}for(var i=objIndex+1;
+i<objects.length;
+++i){logText(" ",row);
+var object=objects[i];
+if(typeof(object)=="string"){FirebugReps.Text.tag.append({object:object},row)
+}else{this.appendObject(object,row)
+}}},appendOpenGroup:function(objects,row,rep){if(!this.groups){this.groups=[]
+}setClass(row,"logGroup");
+setClass(row,"opened");
+var innerRow=this.createRow("logRow");
+setClass(innerRow,"logGroupLabel");
+if(rep){rep.tag.replace({objects:objects},innerRow)
+}else{this.appendFormatted(objects,innerRow,rep)
+}row.appendChild(innerRow);
+var groupBody=this.createRow("logGroupBody");
+row.appendChild(groupBody);
+groupBody.setAttribute("role","group");
+this.groups.push(groupBody);
+addEvent(innerRow,"mousedown",function(event){if(isLeftClick(event)){var target=event.target||event.srcElement;
+target=getAncestorByClass(target,"logGroupLabel");
+var groupRow=target.parentNode;
+if(hasClass(groupRow,"opened")){removeClass(groupRow,"opened");
+target.setAttribute("aria-expanded","false")
+}else{setClass(groupRow,"opened");
+target.setAttribute("aria-expanded","true")
+}}})
+},appendCloseGroup:function(object,row,rep){if(this.groups){this.groups.pop()
+}},onMouseMove:function(event){var target=event.srcElement||event.target;
+var object=getAncestorByClass(target,"objectLink-element");
+object=object?object.repObject:null;
+if(object&&instanceOf(object,"Element")&&object.nodeType==1){if(object!=lastHighlightedObject){Firebug.Inspector.drawBoxModel(object);
+object=lastHighlightedObject
+}}else{Firebug.Inspector.hideBoxModel()
+}},onMouseDown:function(event){var target=event.srcElement||event.target;
+var object=getAncestorByClass(target,"objectLink");
+var repObject=object?object.repObject:null;
+if(!repObject){return
+}if(hasClass(object,"objectLink-object")){Firebug.chrome.selectPanel("DOM");
+Firebug.chrome.getPanel("DOM").select(repObject,true)
+}else{if(hasClass(object,"objectLink-element")){Firebug.chrome.selectPanel("HTML");
+Firebug.chrome.getPanel("HTML").select(repObject,true)
+}}},name:"Console",title:"Console",options:{hasCommandLine:true,hasToolButtons:true,isPreRendered:true},create:function(){Firebug.Panel.create.apply(this,arguments);
+this.context=Firebug.browser.window;
+this.document=Firebug.chrome.document;
+this.onMouseMove=bind(this.onMouseMove,this);
+this.onMouseDown=bind(this.onMouseDown,this);
+this.clearButton=new Button({element:$("fbConsole_btClear"),owner:Firebug.Console,onClick:Firebug.Console.clear})
+},initialize:function(){Firebug.Panel.initialize.apply(this,arguments);
+if(!this.persistedContent&&Firebug.Console.isAlwaysEnabled()){this.insertLogLimit(this.context);
+this.updateMaxLimit();
+if(this.context.consoleReloadWarning){this.insertReloadWarning()
+}}addEvent(this.panelNode,"mouseover",this.onMouseMove);
+addEvent(this.panelNode,"mousedown",this.onMouseDown);
+this.clearButton.initialize()
+},initializeNode:function(){if(FBTrace.DBG_CONSOLE){this.onScroller=bind(this.onScroll,this);
+addEvent(this.panelNode,"scroll",this.onScroller)
+}this.onResizer=bind(this.onResize,this);
+this.resizeEventTarget=Firebug.chrome.$("fbContentBox");
+addEvent(this.resizeEventTarget,"resize",this.onResizer)
+},destroyNode:function(){if(this.onScroller){removeEvent(this.panelNode,"scroll",this.onScroller)
+}},shutdown:function(){this.clearButton.shutdown();
+removeEvent(this.panelNode,"mousemove",this.onMouseMove);
+removeEvent(this.panelNode,"mousedown",this.onMouseDown);
+this.destroyNode();
+Firebug.Panel.shutdown.apply(this,arguments)
+},ishow:function(state){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("Console.panel show; "+this.context.getName(),state)
+}var enabled=Firebug.Console.isAlwaysEnabled();
+if(enabled){Firebug.Console.disabledPanelPage.hide(this);
+this.showCommandLine(true);
+this.showToolbarButtons("fbConsoleButtons",true);
+Firebug.chrome.setGlobalAttribute("cmd_togglePersistConsole","checked",this.persistContent);
+if(state&&state.wasScrolledToBottom){this.wasScrolledToBottom=state.wasScrolledToBottom;
+delete state.wasScrolledToBottom
+}if(this.wasScrolledToBottom){scrollToBottom(this.panelNode)
+}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.show ------------------ wasScrolledToBottom: "+this.wasScrolledToBottom+", "+this.context.getName())
+}}else{this.hide(state);
+Firebug.Console.disabledPanelPage.show(this)
+}},ihide:function(state){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("Console.panel hide; "+this.context.getName(),state)
+}this.showToolbarButtons("fbConsoleButtons",false);
+this.showCommandLine(false);
+if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.hide ------------------ wasScrolledToBottom: "+this.wasScrolledToBottom+", "+this.context.getName())
+}},destroy:function(state){if(this.panelNode.offsetHeight){this.wasScrolledToBottom=isScrolledToBottom(this.panelNode)
+}if(state){state.wasScrolledToBottom=this.wasScrolledToBottom
+}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.destroy ------------------ wasScrolledToBottom: "+this.wasScrolledToBottom+", "+this.context.getName())
+}},shouldBreakOnNext:function(){return Firebug.getPref(Firebug.servicePrefDomain,"breakOnErrors")
+},getBreakOnNextTooltip:function(enabled){return(enabled?$STR("console.Disable Break On All Errors"):$STR("console.Break On All Errors"))
+},enablePanel:function(module){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.ConsolePanel.enablePanel; "+this.context.getName())
+}Firebug.ActivablePanel.enablePanel.apply(this,arguments);
+this.showCommandLine(true);
+if(this.wasScrolledToBottom){scrollToBottom(this.panelNode)
+}},disablePanel:function(module){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.ConsolePanel.disablePanel; "+this.context.getName())
+}Firebug.ActivablePanel.disablePanel.apply(this,arguments);
+this.showCommandLine(false)
+},getOptionsMenuItems:function(){return[optionMenu("ShowJavaScriptErrors","showJSErrors"),optionMenu("ShowJavaScriptWarnings","showJSWarnings"),optionMenu("ShowCSSErrors","showCSSErrors"),optionMenu("ShowXMLErrors","showXMLErrors"),optionMenu("ShowXMLHttpRequests","showXMLHttpRequests"),optionMenu("ShowChromeErrors","showChromeErrors"),optionMenu("ShowChromeMessages","showChromeMessages"),optionMenu("ShowExternalErrors","showExternalErrors"),optionMenu("ShowNetworkErrors","showNetworkErrors"),this.getShowStackTraceMenuItem(),this.getStrictOptionMenuItem(),"-",optionMenu("LargeCommandLine","largeCommandLine")]
+},getShowStackTraceMenuItem:function(){var menuItem=serviceOptionMenu("ShowStackTrace","showStackTrace");
+if(FirebugContext&&!Firebug.Debugger.isAlwaysEnabled()){menuItem.disabled=true
+}return menuItem
+},getStrictOptionMenuItem:function(){var strictDomain="javascript.options";
+var strictName="strict";
+var strictValue=prefs.getBoolPref(strictDomain+"."+strictName);
+return{label:"JavascriptOptionsStrict",type:"checkbox",checked:strictValue,command:bindFixed(Firebug.setPref,Firebug,strictDomain,strictName,!strictValue)}
+},getBreakOnMenuItems:function(){return[]
+},search:function(text){if(!text){return
+}if(this.matchSet){for(var i in this.matchSet){removeClass(this.matchSet[i],"matched")
+}}this.matchSet=[];
+function findRow(node){return getAncestorByClass(node,"logRow")
+}var search=new TextSearch(this.panelNode,findRow);
+var logRow=search.find(text);
+if(!logRow){dispatch([Firebug.A11yModel],"onConsoleSearchMatchFound",[this,text,[]]);
+return false
+}for(;
+logRow;
+logRow=search.findNext()){setClass(logRow,"matched");
+this.matchSet.push(logRow)
+}dispatch([Firebug.A11yModel],"onConsoleSearchMatchFound",[this,text,this.matchSet]);
+return true
+},breakOnNext:function(breaking){Firebug.setPref(Firebug.servicePrefDomain,"breakOnErrors",breaking)
+},createRow:function(rowName,className){var elt=this.document.createElement("div");
+elt.className=rowName+(className?" "+rowName+"-"+className:"");
+return elt
+},getTopContainer:function(){if(this.groups&&this.groups.length){return this.groups[this.groups.length-1]
+}else{return this.panelNode
+}},filterLogRow:function(logRow,scrolledToBottom){if(this.searchText){setClass(logRow,"matching");
+setClass(logRow,"matched");
+setTimeout(bindFixed(function(){if(this.searchFilter(this.searchText,logRow)){this.matchSet.push(logRow)
+}else{removeClass(logRow,"matched")
+}removeClass(logRow,"matching");
+if(scrolledToBottom){scrollToBottom(this.panelNode)
+}},this),100)
+}},searchFilter:function(text,logRow){var count=this.panelNode.childNodes.length;
+var searchRange=this.document.createRange();
+searchRange.setStart(this.panelNode,0);
+searchRange.setEnd(this.panelNode,count);
+var startPt=this.document.createRange();
+startPt.setStartBefore(logRow);
+var endPt=this.document.createRange();
+endPt.setStartAfter(logRow);
+return finder.Find(text,searchRange,startPt,endPt)!=null
+},observe:function(subject,topic,data){if(topic!="nsPref:changed"){return
+}var prefDomain="Firebug.extension.";
+var prefName=data.substr(prefDomain.length);
+if(prefName=="console.logLimit"){this.updateMaxLimit()
+}},updateMaxLimit:function(){var value=1000;
+maxQueueRequests=value?value:maxQueueRequests
+},showCommandLine:function(shouldShow){return;
+if(shouldShow){collapse(Firebug.chrome.$("fbCommandBox"),false);
+Firebug.CommandLine.setMultiLine(Firebug.largeCommandLine,Firebug.chrome)
+}else{Firebug.CommandLine.setMultiLine(false,Firebug.chrome,Firebug.largeCommandLine);
+collapse(Firebug.chrome.$("fbCommandBox"),true)
+}},onScroll:function(event){this.wasScrolledToBottom=FBL.isScrolledToBottom(this.panelNode);
+if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.onScroll ------------------ wasScrolledToBottom: "+this.wasScrolledToBottom+", wasScrolledToBottom: "+this.context.getName(),event)
+}},onResize:function(event){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.onResize ------------------ wasScrolledToBottom: "+this.wasScrolledToBottom+", offsetHeight: "+this.panelNode.offsetHeight+", scrollTop: "+this.panelNode.scrollTop+", scrollHeight: "+this.panelNode.scrollHeight+", "+this.context.getName(),event)
+}if(this.wasScrolledToBottom){scrollToBottom(this.panelNode)
+}}});
+function parseFormat(format){var parts=[];
+if(format.length<=0){return parts
+}var reg=/((^%|.%)(\d+)?(\.)([a-zA-Z]))|((^%|.%)([a-zA-Z]))/;
+for(var m=reg.exec(format);
+m;
+m=reg.exec(format)){if(m[0].substr(0,2)=="%%"){parts.push(format.substr(0,m.index));
+parts.push(m[0].substr(1))
+}else{var type=m[8]?m[8]:m[5];
+var precision=m[3]?parseInt(m[3]):(m[4]=="."?-1:0);
+var rep=null;
+switch(type){case"s":rep=FirebugReps.Text;
+break;
+case"f":case"i":case"d":rep=FirebugReps.Number;
+break;
+case"o":rep=null;
+break
+}parts.push(format.substr(0,m[0][0]=="%"?m.index:m.index+1));
+parts.push({rep:rep,precision:precision,type:("%"+type)})
+}format=format.substr(m.index+m[0].length)
+}parts.push(format);
+return parts
+}var appendObject=Firebug.ConsolePanel.prototype.appendObject;
+var appendFormatted=Firebug.ConsolePanel.prototype.appendFormatted;
+var appendOpenGroup=Firebug.ConsolePanel.prototype.appendOpenGroup;
+var appendCloseGroup=Firebug.ConsolePanel.prototype.appendCloseGroup;
+Firebug.registerModule(Firebug.Console);
+Firebug.registerPanel(Firebug.ConsolePanel)
+}});
+FBL.ns(function(){with(FBL){var frameCounters={};
+Firebug.Console.injector={install:function(context){var win=context.window;
+var consoleHandler=new FirebugConsoleHandler(context,win);
+var properties=["log","debug","info","warn","error","assert","dir","dirxml","group","groupCollapsed","groupEnd","time","timeEnd","count","trace","profile","profileEnd","clear","open","close"];
+var Handler=function(name){var c=consoleHandler;
+var f=consoleHandler[name];
+return function(){return f.apply(c,arguments)
+}
+};
+var installer=function(c){for(var i=0,l=properties.length;
+i<l;
+i++){var name=properties[i];
+c[name]=new Handler(name);
+c.firebuglite=Firebug.version
+}};
+var consoleNS=(!isFirefox||isFirefox&&!("console" in win))?"console":"firebug";
+var sandbox=new win.Function("arguments.callee.install(window."+consoleNS+"={})");
+sandbox.install=installer;
+sandbox()
+},isAttached:function(context,win){if(win.wrappedJSObject){var attached=(win.wrappedJSObject._getFirebugConsoleElement?true:false);
+if(FBTrace.DBG_CONSOLE){FBTrace.sysout("Console.isAttached:"+attached+" to win.wrappedJSObject "+safeGetWindowLocation(win.wrappedJSObject))
+}return attached
+}else{if(FBTrace.DBG_CONSOLE){FBTrace.sysout("Console.isAttached? to win "+win.location+" fnc:"+win._getFirebugConsoleElement)
+}return(win._getFirebugConsoleElement?true:false)
+}},attachIfNeeded:function(context,win){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("Console.attachIfNeeded has win "+(win?((win.wrappedJSObject?"YES":"NO")+" wrappedJSObject"):"null"))
+}if(this.isAttached(context,win)){return true
+}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("Console.attachIfNeeded found isAttached false ")
+}this.attachConsoleInjector(context,win);
+this.addConsoleListener(context,win);
+Firebug.Console.clearReloadWarning(context);
+var attached=this.isAttached(context,win);
+if(attached){dispatch(Firebug.Console.fbListeners,"onConsoleInjected",[context,win])
+}return attached
+},attachConsoleInjector:function(context,win){var consoleInjection=this.getConsoleInjectionScript();
+if(FBTrace.DBG_CONSOLE){FBTrace.sysout("attachConsoleInjector evaluating in "+win.location,consoleInjection)
+}Firebug.CommandLine.evaluateInWebPage(consoleInjection,context,win);
+if(FBTrace.DBG_CONSOLE){FBTrace.sysout("attachConsoleInjector evaluation completed for "+win.location)
+}},getConsoleInjectionScript:function(){if(!this.consoleInjectionScript){var script="";
+script+="window.__defineGetter__('console', function() {\n";
+script+=" return (window._firebug ? window._firebug : window.loadFirebugConsole()); })\n\n";
+script+="window.loadFirebugConsole = function() {\n";
+script+="window._firebug =  new _FirebugConsole();";
+if(FBTrace.DBG_CONSOLE){script+=" window.dump('loadFirebugConsole '+window.location+'\\n');\n"
+}script+=" return window._firebug };\n";
+var theFirebugConsoleScript=getResource("chrome://firebug/content/consoleInjected.js");
+script+=theFirebugConsoleScript;
+this.consoleInjectionScript=script
+}return this.consoleInjectionScript
+},forceConsoleCompilationInPage:function(context,win){if(!win){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("no win in forceConsoleCompilationInPage!")
+}return
+}var consoleForcer="window.loadFirebugConsole();";
+if(context.stopped){Firebug.Console.injector.evaluateConsoleScript(context)
+}else{Firebug.CommandLine.evaluateInWebPage(consoleForcer,context,win)
+}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("forceConsoleCompilationInPage "+win.location,consoleForcer)
+}},evaluateConsoleScript:function(context){var scriptSource=this.getConsoleInjectionScript();
+Firebug.Debugger.evaluate(scriptSource,context)
+},addConsoleListener:function(context,win){if(!context.activeConsoleHandlers){context.activeConsoleHandlers=[]
+}else{for(var i=0;
+i<context.activeConsoleHandlers.length;
+i++){if(context.activeConsoleHandlers[i].window==win){context.activeConsoleHandlers[i].detach();
+if(FBTrace.DBG_CONSOLE){FBTrace.sysout("consoleInjector addConsoleListener removed handler("+context.activeConsoleHandlers[i].handler_name+") from _firebugConsole in : "+win.location+"\n")
+}context.activeConsoleHandlers.splice(i,1)
+}}}var element=Firebug.Console.getFirebugConsoleElement(context,win);
+if(element){element.setAttribute("FirebugVersion",Firebug.version)
+}else{return false
+}var handler=new FirebugConsoleHandler(context,win);
+handler.attachTo(element);
+context.activeConsoleHandlers.push(handler);
+if(FBTrace.DBG_CONSOLE){FBTrace.sysout("consoleInjector addConsoleListener attached handler("+handler.handler_name+") to _firebugConsole in : "+win.location+"\n")
+}return true
+},detachConsole:function(context,win){if(win&&win.document){var element=win.document.getElementById("_firebugConsole");
+if(element){element.parentNode.removeChild(element)
+}}}};
+var total_handlers=0;
+var FirebugConsoleHandler=function FirebugConsoleHandler(context,win){this.window=win;
+this.attachTo=function(element){this.element=element;
+this.boundHandler=bind(this.handleEvent,this);
+this.element.addEventListener("firebugAppendConsole",this.boundHandler,true)
+};
+this.detach=function(){this.element.removeEventListener("firebugAppendConsole",this.boundHandler,true)
+};
+this.handler_name=++total_handlers;
+this.handleEvent=function(event){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("FirebugConsoleHandler("+this.handler_name+") "+event.target.getAttribute("methodName")+", event",event)
+}if(!Firebug.CommandLine.CommandHandler.handle(event,this,win)){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("FirebugConsoleHandler",this)
+}var methodName=event.target.getAttribute("methodName");
+Firebug.Console.log($STRF("console.MethodNotSupported",[methodName]))
+}};
+this.firebuglite=Firebug.version;
+this.init=function(){var consoleElement=win.document.getElementById("_firebugConsole");
+consoleElement.setAttribute("FirebugVersion",Firebug.version)
+};
+this.log=function(){logFormatted(arguments,"log")
+};
+this.debug=function(){logFormatted(arguments,"debug",true)
+};
+this.info=function(){logFormatted(arguments,"info",true)
+};
+this.warn=function(){logFormatted(arguments,"warn",true)
+};
+this.error=function(){logFormatted(arguments,"error",true)
+};
+this.exception=function(){logAssert("error",arguments)
+};
+this.assert=function(x){if(!x){var rest=[];
+for(var i=1;
+i<arguments.length;
+i++){rest.push(arguments[i])
+}logAssert("assert",rest)
+}};
+this.dir=function(o){Firebug.Console.log(o,context,"dir",Firebug.DOMPanel.DirTable)
+};
+this.dirxml=function(o){if(instanceOf(o,"Window")){o=o.document.documentElement
+}else{if(instanceOf(o,"Document")){o=o.documentElement
+}}var div=Firebug.Console.log(o,context,"dirxml");
+var html=[];
+Firebug.Reps.appendNode(o,html);
+div.innerHTML=html.join("")
+};
+this.group=function(){var sourceLink=null;
+Firebug.Console.openGroup(arguments,null,"group",null,false,sourceLink)
+};
+this.groupEnd=function(){Firebug.Console.closeGroup(context)
+};
+this.groupCollapsed=function(){var sourceLink=getStackLink();
+var row=Firebug.Console.openGroup(arguments,null,"group",null,true,sourceLink);
+removeClass(row,"opened")
+};
+this.profile=function(title){logFormatted(["console.profile() not supported."],"warn",true)
+};
+this.profileEnd=function(){logFormatted(["console.profile() not supported."],"warn",true)
+};
+this.count=function(key){var frameId="0";
+if(frameId){if(!frameCounters){frameCounters={}
+}if(key!=undefined){frameId+=key
+}var frameCounter=frameCounters[frameId];
+if(!frameCounter){var logRow=logFormatted(["0"],null,true,true);
+frameCounter={logRow:logRow,count:1};
+frameCounters[frameId]=frameCounter
+}else{++frameCounter.count
+}var label=key==undefined?frameCounter.count:key+" "+frameCounter.count;
+frameCounter.logRow.firstChild.firstChild.nodeValue=label
+}};
+this.trace=function(){var getFuncName=function getFuncName(f){if(f.getName instanceof Function){return f.getName()
+}if(f.name){return f.name
+}var name=f.toString().match(/function\s*([_$\w\d]*)/)[1];
+return name||"anonymous"
+};
+var wasVisited=function(fn){for(var i=0,l=frames.length;
+i<l;
+i++){if(frames[i].fn==fn){return true
+}}return false
+};
+var frames=[];
+for(var fn=arguments.callee.caller.caller;
+fn;
+fn=fn.caller){if(wasVisited(fn)){break
+}var args=[];
+for(var i=0,l=fn.arguments.length;
+i<l;
+++i){args.push({value:fn.arguments[i]})
+}frames.push({fn:fn,name:getFuncName(fn),args:args})
+}try{(0)()
+}catch(e){var result=e;
+var stack=result.stack||result.stacktrace||"";
+stack=stack.replace(/\n\r|\r\n/g,"\n");
+var items=stack.split(/[\n\r]/);
+if(FBL.isSafari){var reChromeStackItem=/^\s+at\s+(.*)((?:http|https|ftp|file):\/\/.*)$/;
+var reChromeStackItemName=/\s*\($/;
+var reChromeStackItemValue=/^(.+)\:(\d+\:\d+)\)?$/;
+var framePos=0;
+for(var i=4,length=items.length;
+i<length;
+i++,framePos++){var frame=frames[framePos];
+var item=items[i];
+var match=item.match(reChromeStackItem);
+if(match){var name=match[1];
+if(name){name=name.replace(reChromeStackItemName,"");
+frame.name=name
+}var value=match[2].match(reChromeStackItemValue);
+if(value){frame.href=value[1];
+frame.lineNo=value[2]
+}}}}else{if(FBL.isFirefox){var reFirefoxStackItem=/^(.*)@(.*)$/;
+var reFirefoxStackItemValue=/^(.+)\:(\d+)$/;
+var framePos=0;
+for(var i=2,length=items.length;
+i<length;
+i++,framePos++){var frame=frames[framePos]||{};
+var item=items[i];
+var match=item.match(reFirefoxStackItem);
+if(match){var name=match[1];
+var value=match[2].match(reFirefoxStackItemValue);
+if(value){frame.href=value[1];
+frame.lineNo=value[2]
+}}}}}}Firebug.Console.log({frames:frames},context,"stackTrace",FirebugReps.StackTrace)
+};
+this.trace_ok=function(){var getFuncName=function getFuncName(f){if(f.getName instanceof Function){return f.getName()
+}if(f.name){return f.name
+}var name=f.toString().match(/function\s*([_$\w\d]*)/)[1];
+return name||"anonymous"
+};
+var wasVisited=function(fn){for(var i=0,l=frames.length;
+i<l;
+i++){if(frames[i].fn==fn){return true
+}}return false
+};
+var frames=[];
+for(var fn=arguments.callee.caller;
+fn;
+fn=fn.caller){if(wasVisited(fn)){break
+}var args=[];
+for(var i=0,l=fn.arguments.length;
+i<l;
+++i){args.push({value:fn.arguments[i]})
+}frames.push({fn:fn,name:getFuncName(fn),args:args})
+}Firebug.Console.log({frames:frames},context,"stackTrace",FirebugReps.StackTrace)
+};
+this.clear=function(){Firebug.Console.clear(context)
+};
+this.time=function(name,reset){if(!name){return
+}var time=new Date().getTime();
+if(!this.timeCounters){this.timeCounters={}
+}var key="KEY"+name.toString();
+if(!reset&&this.timeCounters[key]){return
+}this.timeCounters[key]=time
+};
+this.timeEnd=function(name){var time=new Date().getTime();
+if(!this.timeCounters){return
+}var key="KEY"+name.toString();
+var timeCounter=this.timeCounters[key];
+if(timeCounter){var diff=time-timeCounter;
+var label=name+": "+diff+"ms";
+this.info(label);
+delete this.timeCounters[key]
+}return diff
+};
+this.evaluated=function(result,context){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("consoleInjector.FirebugConsoleHandler evalutated default called",result)
+}Firebug.Console.log(result,context)
+};
+this.evaluateError=function(result,context){Firebug.Console.log(result,context,"errorMessage")
+};
+function logFormatted(args,className,linkToSource,noThrottle){var sourceLink=linkToSource?getStackLink():null;
+return Firebug.Console.logFormatted(args,context,className,noThrottle,sourceLink)
+}function logAssert(category,args){Firebug.Errors.increaseCount(context);
+if(!args||!args.length||args.length==0){var msg=[FBL.$STR("Assertion")]
+}else{var msg=args[0]
+}if(Firebug.errorStackTrace){var trace=Firebug.errorStackTrace;
+delete Firebug.errorStackTrace;
+if(FBTrace.DBG_CONSOLE){FBTrace.sysout("logAssert trace from errorStackTrace",trace)
+}}else{if(msg.stack){var trace=parseToStackTrace(msg.stack);
+if(FBTrace.DBG_CONSOLE){FBTrace.sysout("logAssert trace from msg.stack",trace)
+}}else{var trace=getJSDUserStack();
+if(FBTrace.DBG_CONSOLE){FBTrace.sysout("logAssert trace from getJSDUserStack",trace)
+}}}var errorObject=new FBL.ErrorMessage(msg,(msg.fileName?msg.fileName:win.location),(msg.lineNumber?msg.lineNumber:0),"",category,context,trace);
+if(trace&&trace.frames&&trace.frames[0]){errorObject.correctWithStackTrace(trace)
+}errorObject.resetSource();
+var objects=errorObject;
+if(args.length>1){objects=[errorObject];
+for(var i=1;
+i<args.length;
+i++){objects.push(args[i])
+}}var row=Firebug.Console.log(objects,context,"errorMessage",null,true);
+row.scrollIntoView()
+}function getComponentsStackDump(){var frame=Components.stack;
+var userURL=win.location.href.toString();
+if(FBTrace.DBG_CONSOLE){FBTrace.sysout("consoleInjector.getComponentsStackDump initial stack for userURL "+userURL,frame)
+}while(frame&&FBL.isSystemURL(frame.filename)){frame=frame.caller
+}if(frame){frame=frame.caller
+}if(frame){frame=frame.caller
+}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("consoleInjector.getComponentsStackDump final stack for userURL "+userURL,frame)
+}return frame
+}function getStackLink(){return
+}function getJSDUserStack(){var trace=FBL.getCurrentStackTrace(context);
+var frames=trace?trace.frames:null;
+if(frames&&(frames.length>0)){var oldest=frames.length-1;
+for(var i=0;
+i<frames.length;
+i++){if(frames[oldest-i].href.indexOf("chrome:")==0){break
+}var fn=frames[oldest-i].fn+"";
+if(fn&&(fn.indexOf("_firebugEvalEvent")!=-1)){break
+}}FBTrace.sysout("consoleInjector getJSDUserStack: "+frames.length+" oldest: "+oldest+" i: "+i+" i - oldest + 2: "+(i-oldest+2),trace);
+trace.frames=trace.frames.slice(2-i);
+return trace
+}else{return"Firebug failed to get stack trace with any frames"
+}}};
+FBL.registerConsole=function(){var win=Env.browser.window;
+Firebug.Console.injector.install(win)
+};
+registerConsole()
+}});
+FBL.ns(function(){with(FBL){var commandPrefix=">>>";
+var reOpenBracket=/[\[\(\{]/;
+var reCloseBracket=/[\]\)\}]/;
+var commandHistory=[];
+var commandPointer=-1;
+var isAutoCompleting=null;
+var autoCompletePrefix=null;
+var autoCompleteExpr=null;
+var autoCompleteBuffer=null;
+var autoCompletePosition=null;
+var fbCommandLine=null;
+var fbLargeCommandLine=null;
+var fbLargeCommandButtons=null;
+var _completion={window:["console"],document:["getElementById","getElementsByTagName"]};
+var _stack=function(command){commandHistory.push(command);
+commandPointer=commandHistory.length
+};
+Firebug.CommandLine=extend(Firebug.Module,{element:null,isMultiLine:false,isActive:false,initialize:function(doc){this.clear=bind(this.clear,this);
+this.enter=bind(this.enter,this);
+this.onError=bind(this.onError,this);
+this.onKeyDown=bind(this.onKeyDown,this);
+this.onMultiLineKeyDown=bind(this.onMultiLineKeyDown,this);
+addEvent(Firebug.browser.window,"error",this.onError);
+addEvent(Firebug.chrome.window,"error",this.onError)
+},shutdown:function(doc){this.deactivate();
+removeEvent(Firebug.browser.window,"error",this.onError);
+removeEvent(Firebug.chrome.window,"error",this.onError)
+},activate:function(multiLine,hideToggleIcon,onRun){defineCommandLineAPI();
+if(this.isActive){if(this.isMultiLine==multiLine){return
+}this.deactivate()
+}fbCommandLine=$("fbCommandLine");
+fbLargeCommandLine=$("fbLargeCommandLine");
+fbLargeCommandButtons=$("fbLargeCommandButtons");
+if(multiLine){onRun=onRun||this.enter;
+this.isMultiLine=true;
+this.element=fbLargeCommandLine;
+addEvent(this.element,"keydown",this.onMultiLineKeyDown);
+addEvent($("fbSmallCommandLineIcon"),"click",Firebug.chrome.hideLargeCommandLine);
+this.runButton=new Button({element:$("fbCommand_btRun"),owner:Firebug.CommandLine,onClick:onRun});
+this.runButton.initialize();
+this.clearButton=new Button({element:$("fbCommand_btClear"),owner:Firebug.CommandLine,onClick:this.clear});
+this.clearButton.initialize()
+}else{this.isMultiLine=false;
+this.element=fbCommandLine;
+if(!fbCommandLine){return
+}addEvent(this.element,"keydown",this.onKeyDown)
+}if(isOpera){fixOperaTabKey(this.element)
+}if(this.lastValue){this.element.value=this.lastValue
+}this.isActive=true
+},deactivate:function(){if(!this.isActive){return
+}this.isActive=false;
+this.lastValue=this.element.value;
+if(this.isMultiLine){removeEvent(this.element,"keydown",this.onMultiLineKeyDown);
+removeEvent($("fbSmallCommandLineIcon"),"click",Firebug.chrome.hideLargeCommandLine);
+this.runButton.destroy();
+this.clearButton.destroy()
+}else{removeEvent(this.element,"keydown",this.onKeyDown)
+}this.element=null;
+delete this.element;
+fbCommandLine=null;
+fbLargeCommandLine=null;
+fbLargeCommandButtons=null
+},focus:function(){this.element.focus()
+},blur:function(){this.element.blur()
+},clear:function(){this.element.value=""
+},evaluate:function(expr){var api="Firebug.CommandLine.API";
+var result=Firebug.context.evaluate(expr,"window",api,Firebug.Console.error);
+return result
+},enter:function(){var command=this.element.value;
+if(!command){return
+}_stack(command);
+Firebug.Console.log(commandPrefix+" "+stripNewLines(command),Firebug.browser,"command",FirebugReps.Text);
+var result=this.evaluate(command);
+Firebug.Console.log(result)
+},prevCommand:function(){if(commandPointer>0&&commandHistory.length>0){this.element.value=commandHistory[--commandPointer]
+}},nextCommand:function(){var element=this.element;
+var limit=commandHistory.length-1;
+var i=commandPointer;
+if(i<limit){element.value=commandHistory[++commandPointer]
+}else{if(i==limit){++commandPointer;
+element.value=""
+}}},autocomplete:function(reverse){var element=this.element;
+var command=element.value;
+var offset=getExpressionOffset(command);
+var valBegin=offset?command.substr(0,offset):"";
+var val=command.substr(offset);
+var buffer,obj,objName,commandBegin,result,prefix;
+if(!isAutoCompleting){var reObj=/(.*[^_$\w\d\.])?((?:[_$\w][_$\w\d]*\.)*)([_$\w][_$\w\d]*)?$/;
+var r=reObj.exec(val);
+if(r[1]||r[2]||r[3]){commandBegin=r[1]||"";
+objName=r[2]||"";
+prefix=r[3]||""
+}else{if(val==""){commandBegin=objName=prefix=""
+}else{return
+}}isAutoCompleting=true;
+if(objName==""){obj=window
+}else{objName=objName.replace(/\.$/,"");
+var n=objName.split(".");
+var target=window,o;
+for(var i=0,ni;
+ni=n[i];
+i++){if(o=target[ni]){target=o
+}else{target=null;
+break
+}}obj=target
+}if(obj){autoCompletePrefix=prefix;
+autoCompleteExpr=valBegin+commandBegin+(objName?objName+".":"");
+autoCompletePosition=-1;
+buffer=autoCompleteBuffer=isIE?_completion[objName||"window"]||[]:[];
+for(var p in obj){buffer.push(p)
+}}}else{buffer=autoCompleteBuffer
+}if(buffer){prefix=autoCompletePrefix;
+var diff=reverse?-1:1;
+for(var i=autoCompletePosition+diff,l=buffer.length,bi;
+i>=0&&i<l;
+i+=diff){bi=buffer[i];
+if(bi.indexOf(prefix)==0){autoCompletePosition=i;
+result=bi;
+break
+}}}if(result){element.value=autoCompleteExpr+result
+}},setMultiLine:function(multiLine){if(multiLine==this.isMultiLine){return
+}this.activate(multiLine)
+},onError:function(msg,href,lineNo){var html=[];
+var lastSlash=href.lastIndexOf("/");
+var fileName=lastSlash==-1?href:href.substr(lastSlash+1);
+html.push('<span class="errorMessage">',msg,"</span>",'<div class="objectBox-sourceLink">',fileName," (line ",lineNo,")</div>");
+Firebug.Console.writeRow(html,"error")
+},onKeyDown:function(e){e=e||event;
+var code=e.keyCode;
+if(code!=9&&code!=16&&code!=17&&code!=18){isAutoCompleting=false
+}if(code==13){this.enter();
+this.clear()
+}else{if(code==27){setTimeout(this.clear,0)
+}else{if(code==38){this.prevCommand()
+}else{if(code==40){this.nextCommand()
+}else{if(code==9){this.autocomplete(e.shiftKey)
+}else{return
+}}}}}cancelEvent(e,true);
+return false
+},onMultiLineKeyDown:function(e){e=e||event;
+var code=e.keyCode;
+if(code==13&&e.ctrlKey){this.enter()
+}}});
+Firebug.registerModule(Firebug.CommandLine);
+function getExpressionOffset(command){var bracketCount=0;
+var start=command.length-1;
+for(;
+start>=0;
+--start){var c=command[start];
+if((c==","||c==";"||c==" ")&&!bracketCount){break
+}if(reOpenBracket.test(c)){if(bracketCount){--bracketCount
+}else{break
+}}else{if(reCloseBracket.test(c)){++bracketCount
+}}}return start+1
+}var CommandLineAPI={$:function(id){return Firebug.browser.document.getElementById(id)
+},$$:function(selector,context){context=context||Firebug.browser.document;
+return Firebug.Selector?Firebug.Selector(selector,context):Firebug.Console.error("Firebug.Selector module not loaded.")
+},$0:null,$1:null,dir:function(o){Firebug.Console.log(o,Firebug.context,"dir",Firebug.DOMPanel.DirTable)
+},dirxml:function(o){if(instanceOf(o,"Window")){o=o.document.documentElement
+}else{if(instanceOf(o,"Document")){o=o.documentElement
+}}var div=Firebug.Console.log(o,Firebug.context,"dirxml");
+var html=[];
+Firebug.Reps.appendNode(o,html);
+div.innerHTML=html.join("")
+}};
+var defineCommandLineAPI=function defineCommandLineAPI(){Firebug.CommandLine.API={};
+for(var m in CommandLineAPI){if(!Env.browser.window[m]){Firebug.CommandLine.API[m]=CommandLineAPI[m]
+}}var stack=FirebugChrome.htmlSelectionStack;
+if(stack){Firebug.CommandLine.API.$0=stack[0];
+Firebug.CommandLine.API.$1=stack[1]
+}}
+}});
+(function(){with(FBL){var XHRSpy=function(){this.requestHeaders=[];
+this.responseHeaders=[]
+};
+XHRSpy.prototype={method:null,url:null,async:null,xhrRequest:null,href:null,loaded:false,logRow:null,responseText:null,requestHeaders:null,responseHeaders:null,sourceLink:null,getURL:function(){return this.href
+}};
+var XMLHttpRequestWrapper=function(activeXObject){var xhrRequest=typeof activeXObject!="undefined"?activeXObject:new _XMLHttpRequest(),spy=new XHRSpy(),self=this,reqType,reqUrl,reqStartTS;
+var updateSelfPropertiesIgnore={abort:1,channel:1,getInterface:1,mozBackgroundRequest:1,multipart:1,onreadystatechange:1,open:1,send:1,setRequestHeader:1};
+var updateSelfProperties=function(){for(var propName in xhrRequest){if(propName in updateSelfPropertiesIgnore){continue
+}try{var propValue=xhrRequest[propName];
+if(propValue&&!isFunction(propValue)){self[propName]=propValue
+}}catch(E){}}};
+var updateXHRPropertiesIgnore={channel:1,onreadystatechange:1,readyState:1,responseBody:1,responseText:1,responseXML:1,status:1,statusText:1,upload:1};
+var updateXHRProperties=function(){for(var propName in self){try{if(propName in updateXHRPropertiesIgnore){continue
+}var propValue=self[propName];
+if(propValue&&!xhrRequest[propName]){xhrRequest[propName]=propValue
+}}catch(E){}}};
+var logXHR=function(){var row=Firebug.Console.log(spy,null,"spy",Firebug.Spy.XHR);
+if(row){setClass(row,"loading");
+spy.logRow=row
+}};
+var finishXHR=function(){var duration=new Date().getTime()-reqStartTS;
+var success=xhrRequest.status==200;
+var responseHeadersText=xhrRequest.getAllResponseHeaders();
+var responses=responseHeadersText?responseHeadersText.split(/[\n\r]/):[];
+var reHeader=/^(\S+):\s*(.*)/;
+for(var i=0,l=responses.length;
+i<l;
+i++){var text=responses[i];
+var match=text.match(reHeader);
+if(match){var name=match[1];
+var value=match[2];
+if(name=="Content-Type"){spy.mimeType=value
+}spy.responseHeaders.push({name:[name],value:[value]})
+}}with({row:spy.logRow,status:xhrRequest.status+" "+xhrRequest.statusText,time:duration,success:success}){setTimeout(function(){spy.responseText=xhrRequest.responseText;
+row=row||spy.logRow;
+if(!row){return
+}handleRequestStatus(success,status,time)
+},200)
+}spy.loaded=true;
+updateSelfProperties()
+};
+var handleStateChange=function(){self.readyState=xhrRequest.readyState;
+if(xhrRequest.readyState==4){finishXHR();
+xhrRequest.onreadystatechange=function(){}
+}self.onreadystatechange()
+};
+var handleRequestStatus=function(success,status,time){var row=spy.logRow;
+FBL.removeClass(row,"loading");
+if(!success){FBL.setClass(row,"error")
+}var item=FBL.$$(".spyStatus",row)[0];
+item.innerHTML=status;
+if(time){var item=FBL.$$(".spyTime",row)[0];
+item.innerHTML=time+"ms"
+}};
+this.readyState=0;
+this.onreadystatechange=function(){};
+this.open=function(method,url,async,user,password){updateSelfProperties();
+if(spy.loaded){spy=new XHRSpy()
+}spy.method=method;
+spy.url=url;
+spy.async=async;
+spy.href=url;
+spy.xhrRequest=xhrRequest;
+spy.urlParams=parseURLParamsArray(url);
+if(!FBL.isIE&&async){xhrRequest.onreadystatechange=handleStateChange
+}if(supportsApply){xhrRequest.open.apply(xhrRequest,arguments)
+}else{xhrRequest.open(method,url,async,user,password)
+}if(FBL.isIE&&async){xhrRequest.onreadystatechange=handleStateChange
+}};
+this.send=function(data){spy.data=data;
+reqStartTS=new Date().getTime();
+updateXHRProperties();
+try{xhrRequest.send(data)
+}catch(e){throw e
+}finally{logXHR();
+if(!spy.async){self.readyState=xhrRequest.readyState;
+finishXHR()
+}}};
+this.setRequestHeader=function(header,value){spy.requestHeaders.push({name:[header],value:[value]});
+return xhrRequest.setRequestHeader(header,value)
+};
+this.abort=function(){xhrRequest.abort();
+updateSelfProperties();
+handleRequestStatus(false,"Aborted")
+};
+var supportsApply=!isIE6&&xhrRequest&&xhrRequest.open&&typeof xhrRequest.open.apply!="undefined";
+for(var propName in xhrRequest){if(propName in updateSelfPropertiesIgnore){continue
+}try{var propValue=xhrRequest[propName];
+if(isFunction(propValue)){if(typeof self[propName]=="undefined"){this[propName]=(function(name,xhr){return supportsApply?function(){return xhr[name].apply(xhr,arguments)
+}:function(a,b,c,d,e){return xhr[name](a,b,c,d,e)
+}
+})(propName,xhrRequest)
+}}else{this[propName]=propValue
+}}catch(E){}}return this
+};
+var _ActiveXObject;
+var isIE6=/msie 6/i.test(navigator.appVersion);
+if(isIE6){_ActiveXObject=window.ActiveXObject;
+var xhrObjects=" MSXML2.XMLHTTP.5.0 MSXML2.XMLHTTP.4.0 MSXML2.XMLHTTP.3.0 MSXML2.XMLHTTP Microsoft.XMLHTTP ";
+window.ActiveXObject=function(name){var error=null;
+try{var activeXObject=new _ActiveXObject(name)
+}catch(e){error=e
+}finally{if(!error){if(xhrObjects.indexOf(" "+name+" ")!=-1){return new XMLHttpRequestWrapper(activeXObject)
+}else{return activeXObject
+}}else{throw error.message
+}}}
+}if(!isIE6){var _XMLHttpRequest=XMLHttpRequest;
+window.XMLHttpRequest=function(){return new XMLHttpRequestWrapper()
+}
+}}})();
+FBL.ns(function(){with(FBL){var reIgnore=/about:|javascript:|resource:|chrome:|jar:/;
+var layoutInterval=300;
+var indentWidth=18;
+var cacheSession=null;
+var contexts=new Array();
+var panelName="net";
+var maxQueueRequests=500;
+var activeRequests=[];
+var mimeExtensionMap={txt:"text/plain",html:"text/html",htm:"text/html",xhtml:"text/html",xml:"text/xml",css:"text/css",js:"application/x-javascript",jss:"application/x-javascript",jpg:"image/jpg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",bmp:"image/bmp",swf:"application/x-shockwave-flash",flv:"video/x-flv"};
+var fileCategories={"undefined":1,html:1,css:1,js:1,xhr:1,image:1,flash:1,txt:1,bin:1};
+var textFileCategories={txt:1,html:1,xhr:1,css:1,js:1};
+var binaryFileCategories={bin:1,flash:1};
+var mimeCategoryMap={"text/plain":"txt","application/octet-stream":"bin","text/html":"html","text/xml":"html","text/css":"css","application/x-javascript":"js","text/javascript":"js","application/javascript":"js","image/jpeg":"image","image/jpg":"image","image/gif":"image","image/png":"image","image/bmp":"image","application/x-shockwave-flash":"flash","video/x-flv":"flash"};
+var binaryCategoryMap={image:1,flash:1};
+Firebug.NetMonitor=extend(Firebug.ActivableModule,{dispatchName:"netMonitor",clear:function(context){var panel=context.getPanel(panelName,true);
+if(panel){panel.clear()
+}},initialize:function(){return;
+this.panelName=panelName;
+Firebug.ActivableModule.initialize.apply(this,arguments);
+if(Firebug.TraceModule){Firebug.TraceModule.addListener(this.TraceListener)
+}NetHttpObserver.registerObserver();
+NetHttpActivityObserver.registerObserver();
+Firebug.Debugger.addListener(this.DebuggerListener)
+},shutdown:function(){return;
+prefs.removeObserver(Firebug.prefDomain,this,false);
+if(Firebug.TraceModule){Firebug.TraceModule.removeListener(this.TraceListener)
+}NetHttpObserver.unregisterObserver();
+NetHttpActivityObserver.unregisterObserver();
+Firebug.Debugger.removeListener(this.DebuggerListener)
+}});
+Firebug.NetMonitor.NetInfoBody=domplate(Firebug.Rep,new Firebug.Listener(),{tag:DIV({"class":"netInfoBody",_repObject:"$file"},TAG("$infoTabs",{file:"$file"}),TAG("$infoBodies",{file:"$file"})),infoTabs:DIV({"class":"netInfoTabs focusRow subFocusRow",role:"tablist"},A({"class":"netInfoParamsTab netInfoTab a11yFocus",onclick:"$onClickTab",role:"tab",view:"Params",$collapsed:"$file|hideParams"},$STR("URLParameters")),A({"class":"netInfoHeadersTab netInfoTab a11yFocus",onclick:"$onClickTab",role:"tab",view:"Headers"},$STR("Headers")),A({"class":"netInfoPostTab netInfoTab a11yFocus",onclick:"$onClickTab",role:"tab",view:"Post",$collapsed:"$file|hidePost"},$STR("Post")),A({"class":"netInfoPutTab netInfoTab a11yFocus",onclick:"$onClickTab",role:"tab",view:"Put",$collapsed:"$file|hidePut"},$STR("Put")),A({"class":"netInfoResponseTab netInfoTab a11yFocus",onclick:"$onClickTab",role:"tab",view:"Response",$collapsed:"$file|hideResponse"},$STR("Response")),A({"class":"netInfoCacheTab netInfoTab a11yFocus",onclick:"$onClickTab",role:"tab",view:"Cache",$collapsed:"$file|hideCache"},$STR("Cache")),A({"class":"netInfoHtmlTab netInfoTab a11yFocus",onclick:"$onClickTab",role:"tab",view:"Html",$collapsed:"$file|hideHtml"},$STR("HTML"))),infoBodies:DIV({"class":"netInfoBodies outerFocusRow"},TABLE({"class":"netInfoParamsText netInfoText netInfoParamsTable",role:"tabpanel",cellpadding:0,cellspacing:0},TBODY()),DIV({"class":"netInfoHeadersText netInfoText",role:"tabpanel"}),DIV({"class":"netInfoPostText netInfoText",role:"tabpanel"}),DIV({"class":"netInfoPutText netInfoText",role:"tabpanel"}),PRE({"class":"netInfoResponseText netInfoText",role:"tabpanel"}),DIV({"class":"netInfoCacheText netInfoText",role:"tabpanel"},TABLE({"class":"netInfoCacheTable",cellpadding:0,cellspacing:0,role:"presentation"},TBODY({role:"list","aria-label":$STR("Cache")}))),DIV({"class":"netInfoHtmlText netInfoText",role:"tabpanel"},IFRAME({"class":"netInfoHtmlPreview",role:"document"}))),headerDataTag:FOR("param","$headers",TR({role:"listitem"},TD({"class":"netInfoParamName",role:"presentation"},TAG("$param|getNameTag",{param:"$param"})),TD({"class":"netInfoParamValue",role:"list","aria-label":"$param.name"},FOR("line","$param|getParamValueIterator",CODE({"class":"focusRow subFocusRow",role:"listitem"},"$line"))))),customTab:A({"class":"netInfo$tabId\\Tab netInfoTab",onclick:"$onClickTab",view:"$tabId",role:"tab"},"$tabTitle"),customBody:DIV({"class":"netInfo$tabId\\Text netInfoText",role:"tabpanel"}),nameTag:SPAN("$param|getParamName"),nameWithTooltipTag:SPAN({title:"$param.name"},"$param|getParamName"),getNameTag:function(param){return(this.getParamName(param)==param.name)?this.nameTag:this.nameWithTooltipTag
+},getParamName:function(param){var limit=25;
+var name=param.name;
+if(name.length>limit){name=name.substr(0,limit)+"..."
+}return name
+},getParamTitle:function(param){var limit=25;
+var name=param.name;
+if(name.length>limit){return name
+}return""
+},hideParams:function(file){return !file.urlParams||!file.urlParams.length
+},hidePost:function(file){return file.method.toUpperCase()!="POST"
+},hidePut:function(file){return file.method.toUpperCase()!="PUT"
+},hideResponse:function(file){return false
+},hideCache:function(file){return true;
+return !file.cacheEntry
+},hideHtml:function(file){return(file.mimeType!="text/html")&&(file.mimeType!="application/xhtml+xml")
+},onClickTab:function(event){this.selectTab(event.currentTarget||event.srcElement)
+},getParamValueIterator:function(param){return param.value;
+return wrapText(param.value,true)
+},appendTab:function(netInfoBox,tabId,tabTitle){var args={tabId:tabId,tabTitle:tabTitle};
+this.customTab.append(args,$$(".netInfoTabs",netInfoBox)[0]);
+this.customBody.append(args,$$(".netInfoBodies",netInfoBox)[0])
+},selectTabByName:function(netInfoBox,tabName){var tab=getChildByClass(netInfoBox,"netInfoTabs","netInfo"+tabName+"Tab");
+if(tab){this.selectTab(tab)
+}},selectTab:function(tab){var view=tab.getAttribute("view");
+var netInfoBox=getAncestorByClass(tab,"netInfoBody");
+var selectedTab=netInfoBox.selectedTab;
+if(selectedTab){removeClass(netInfoBox.selectedText,"netInfoTextSelected");
+removeClass(selectedTab,"netInfoTabSelected");
+selectedTab.setAttribute("aria-selected","false")
+}var textBodyName="netInfo"+view+"Text";
+selectedTab=netInfoBox.selectedTab=tab;
+netInfoBox.selectedText=$$("."+textBodyName,netInfoBox)[0];
+setClass(netInfoBox.selectedText,"netInfoTextSelected");
+setClass(selectedTab,"netInfoTabSelected");
+selectedTab.setAttribute("selected","true");
+selectedTab.setAttribute("aria-selected","true");
+var file=Firebug.getRepObject(netInfoBox);
+var context=Firebug.chrome;
+this.updateInfo(netInfoBox,file,context)
+},updateInfo:function(netInfoBox,file,context){if(FBTrace.DBG_NET){FBTrace.sysout("net.updateInfo; file",file)
+}if(!netInfoBox){if(FBTrace.DBG_NET||FBTrace.DBG_ERRORS){FBTrace.sysout("net.updateInfo; ERROR netInfo == null "+file.href,file)
+}return
+}var tab=netInfoBox.selectedTab;
+if(hasClass(tab,"netInfoParamsTab")){if(file.urlParams&&!netInfoBox.urlParamsPresented){netInfoBox.urlParamsPresented=true;
+this.insertHeaderRows(netInfoBox,file.urlParams,"Params")
+}}else{if(hasClass(tab,"netInfoHeadersTab")){var headersText=$$(".netInfoHeadersText",netInfoBox)[0];
+if(file.responseHeaders&&!netInfoBox.responseHeadersPresented){netInfoBox.responseHeadersPresented=true;
+NetInfoHeaders.renderHeaders(headersText,file.responseHeaders,"ResponseHeaders")
+}if(file.requestHeaders&&!netInfoBox.requestHeadersPresented){netInfoBox.requestHeadersPresented=true;
+NetInfoHeaders.renderHeaders(headersText,file.requestHeaders,"RequestHeaders")
+}}else{if(hasClass(tab,"netInfoPostTab")){if(!netInfoBox.postPresented){netInfoBox.postPresented=true;
+var postText=$$(".netInfoPostText",netInfoBox)[0];
+NetInfoPostData.render(context,postText,file)
+}}else{if(hasClass(tab,"netInfoPutTab")){if(!netInfoBox.putPresented){netInfoBox.putPresented=true;
+var putText=$$(".netInfoPutText",netInfoBox)[0];
+NetInfoPostData.render(context,putText,file)
+}}else{if(hasClass(tab,"netInfoResponseTab")&&file.loaded&&!netInfoBox.responsePresented){var responseTextBox=$$(".netInfoResponseText",netInfoBox)[0];
+if(file.category=="image"){netInfoBox.responsePresented=true;
+var responseImage=netInfoBox.ownerDocument.createElement("img");
+responseImage.src=file.href;
+clearNode(responseTextBox);
+responseTextBox.appendChild(responseImage,responseTextBox)
+}else{this.setResponseText(file,netInfoBox,responseTextBox,context)
+}}else{if(hasClass(tab,"netInfoCacheTab")&&file.loaded&&!netInfoBox.cachePresented){var responseTextBox=netInfoBox.getElementsByClassName("netInfoCacheText").item(0);
+if(file.cacheEntry){netInfoBox.cachePresented=true;
+this.insertHeaderRows(netInfoBox,file.cacheEntry,"Cache")
+}}else{if(hasClass(tab,"netInfoHtmlTab")&&file.loaded&&!netInfoBox.htmlPresented){netInfoBox.htmlPresented=true;
+var text=Utils.getResponseText(file,context);
+var iframe=$$(".netInfoHtmlPreview",netInfoBox)[0];
+var reScript=/<script(.|\s)*?\/script>/gi;
+text=text.replace(reScript,"");
+iframe.contentWindow.document.write(text);
+iframe.contentWindow.document.close()
+}}}}}}}dispatch(NetInfoBody.fbListeners,"updateTabBody",[netInfoBox,file,context])
+},setResponseText:function(file,netInfoBox,responseTextBox,context){netInfoBox.responsePresented=true;
+if(isIE){responseTextBox.style.whiteSpace="nowrap"
+}responseTextBox[typeof responseTextBox.textContent!="undefined"?"textContent":"innerText"]=file.responseText;
+return;
+var text=Utils.getResponseText(file,context);
+var limit=Firebug.netDisplayedResponseLimit+15;
+var limitReached=text?(text.length>limit):false;
+if(limitReached){text=text.substr(0,limit)+"..."
+}if(text){insertWrappedText(text,responseTextBox)
+}else{insertWrappedText("",responseTextBox)
+}if(limitReached){var object={text:$STR("net.responseSizeLimitMessage"),onClickLink:function(){var panel=context.getPanel("net",true);
+panel.openResponseInTab(file)
+}};
+Firebug.NetMonitor.ResponseSizeLimit.append(object,responseTextBox)
+}netInfoBox.responsePresented=true;
+if(FBTrace.DBG_NET){FBTrace.sysout("net.setResponseText; response text updated")
+}},insertHeaderRows:function(netInfoBox,headers,tableName,rowName){if(!headers.length){return
+}var headersTable=$$(".netInfo"+tableName+"Table",netInfoBox)[0];
+var tbody=getChildByClass(headersTable,"netInfo"+rowName+"Body");
+if(!tbody){tbody=headersTable.firstChild
+}var titleRow=getChildByClass(tbody,"netInfo"+rowName+"Title");
+this.headerDataTag.insertRows({headers:headers},titleRow?titleRow:tbody);
+removeClass(titleRow,"collapsed")
+}});
+var NetInfoBody=Firebug.NetMonitor.NetInfoBody;
+Firebug.NetMonitor.NetInfoHeaders=domplate(Firebug.Rep,{tag:DIV({"class":"netInfoHeadersTable",role:"tabpanel"},DIV({"class":"netInfoHeadersGroup netInfoResponseHeadersTitle"},SPAN($STR("ResponseHeaders")),SPAN({"class":"netHeadersViewSource response collapsed",onclick:"$onViewSource",_sourceDisplayed:false,_rowName:"ResponseHeaders"},$STR("net.headers.view source"))),TABLE({cellpadding:0,cellspacing:0},TBODY({"class":"netInfoResponseHeadersBody",role:"list","aria-label":$STR("ResponseHeaders")})),DIV({"class":"netInfoHeadersGroup netInfoRequestHeadersTitle"},SPAN($STR("RequestHeaders")),SPAN({"class":"netHeadersViewSource request collapsed",onclick:"$onViewSource",_sourceDisplayed:false,_rowName:"RequestHeaders"},$STR("net.headers.view source"))),TABLE({cellpadding:0,cellspacing:0},TBODY({"class":"netInfoRequestHeadersBody",role:"list","aria-label":$STR("RequestHeaders")}))),sourceTag:TR({role:"presentation"},TD({colspan:2,role:"presentation"},PRE({"class":"source"}))),onViewSource:function(event){var target=event.target;
+var requestHeaders=(target.rowName=="RequestHeaders");
+var netInfoBox=getAncestorByClass(target,"netInfoBody");
+var file=netInfoBox.repObject;
+if(target.sourceDisplayed){var headers=requestHeaders?file.requestHeaders:file.responseHeaders;
+this.insertHeaderRows(netInfoBox,headers,target.rowName);
+target.innerHTML=$STR("net.headers.view source")
+}else{var source=requestHeaders?file.requestHeadersText:file.responseHeadersText;
+this.insertSource(netInfoBox,source,target.rowName);
+target.innerHTML=$STR("net.headers.pretty print")
+}target.sourceDisplayed=!target.sourceDisplayed;
+cancelEvent(event)
+},insertSource:function(netInfoBox,source,rowName){var tbody=$$(".netInfo"+rowName+"Body",netInfoBox)[0];
+var node=this.sourceTag.replace({},tbody);
+var sourceNode=$$(".source",node)[0];
+sourceNode.innerHTML=source
+},insertHeaderRows:function(netInfoBox,headers,rowName){var headersTable=$$(".netInfoHeadersTable",netInfoBox)[0];
+var tbody=$$(".netInfo"+rowName+"Body",headersTable)[0];
+clearNode(tbody);
+if(!headers.length){return
+}NetInfoBody.headerDataTag.insertRows({headers:headers},tbody);
+var titleRow=getChildByClass(headersTable,"netInfo"+rowName+"Title");
+removeClass(titleRow,"collapsed")
+},init:function(parent){var rootNode=this.tag.append({},parent);
+var netInfoBox=getAncestorByClass(parent,"netInfoBody");
+var file=netInfoBox.repObject;
+var viewSource;
+viewSource=$$(".request",rootNode)[0];
+if(file.requestHeadersText){removeClass(viewSource,"collapsed")
+}viewSource=$$(".response",rootNode)[0];
+if(file.responseHeadersText){removeClass(viewSource,"collapsed")
+}},renderHeaders:function(parent,headers,rowName){if(!parent.firstChild){this.init(parent)
+}this.insertHeaderRows(parent,headers,rowName)
+}});
+var NetInfoHeaders=Firebug.NetMonitor.NetInfoHeaders;
+Firebug.NetMonitor.NetInfoPostData=domplate(Firebug.Rep,{paramsTable:TABLE({"class":"netInfoPostParamsTable",cellpadding:0,cellspacing:0,role:"presentation"},TBODY({role:"list","aria-label":$STR("net.label.Parameters")},TR({"class":"netInfoPostParamsTitle",role:"presentation"},TD({colspan:3,role:"presentation"},DIV({"class":"netInfoPostParams"},$STR("net.label.Parameters"),SPAN({"class":"netInfoPostContentType"},"application/x-www-form-urlencoded")))))),partsTable:TABLE({"class":"netInfoPostPartsTable",cellpadding:0,cellspacing:0,role:"presentation"},TBODY({role:"list","aria-label":$STR("net.label.Parts")},TR({"class":"netInfoPostPartsTitle",role:"presentation"},TD({colspan:2,role:"presentation"},DIV({"class":"netInfoPostParams"},$STR("net.label.Parts"),SPAN({"class":"netInfoPostContentType"},"multipart/form-data")))))),jsonTable:TABLE({"class":"netInfoPostJSONTable",cellpadding:0,cellspacing:0,role:"presentation"},TBODY({role:"list","aria-label":$STR("JSON")},TR({"class":"netInfoPostJSONTitle",role:"presentation"},TD({role:"presentation"},DIV({"class":"netInfoPostParams"},$STR("JSON")))),TR(TD({"class":"netInfoPostJSONBody"})))),xmlTable:TABLE({"class":"netInfoPostXMLTable",cellpadding:0,cellspacing:0,role:"presentation"},TBODY({role:"list","aria-label":$STR("xmlviewer.tab.XML")},TR({"class":"netInfoPostXMLTitle",role:"presentation"},TD({role:"presentation"},DIV({"class":"netInfoPostParams"},$STR("xmlviewer.tab.XML")))),TR(TD({"class":"netInfoPostXMLBody"})))),sourceTable:TABLE({"class":"netInfoPostSourceTable",cellpadding:0,cellspacing:0,role:"presentation"},TBODY({role:"list","aria-label":$STR("net.label.Source")},TR({"class":"netInfoPostSourceTitle",role:"presentation"},TD({colspan:2,role:"presentation"},DIV({"class":"netInfoPostSource"},$STR("net.label.Source")))))),sourceBodyTag:TR({role:"presentation"},TD({colspan:2,role:"presentation"},FOR("line","$param|getParamValueIterator",CODE({"class":"focusRow subFocusRow",role:"listitem"},"$line")))),getParamValueIterator:function(param){return NetInfoBody.getParamValueIterator(param)
+},render:function(context,parentNode,file){var spy=getAncestorByClass(parentNode,"spyHead");
+var spyObject=spy.repObject;
+var data=spyObject.data;
+var contentType=file.mimeType;
+if(contentType&&contentType=="application/x-www-form-urlencoded"||data&&data.indexOf("=")!=-1){var params=parseURLEncodedTextArray(data);
+if(params){this.insertParameters(parentNode,params)
+}}var jsonData={responseText:data};
+if(Firebug.JSONViewerModel.isJSON(contentType,data)){this.insertJSON(parentNode,jsonData,context)
+}var postText=data;
+if(postText){this.insertSource(parentNode,postText)
+}},insertParameters:function(parentNode,params){if(!params||!params.length){return
+}var paramTable=this.paramsTable.append({object:{}},parentNode);
+var row=$$(".netInfoPostParamsTitle",paramTable)[0];
+var tbody=paramTable.getElementsByTagName("tbody")[0];
+NetInfoBody.headerDataTag.insertRows({headers:params},row)
+},insertParts:function(parentNode,data){if(!data.params||!data.params.length){return
+}var partsTable=this.partsTable.append({object:{}},parentNode);
+var row=$$(".netInfoPostPartsTitle",paramTable)[0];
+NetInfoBody.headerDataTag.insertRows({headers:data.params},row)
+},insertJSON:function(parentNode,file,context){var text=file.responseText;
+var data=parseJSONString(text);
+if(!data){return
+}var jsonTable=this.jsonTable.append({},parentNode);
+var jsonBody=$$(".netInfoPostJSONBody",jsonTable)[0];
+if(!this.toggles){this.toggles={}
+}Firebug.DOMPanel.DirTable.tag.replace({object:data,toggles:this.toggles},jsonBody)
+},insertXML:function(parentNode,file,context){var text=Utils.getPostText(file,context);
+var jsonTable=this.xmlTable.append(null,parentNode);
+var jsonBody=$$(".netInfoPostXMLBody",jsonTable)[0];
+Firebug.XMLViewerModel.insertXML(jsonBody,text)
+},insertSource:function(parentNode,text){var sourceTable=this.sourceTable.append({object:{}},parentNode);
+var row=$$(".netInfoPostSourceTitle",sourceTable)[0];
+var param={value:[text]};
+this.sourceBodyTag.insertRows({param:param},row)
+},parseMultiPartText:function(file,context){var text=Utils.getPostText(file,context);
+if(text==undefined){return null
+}FBTrace.sysout("net.parseMultiPartText; boundary: ",text);
+var boundary=text.match(/\s*boundary=\s*(.*)/)[1];
+var divider="\r\n\r\n";
+var bodyStart=text.indexOf(divider);
+var body=text.substr(bodyStart+divider.length);
+var postData={};
+postData.mimeType="multipart/form-data";
+postData.params=[];
+var parts=body.split("--"+boundary);
+for(var i=0;
+i<parts.length;
+i++){var part=parts[i].split(divider);
+if(part.length!=2){continue
+}var m=part[0].match(/\s*name=\"(.*)\"(;|$)/);
+postData.params.push({name:(m&&m.length>1)?m[1]:"",value:trim(part[1])})
+}return postData
+}});
+var NetInfoPostData=Firebug.NetMonitor.NetInfoPostData;
+var $STRP=function(a){return a
+};
+Firebug.NetMonitor.NetLimit=domplate(Firebug.Rep,{collapsed:true,tableTag:DIV(TABLE({width:"100%",cellpadding:0,cellspacing:0},TBODY())),limitTag:TR({"class":"netRow netLimitRow",$collapsed:"$isCollapsed"},TD({"class":"netCol netLimitCol",colspan:6},TABLE({cellpadding:0,cellspacing:0},TBODY(TR(TD(SPAN({"class":"netLimitLabel"},$STRP("plural.Limit_Exceeded",[0]))),TD({style:"width:100%"}),TD(BUTTON({"class":"netLimitButton",title:"$limitPrefsTitle",onclick:"$onPreferences"},$STR("LimitPrefs"))),TD("&nbsp;")))))),isCollapsed:function(){return this.collapsed
+},onPreferences:function(event){openNewTab("about:config")
+},updateCounter:function(row){removeClass(row,"collapsed");
+var limitLabel=row.getElementsByClassName("netLimitLabel").item(0);
+limitLabel.firstChild.nodeValue=$STRP("plural.Limit_Exceeded",[row.limitInfo.totalCount])
+},createTable:function(parent,limitInfo){var table=this.tableTag.replace({},parent);
+var row=this.createRow(table.firstChild.firstChild,limitInfo);
+return[table,row]
+},createRow:function(parent,limitInfo){var row=this.limitTag.insertRows(limitInfo,parent,this)[0];
+row.limitInfo=limitInfo;
+return row
+},observe:function(subject,topic,data){if(topic!="nsPref:changed"){return
+}if(data.indexOf("net.logLimit")!=-1){this.updateMaxLimit()
+}},updateMaxLimit:function(){var value=Firebug.getPref(Firebug.prefDomain,"net.logLimit");
+maxQueueRequests=value?value:maxQueueRequests
+}});
+var NetLimit=Firebug.NetMonitor.NetLimit;
+Firebug.NetMonitor.ResponseSizeLimit=domplate(Firebug.Rep,{tag:DIV({"class":"netInfoResponseSizeLimit"},SPAN("$object.beforeLink"),A({"class":"objectLink",onclick:"$onClickLink"},"$object.linkText"),SPAN("$object.afterLink")),reLink:/^(.*)<a>(.*)<\/a>(.*$)/,append:function(obj,parent){var m=obj.text.match(this.reLink);
+return this.tag.append({onClickLink:obj.onClickLink,object:{beforeLink:m[1],linkText:m[2],afterLink:m[3]}},parent,this)
+}});
+Firebug.NetMonitor.Utils={findHeader:function(headers,name){if(!headers){return null
+}name=name.toLowerCase();
+for(var i=0;
+i<headers.length;
+++i){var headerName=headers[i].name.toLowerCase();
+if(headerName==name){return headers[i].value
+}}},formatPostText:function(text){if(text instanceof XMLDocument){return getElementXML(text.documentElement)
+}else{return text
+}},getPostText:function(file,context,noLimit){if(!file.postText){file.postText=readPostTextFromRequest(file.request,context);
+if(!file.postText&&context){file.postText=readPostTextFromPage(file.href,context)
+}}if(!file.postText){return file.postText
+}var limit=Firebug.netDisplayedPostBodyLimit;
+if(file.postText.length>limit&&!noLimit){return cropString(file.postText,limit,"\n\n... "+$STR("net.postDataSizeLimitMessage")+" ...\n\n")
+}return file.postText
+},getResponseText:function(file,context){return(typeof(file.responseText)!="undefined")?file.responseText:context.sourceCache.loadText(file.href,file.method,file)
+},isURLEncodedRequest:function(file,context){var text=Utils.getPostText(file,context);
+if(text&&text.toLowerCase().indexOf("content-type: application/x-www-form-urlencoded")==0){return true
+}var headerValue=Utils.findHeader(file.requestHeaders,"content-type");
+if(headerValue&&headerValue.indexOf("application/x-www-form-urlencoded")==0){return true
+}return false
+},isMultiPartRequest:function(file,context){var text=Utils.getPostText(file,context);
+if(text&&text.toLowerCase().indexOf("content-type: multipart/form-data")==0){return true
+}return false
+},getMimeType:function(mimeType,uri){if(!mimeType||!(mimeCategoryMap.hasOwnProperty(mimeType))){var ext=getFileExtension(uri);
+if(!ext){return mimeType
+}else{var extMimeType=mimeExtensionMap[ext.toLowerCase()];
+return extMimeType?extMimeType:mimeType
+}}else{return mimeType
+}},getDateFromSeconds:function(s){var d=new Date();
+d.setTime(s*1000);
+return d
+},getHttpHeaders:function(request,file){try{var http=QI(request,Ci.nsIHttpChannel);
+file.status=request.responseStatus;
+file.method=http.requestMethod;
+file.urlParams=parseURLParams(file.href);
+file.mimeType=Utils.getMimeType(request.contentType,request.name);
+if(!file.responseHeaders&&Firebug.collectHttpHeaders){var requestHeaders=[],responseHeaders=[];
+http.visitRequestHeaders({visitHeader:function(name,value){requestHeaders.push({name:name,value:value})
+}});
+http.visitResponseHeaders({visitHeader:function(name,value){responseHeaders.push({name:name,value:value})
+}});
+file.requestHeaders=requestHeaders;
+file.responseHeaders=responseHeaders
+}}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("net.getHttpHeaders FAILS "+file.href,exc)
+}}},isXHR:function(request){try{var callbacks=request.notificationCallbacks;
+var xhrRequest=callbacks?callbacks.getInterface(Ci.nsIXMLHttpRequest):null;
+if(FBTrace.DBG_NET){FBTrace.sysout("net.isXHR; "+(xhrRequest!=null)+", "+safeGetName(request))
+}return(xhrRequest!=null)
+}catch(exc){}return false
+},getFileCategory:function(file){if(file.category){if(FBTrace.DBG_NET){FBTrace.sysout("net.getFileCategory; current: "+file.category+" for: "+file.href,file)
+}return file.category
+}if(file.isXHR){if(FBTrace.DBG_NET){FBTrace.sysout("net.getFileCategory; XHR for: "+file.href,file)
+}return file.category="xhr"
+}if(!file.mimeType){var ext=getFileExtension(file.href);
+if(ext){file.mimeType=mimeExtensionMap[ext.toLowerCase()]
+}}if(!file.mimeType){return""
+}var mimeType=file.mimeType;
+if(mimeType){mimeType=mimeType.split(";")[0]
+}return(file.category=mimeCategoryMap[mimeType])
+}};
+var Utils=Firebug.NetMonitor.Utils;
+Firebug.registerModule(Firebug.NetMonitor)
+}});
+FBL.ns(function(){with(FBL){var contexts=[];
+Firebug.Spy=extend(Firebug.Module,{dispatchName:"spy",initialize:function(){if(Firebug.TraceModule){Firebug.TraceModule.addListener(this.TraceListener)
+}Firebug.Module.initialize.apply(this,arguments)
+},shutdown:function(){Firebug.Module.shutdown.apply(this,arguments);
+if(Firebug.TraceModule){Firebug.TraceModule.removeListener(this.TraceListener)
+}},initContext:function(context){context.spies=[];
+if(Firebug.showXMLHttpRequests&&Firebug.Console.isAlwaysEnabled()){this.attachObserver(context,context.window)
+}if(FBTrace.DBG_SPY){FBTrace.sysout("spy.initContext "+contexts.length+" ",context.getName())
+}},destroyContext:function(context){this.detachObserver(context,null);
+if(FBTrace.DBG_SPY&&context.spies.length){FBTrace.sysout("spy.destroyContext; ERROR There are leaking Spies ("+context.spies.length+") "+context.getName())
+}delete context.spies;
+if(FBTrace.DBG_SPY){FBTrace.sysout("spy.destroyContext "+contexts.length+" ",context.getName())
+}},watchWindow:function(context,win){if(Firebug.showXMLHttpRequests&&Firebug.Console.isAlwaysEnabled()){this.attachObserver(context,win)
+}},unwatchWindow:function(context,win){try{this.detachObserver(context,win)
+}catch(ex){ERROR(ex)
+}},updateOption:function(name,value){if(name=="showXMLHttpRequests"){var tach=value?this.attachObserver:this.detachObserver;
+for(var i=0;
+i<TabWatcher.contexts.length;
+++i){var context=TabWatcher.contexts[i];
+iterateWindows(context.window,function(win){tach.apply(this,[context,win])
+})
+}}},skipSpy:function(win){if(!win){return true
+}var uri=safeGetWindowLocation(win);
+if(uri&&(uri.indexOf("about:")==0||uri.indexOf("chrome:")==0)){return true
+}},attachObserver:function(context,win){if(Firebug.Spy.skipSpy(win)){return
+}for(var i=0;
+i<contexts.length;
+++i){if((contexts[i].context==context)&&(contexts[i].win==win)){return
+}}if(contexts.length==0){httpObserver.addObserver(SpyHttpObserver,"firebug-http-event",false);
+SpyHttpActivityObserver.registerObserver()
+}contexts.push({context:context,win:win});
+if(FBTrace.DBG_SPY){FBTrace.sysout("spy.attachObserver (HTTP) "+contexts.length+" ",context.getName())
+}},detachObserver:function(context,win){for(var i=0;
+i<contexts.length;
+++i){if(contexts[i].context==context){if(win&&(contexts[i].win!=win)){continue
+}contexts.splice(i,1);
+if(contexts.length==0){httpObserver.removeObserver(SpyHttpObserver,"firebug-http-event");
+SpyHttpActivityObserver.unregisterObserver()
+}if(FBTrace.DBG_SPY){FBTrace.sysout("spy.detachObserver (HTTP) "+contexts.length+" ",context.getName())
+}return
+}}},getXHR:function(request){if(!(request instanceof Ci.nsIHttpChannel)){return null
+}try{var callbacks=request.notificationCallbacks;
+return(callbacks?callbacks.getInterface(Ci.nsIXMLHttpRequest):null)
+}catch(exc){if(exc.name=="NS_NOINTERFACE"){if(FBTrace.DBG_SPY){FBTrace.sysout("spy.getXHR; Request is not nsIXMLHttpRequest: "+safeGetRequestName(request))
+}}}return null
+}});
+Firebug.Spy.XHR=domplate(Firebug.Rep,{tag:DIV({"class":"spyHead",_repObject:"$object"},TABLE({"class":"spyHeadTable focusRow outerFocusRow",cellpadding:0,cellspacing:0,role:"listitem","aria-expanded":"false"},TBODY({role:"presentation"},TR({"class":"spyRow"},TD({"class":"spyTitleCol spyCol",onclick:"$onToggleBody"},DIV({"class":"spyTitle"},"$object|getCaption"),DIV({"class":"spyFullTitle spyTitle"},"$object|getFullUri")),TD({"class":"spyCol"},DIV({"class":"spyStatus"},"$object|getStatus")),TD({"class":"spyCol"},SPAN({"class":"spyIcon"})),TD({"class":"spyCol"},SPAN({"class":"spyTime"})),TD({"class":"spyCol"},TAG(FirebugReps.SourceLink.tag,{object:"$object.sourceLink"})))))),getCaption:function(spy){return spy.method.toUpperCase()+" "+cropString(spy.getURL(),100)
+},getFullUri:function(spy){return spy.method.toUpperCase()+" "+spy.getURL()
+},getStatus:function(spy){var text="";
+if(spy.statusCode){text+=spy.statusCode+" "
+}if(spy.statusText){return text+=spy.statusText
+}return text
+},onToggleBody:function(event){var target=event.currentTarget||event.srcElement;
+var logRow=getAncestorByClass(target,"logRow-spy");
+if(isLeftClick(event)){toggleClass(logRow,"opened");
+var spy=getChildByClass(logRow,"spyHead").repObject;
+var spyHeadTable=getAncestorByClass(target,"spyHeadTable");
+if(hasClass(logRow,"opened")){updateHttpSpyInfo(spy,logRow);
+if(spyHeadTable){spyHeadTable.setAttribute("aria-expanded","true")
+}}else{}}},copyURL:function(spy){copyToClipboard(spy.getURL())
+},copyParams:function(spy){var text=spy.postText;
+if(!text){return
+}var url=reEncodeURL(spy,text,true);
+copyToClipboard(url)
+},copyResponse:function(spy){copyToClipboard(spy.responseText)
+},openInTab:function(spy){openNewTab(spy.getURL(),spy.postText)
+},supportsObject:function(object){return false;
+return object instanceof Firebug.Spy.XMLHttpRequestSpy
+},browseObject:function(spy,context){var url=spy.getURL();
+openNewTab(url);
+return true
+},getRealObject:function(spy,context){return spy.xhrRequest
+},getContextMenuItems:function(spy){var items=[{label:"CopyLocation",command:bindFixed(this.copyURL,this,spy)}];
+if(spy.postText){items.push({label:"CopyLocationParameters",command:bindFixed(this.copyParams,this,spy)})
+}items.push({label:"CopyResponse",command:bindFixed(this.copyResponse,this,spy)},"-",{label:"OpenInTab",command:bindFixed(this.openInTab,this,spy)});
+return items
+}});
+function updateTime(spy){var timeBox=spy.logRow.getElementsByClassName("spyTime").item(0);
+if(spy.responseTime){timeBox.textContent=" "+formatTime(spy.responseTime)
+}}function updateLogRow(spy){updateTime(spy);
+var statusBox=spy.logRow.getElementsByClassName("spyStatus").item(0);
+statusBox.textContent=Firebug.Spy.XHR.getStatus(spy);
+removeClass(spy.logRow,"loading");
+setClass(spy.logRow,"loaded");
+try{var errorRange=Math.floor(spy.xhrRequest.status/100);
+if(errorRange==4||errorRange==5){setClass(spy.logRow,"error")
+}}catch(exc){}}var updateHttpSpyInfo=function updateHttpSpyInfo(spy,logRow){if(!spy.logRow&&logRow){spy.logRow=logRow
+}if(!spy.logRow||!hasClass(spy.logRow,"opened")){return
+}if(!spy.params){spy.params=parseURLParams(spy.href+"")
+}if(!spy.requestHeaders){spy.requestHeaders=getRequestHeaders(spy)
+}if(!spy.responseHeaders&&spy.loaded){spy.responseHeaders=getResponseHeaders(spy)
+}var template=Firebug.NetMonitor.NetInfoBody;
+var netInfoBox=getChildByClass(spy.logRow,"spyHead","netInfoBody");
+if(!netInfoBox){var head=getChildByClass(spy.logRow,"spyHead");
+netInfoBox=template.tag.append({file:spy},head);
+dispatch(template.fbListeners,"initTabBody",[netInfoBox,spy]);
+template.selectTabByName(netInfoBox,"Response")
+}else{template.updateInfo(netInfoBox,spy,spy.context)
+}};
+function getRequestHeaders(spy){var headers=[];
+var channel=spy.xhrRequest.channel;
+if(channel instanceof Ci.nsIHttpChannel){channel.visitRequestHeaders({visitHeader:function(name,value){headers.push({name:name,value:value})
+}})
+}return headers
+}function getResponseHeaders(spy){var headers=[];
+try{var channel=spy.xhrRequest.channel;
+if(channel instanceof Ci.nsIHttpChannel){channel.visitResponseHeaders({visitHeader:function(name,value){headers.push({name:name,value:value})
+}})
+}}catch(exc){if(FBTrace.DBG_SPY||FBTrace.DBG_ERRORS){FBTrace.sysout("spy.getResponseHeaders; EXCEPTION "+safeGetRequestName(spy.request),exc)
+}}return headers
+}Firebug.registerModule(Firebug.Spy)
+}});
+FBL.ns(function(){with(FBL){var contentTypes={"text/plain":1,"text/javascript":1,"text/x-javascript":1,"text/json":1,"text/x-json":1,"application/json":1,"application/x-json":1,"application/javascript":1,"application/x-javascript":1,"application/json-rpc":1};
+Firebug.JSONViewerModel=extend(Firebug.Module,{dispatchName:"jsonViewer",initialize:function(){Firebug.NetMonitor.NetInfoBody.addListener(this);
+this.toggles={}
+},shutdown:function(){Firebug.NetMonitor.NetInfoBody.removeListener(this)
+},initTabBody:function(infoBox,file){if(FBTrace.DBG_JSONVIEWER){FBTrace.sysout("jsonviewer.initTabBody",infoBox)
+}dispatch(this.fbListeners,"onParseJSON",[file]);
+if(!file.jsonObject){if(this.isJSON(file.mimeType,file.responseText)){file.jsonObject=this.parseJSON(file)
+}}if(file.jsonObject&&hasProperties(file.jsonObject)){Firebug.NetMonitor.NetInfoBody.appendTab(infoBox,"JSON",$STR("JSON"));
+if(FBTrace.DBG_JSONVIEWER){FBTrace.sysout("jsonviewer.initTabBody; JSON object available "+(typeof(file.jsonObject)!="undefined"),file.jsonObject)
+}}},isJSON:function(contentType,data){var responseText=data?trim(data):null;
+if(responseText&&responseText.indexOf("{")==0){return true
+}if(!contentType){return false
+}contentType=contentType.split(";")[0];
+contentType=trim(contentType);
+return contentTypes[contentType]
+},updateTabBody:function(infoBox,file,context){var tab=infoBox.selectedTab;
+var tabBody=$$(".netInfoJSONText",infoBox)[0];
+if(!hasClass(tab,"netInfoJSONTab")||tabBody.updated){return
+}tabBody.updated=true;
+if(file.jsonObject){Firebug.DOMPanel.DirTable.tag.replace({object:file.jsonObject,toggles:this.toggles},tabBody)
+}},parseJSON:function(file){var jsonString=new String(file.responseText);
+return parseJSONString(jsonString)
+}});
+Firebug.registerModule(Firebug.JSONViewerModel)
+}});
+FBL.ns(function(){with(FBL){var xmlContentTypes=["text/xml","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml",,"application/vnd.mozilla.maybe.feed","application/rdf+xml","application/vnd.mozilla.xul+xml"];
+Firebug.XMLViewerModel=extend(Firebug.Module,{dispatchName:"xmlViewer",initialize:function(){Firebug.Module.initialize.apply(this,arguments);
+Firebug.NetMonitor.NetInfoBody.addListener(this)
+},shutdown:function(){Firebug.Module.shutdown.apply(this,arguments);
+Firebug.NetMonitor.NetInfoBody.removeListener(this)
+},initTabBody:function(infoBox,file){if(FBTrace.DBG_XMLVIEWER){FBTrace.sysout("xmlviewer.initTabBody",infoBox)
+}if(this.isXML(file.mimeType,file.responseText)){Firebug.NetMonitor.NetInfoBody.appendTab(infoBox,"XML",$STR("XML"));
+if(FBTrace.DBG_XMLVIEWER){FBTrace.sysout("xmlviewer.initTabBody; XML response available")
+}}},isXML:function(contentType){if(!contentType){return false
+}for(var i=0;
+i<xmlContentTypes.length;
+i++){if(contentType.indexOf(xmlContentTypes[i])==0){return true
+}}return false
+},updateTabBody:function(infoBox,file,context){var tab=infoBox.selectedTab;
+var tabBody=$$(".netInfoXMLText",infoBox)[0];
+if(!hasClass(tab,"netInfoXMLTab")||tabBody.updated){return
+}tabBody.updated=true;
+this.insertXML(tabBody,Firebug.NetMonitor.Utils.getResponseText(file,context))
+},insertXML:function(parentNode,text){var xmlText=text.replace(/^\s*<?.+?>\s*/,"");
+var div=parentNode.ownerDocument.createElement("div");
+div.innerHTML=xmlText;
+var root=div.getElementsByTagName("*")[0];
+if(FBTrace.DBG_XMLVIEWER){FBTrace.sysout("xmlviewer.updateTabBody; XML response parsed",doc)
+}var html=[];
+Firebug.Reps.appendNode(root,html);
+parentNode.innerHTML=html.join("")
+}});
+Firebug.XMLViewerModel.ParseError=domplate(Firebug.Rep,{tag:DIV({"class":"xmlInfoError"},DIV({"class":"xmlInfoErrorMsg"},"$error.message"),PRE({"class":"xmlInfoErrorSource"},"$error|getSource")),getSource:function(error){var parts=error.source.split("\n");
+if(parts.length!=2){return error.source
+}var limit=50;
+var column=parts[1].length;
+if(column>=limit){parts[0]="..."+parts[0].substr(column-limit);
+parts[1]="..."+parts[1].substr(column-limit)
+}if(parts[0].length>80){parts[0]=parts[0].substr(0,80)+"..."
+}return parts.join("\n")
+}});
+Firebug.registerModule(Firebug.XMLViewerModel)
+}});
+FBL.ns(function(){with(FBL){var ignoreHTMLProps={sizcache:1,sizset:1};
+ignoreHTMLProps[cacheID]=1;
+ignoreHTMLProps[cacheID+"b"]=1;
+Firebug.HTML=extend(Firebug.Module,{appendTreeNode:function(nodeArray,html){var reTrim=/^\s+|\s+$/g;
+if(!nodeArray.length){nodeArray=[nodeArray]
+}for(var n=0,node;
+node=nodeArray[n];
+n++){if(node.nodeType==1){if(Firebug.ignoreFirebugElements&&node.firebugIgnore){continue
+}var uid=node[cacheID];
+var child=node.childNodes;
+var childLength=child.length;
+var nodeName=node.nodeName.toLowerCase();
+var nodeVisible=isVisible(node);
+var hasSingleTextChild=childLength==1&&node.firstChild.nodeType==3&&nodeName!="script"&&nodeName!="style";
+var nodeControl=!hasSingleTextChild&&childLength>0?('<div class="nodeControl"></div>'):"";
+var isIE=false;
+if(isIE&&nodeControl){html.push(nodeControl)
+}if(typeof uid!="undefined"){html.push('<div class="objectBox-element" ','id="',uid,'">',!isIE&&nodeControl?nodeControl:"","<span ",cacheID,'="',uid,'"  class="nodeBox',nodeVisible?"":" nodeHidden",'">&lt;<span class="nodeTag">',nodeName,"</span>")
+}else{html.push('<div class="objectBox-element"><span class="nodeBox',nodeVisible?"":" nodeHidden",'">&lt;<span class="nodeTag">',nodeName,"</span>")
+}for(var i=0;
+i<node.attributes.length;
+++i){var attr=node.attributes[i];
+if(!attr.specified||Firebug.ignoreFirebugElements&&ignoreHTMLProps.hasOwnProperty(attr.nodeName)){continue
+}var name=attr.nodeName.toLowerCase();
+var value=name=="style"?formatStyles(node.style.cssText):attr.nodeValue;
+html.push('&nbsp;<span class="nodeName">',name,'</span>=&quot;<span class="nodeValue">',escapeHTML(value),"</span>&quot;")
+}if(hasSingleTextChild){var value=child[0].nodeValue.replace(reTrim,"");
+if(value){html.push('&gt;<span class="nodeText">',escapeHTML(value),'</span>&lt;/<span class="nodeTag">',nodeName,"</span>&gt;</span></div>")
+}else{html.push("/&gt;</span></div>")
+}}else{if(childLength>0){html.push("&gt;</span></div>")
+}else{html.push("/&gt;</span></div>")
+}}}else{if(node.nodeType==3){if(node.parentNode&&(node.parentNode.nodeName.toLowerCase()=="script"||node.parentNode.nodeName.toLowerCase()=="style")){var value=node.nodeValue.replace(reTrim,"");
+if(isIE){var src=value+"\n"
+}else{var src="\n"+value+"\n"
+}var match=src.match(/\n/g);
+var num=match?match.length:0;
+var s=[],sl=0;
+for(var c=1;
+c<num;
+c++){s[sl++]='<div line="'+c+'">'+c+"</div>"
+}html.push('<div class="lineNo">',s.join(""),'</div><pre class="sourceCode">',escapeHTML(src),"</pre>")
+}else{var value=node.nodeValue.replace(reTrim,"");
+if(value){html.push('<div class="nodeText">',escapeHTML(value),"</div>")
+}}}}}},appendTreeChildren:function(treeNode){var doc=Firebug.chrome.document;
+var uid=treeNode.id;
+var parentNode=documentCache[uid];
+if(parentNode.childNodes.length==0){return
+}var treeNext=treeNode.nextSibling;
+var treeParent=treeNode.parentNode;
+var isIE=false;
+var control=isIE?treeNode.previousSibling:treeNode.firstChild;
+control.className="nodeControl nodeMaximized";
+var html=[];
+var children=doc.createElement("div");
+children.className="nodeChildren";
+this.appendTreeNode(parentNode.childNodes,html);
+children.innerHTML=html.join("");
+treeParent.insertBefore(children,treeNext);
+var closeElement=doc.createElement("div");
+closeElement.className="objectBox-element";
+closeElement.innerHTML='&lt;/<span class="nodeTag">'+parentNode.nodeName.toLowerCase()+"&gt;</span>";
+treeParent.insertBefore(closeElement,treeNext)
+},removeTreeChildren:function(treeNode){var children=treeNode.nextSibling;
+var closeTag=children.nextSibling;
+var isIE=false;
+var control=isIE?treeNode.previousSibling:treeNode.firstChild;
+control.className="nodeControl";
+children.parentNode.removeChild(children);
+closeTag.parentNode.removeChild(closeTag)
+},isTreeNodeVisible:function(id){return $(id)
+},select:function(el){var id=el&&el[cacheID];
+if(id){this.selectTreeNode(id)
+}},selectTreeNode:function(id){id=""+id;
+var node,stack=[];
+while(id&&!this.isTreeNodeVisible(id)){stack.push(id);
+var node=documentCache[id].parentNode;
+if(node&&typeof node[cacheID]!="undefined"){id=""+node[cacheID]
+}else{break
+}}stack.push(id);
+while(stack.length>0){id=stack.pop();
+node=$(id);
+if(stack.length>0&&documentCache[id].childNodes.length>0){this.appendTreeChildren(node)
+}}selectElement(node);
+fbPanel1.scrollTop=Math.round(node.offsetTop-fbPanel1.clientHeight/2)
+}});
+Firebug.registerModule(Firebug.HTML);
+function HTMLPanel(){}HTMLPanel.prototype=extend(Firebug.Panel,{name:"HTML",title:"HTML",options:{hasSidePanel:true,isPreRendered:true,innerHTMLSync:true},create:function(){Firebug.Panel.create.apply(this,arguments);
+this.panelNode.style.padding="4px 3px 1px 15px";
+this.contentNode.style.minWidth="500px";
+if(Env.Options.enablePersistent||Firebug.chrome.type!="popup"){this.createUI()
+}if(!this.sidePanelBar.selectedPanel){this.sidePanelBar.selectPanel("css")
+}},destroy:function(){selectedElement=null;
+fbPanel1=null;
+selectedSidePanelTS=null;
+selectedSidePanelTimer=null;
+Firebug.Panel.destroy.apply(this,arguments)
+},createUI:function(){var rootNode=Firebug.browser.document.documentElement;
+var html=[];
+Firebug.HTML.appendTreeNode(rootNode,html);
+var d=this.contentNode;
+d.innerHTML=html.join("");
+this.panelNode.appendChild(d)
+},initialize:function(){Firebug.Panel.initialize.apply(this,arguments);
+addEvent(this.panelNode,"click",Firebug.HTML.onTreeClick);
+fbPanel1=$("fbPanel1");
+if(!selectedElement){Firebug.HTML.selectTreeNode(Firebug.browser.document.body[cacheID])
+}addEvent(fbPanel1,"mousemove",Firebug.HTML.onListMouseMove);
+addEvent($("fbContent"),"mouseout",Firebug.HTML.onListMouseMove);
+addEvent(Firebug.chrome.node,"mouseout",Firebug.HTML.onListMouseMove)
+},shutdown:function(){removeEvent(fbPanel1,"mousemove",Firebug.HTML.onListMouseMove);
+removeEvent($("fbContent"),"mouseout",Firebug.HTML.onListMouseMove);
+removeEvent(Firebug.chrome.node,"mouseout",Firebug.HTML.onListMouseMove);
+removeEvent(this.panelNode,"click",Firebug.HTML.onTreeClick);
+fbPanel1=null;
+Firebug.Panel.shutdown.apply(this,arguments)
+},reattach:function(){if(FirebugChrome.selectedHTMLElementId){Firebug.HTML.selectTreeNode(FirebugChrome.selectedHTMLElementId)
+}},updateSelection:function(object){var id=object[cacheID];
+if(id){Firebug.HTML.selectTreeNode(id)
+}}});
+Firebug.registerPanel(HTMLPanel);
+var formatStyles=function(styles){return isIE?styles.replace(/([^\s]+)\s*:/g,function(m,g){return g.toLowerCase()+":"
+}):styles
+};
+var selectedElement=null;
+var fbPanel1=null;
+var selectedSidePanelTS,selectedSidePanelTimer;
+var selectElement=function selectElement(e){if(e!=selectedElement){if(selectedElement){selectedElement.className="objectBox-element"
+}e.className=e.className+" selectedElement";
+if(FBL.isFirefox){e.style.MozBorderRadius="2px"
+}else{if(FBL.isSafari){e.style.WebkitBorderRadius="2px"
+}}selectedElement=e;
+FirebugChrome.selectedHTMLElementId=e.id;
+var target=documentCache[e.id];
+var selectedSidePanel=Firebug.chrome.getPanel("HTML").sidePanelBar.selectedPanel;
+var stack=FirebugChrome.htmlSelectionStack;
+stack.unshift(target);
+if(stack.length>2){stack.pop()
+}var lazySelect=function(){selectedSidePanelTS=new Date().getTime();
+selectedSidePanel.select(target,true)
+};
+if(selectedSidePanelTimer){clearTimeout(selectedSidePanelTimer);
+selectedSidePanelTimer=null
+}if(new Date().getTime()-selectedSidePanelTS>100){setTimeout(lazySelect,0)
+}else{selectedSidePanelTimer=setTimeout(lazySelect,150)
+}}};
+Firebug.HTML.onTreeClick=function(e){e=e||event;
+var targ;
+if(e.target){targ=e.target
+}else{if(e.srcElement){targ=e.srcElement
+}}if(targ.nodeType==3){targ=targ.parentNode
+}if(targ.className.indexOf("nodeControl")!=-1||targ.className=="nodeTag"){var isIE=false;
+if(targ.className=="nodeTag"){var control=isIE?(targ.parentNode.previousSibling||targ):(targ.parentNode.previousSibling||targ);
+selectElement(targ.parentNode.parentNode);
+if(control.className.indexOf("nodeControl")==-1){return
+}}else{control=targ
+}FBL.cancelEvent(e);
+var treeNode=isIE?control.nextSibling:control.parentNode;
+if(control.className.indexOf(" nodeMaximized")!=-1){FBL.Firebug.HTML.removeTreeChildren(treeNode)
+}else{FBL.Firebug.HTML.appendTreeChildren(treeNode)
+}}else{if(targ.className=="nodeValue"||targ.className=="nodeName"){}}};
+function onListMouseOut(e){e=e||event||window;
+var targ;
+if(e.target){targ=e.target
+}else{if(e.srcElement){targ=e.srcElement
+}}if(targ.nodeType==3){targ=targ.parentNode
+}if(hasClass(targ,"fbPanel")){FBL.Firebug.Inspector.hideBoxModel();
+hoverElement=null
+}}var hoverElement=null;
+var hoverElementTS=0;
+Firebug.HTML.onListMouseMove=function onListMouseMove(e){try{e=e||event||window;
+var targ;
+if(e.target){targ=e.target
+}else{if(e.srcElement){targ=e.srcElement
+}}if(targ.nodeType==3){targ=targ.parentNode
+}var found=false;
+while(targ&&!found){if(!/\snodeBox\s|\sobjectBox-selector\s/.test(" "+targ.className+" ")){targ=targ.parentNode
+}else{found=true
+}}if(!targ){FBL.Firebug.Inspector.hideBoxModel();
+hoverElement=null;
+return
+}if(typeof targ.attributes[FBL.cacheID]=="undefined"){return
+}var uid=targ.attributes[FBL.cacheID];
+if(!uid){return
+}var el=FBL.documentCache[uid.value];
+var nodeName=el.nodeName.toLowerCase();
+if(FBL.isIE&&" meta title script link ".indexOf(" "+nodeName+" ")!=-1){return
+}if(!/\snodeBox\s|\sobjectBox-selector\s/.test(" "+targ.className+" ")){return
+}if(el.id=="FirebugUI"||" html head body br script link iframe ".indexOf(" "+nodeName+" ")!=-1){FBL.Firebug.Inspector.hideBoxModel();
+hoverElement=null;
+return
+}if((new Date().getTime()-hoverElementTS>40)&&hoverElement!=el){hoverElementTS=new Date().getTime();
+hoverElement=el;
+FBL.Firebug.Inspector.drawBoxModel(el)
+}}catch(E){}};
+Firebug.Reps={appendText:function(object,html){html.push(escapeHTML(objectToString(object)))
+},appendNull:function(object,html){html.push('<span class="objectBox-null">',escapeHTML(objectToString(object)),"</span>")
+},appendString:function(object,html){html.push('<span class="objectBox-string">&quot;',escapeHTML(objectToString(object)),"&quot;</span>")
+},appendInteger:function(object,html){html.push('<span class="objectBox-number">',escapeHTML(objectToString(object)),"</span>")
+},appendFloat:function(object,html){html.push('<span class="objectBox-number">',escapeHTML(objectToString(object)),"</span>")
+},appendFunction:function(object,html){var reName=/function ?(.*?)\(/;
+var m=reName.exec(objectToString(object));
+var name=m&&m[1]?m[1]:"function";
+html.push('<span class="objectBox-function">',escapeHTML(name),"()</span>")
+},appendObject:function(object,html){try{if(object==undefined){this.appendNull("undefined",html)
+}else{if(object==null){this.appendNull("null",html)
+}else{if(typeof object=="string"){this.appendString(object,html)
+}else{if(typeof object=="number"){this.appendInteger(object,html)
+}else{if(typeof object=="boolean"){this.appendInteger(object,html)
+}else{if(typeof object=="function"){this.appendFunction(object,html)
+}else{if(object.nodeType==1){this.appendSelector(object,html)
+}else{if(typeof object=="object"){if(typeof object.length!="undefined"){this.appendArray(object,html)
+}else{this.appendObjectFormatted(object,html)
+}}else{this.appendText(object,html)
+}}}}}}}}}catch(exc){}},appendObjectFormatted:function(object,html){var text=objectToString(object);
+var reObject=/\[object (.*?)\]/;
+var m=reObject.exec(text);
+html.push('<span class="objectBox-object">',m?m[1]:text,"</span>")
+},appendSelector:function(object,html){var uid=object[cacheID];
+var uidString=uid?[cacheID,'="',uid,'"'].join(""):"";
+html.push('<span class="objectBox-selector"',uidString,">");
+html.push('<span class="selectorTag">',escapeHTML(object.nodeName.toLowerCase()),"</span>");
+if(object.id){html.push('<span class="selectorId">#',escapeHTML(object.id),"</span>")
+}if(object.className){html.push('<span class="selectorClass">.',escapeHTML(object.className),"</span>")
+}html.push("</span>")
+},appendNode:function(node,html){if(node.nodeType==1){var uid=node[cacheID];
+var uidString=uid?[cacheID,'="',uid,'"'].join(""):"";
+html.push('<div class="objectBox-element"',uidString,'">',"<span ",cacheID,'="',uid,'" class="nodeBox">','&lt;<span class="nodeTag">',node.nodeName.toLowerCase(),"</span>");
+for(var i=0;
+i<node.attributes.length;
+++i){var attr=node.attributes[i];
+if(!attr.specified||attr.nodeName==cacheID){continue
+}var name=attr.nodeName.toLowerCase();
+var value=name=="style"?node.style.cssText:attr.nodeValue;
+html.push('&nbsp;<span class="nodeName">',name,'</span>=&quot;<span class="nodeValue">',escapeHTML(value),"</span>&quot;")
+}if(node.firstChild){html.push('&gt;</div><div class="nodeChildren">');
+for(var child=node.firstChild;
+child;
+child=child.nextSibling){this.appendNode(child,html)
+}html.push('</div><div class="objectBox-element">&lt;/<span class="nodeTag">',node.nodeName.toLowerCase(),"&gt;</span></span></div>")
+}else{html.push("/&gt;</span></div>")
+}}else{if(node.nodeType==3){var value=trim(node.nodeValue);
+if(value){html.push('<div class="nodeText">',escapeHTML(value),"</div>")
+}}}},appendArray:function(object,html){html.push('<span class="objectBox-array"><b>[</b> ');
+for(var i=0,l=object.length,obj;
+i<l;
+++i){this.appendObject(object[i],html);
+if(i<l-1){html.push(", ")
+}}html.push(" <b>]</b></span>")
+}}
+}});
+(function(){this.getElementXPath=function(element){if(element&&element.id){return'//*[@id="'+element.id+'"]'
+}else{return this.getElementTreeXPath(element)
+}};
+this.getElementTreeXPath=function(element){var paths=[];
+for(;
+element&&element.nodeType==1;
+element=element.parentNode){var index=0;
+for(var sibling=element.previousSibling;
+sibling;
+sibling=sibling.previousSibling){if(sibling.nodeName==element.nodeName){++index
+}}var tagName=element.nodeName.toLowerCase();
+var pathIndex=(index?"["+(index+1)+"]":"");
+paths.splice(0,0,tagName+pathIndex)
+}return paths.length?"/"+paths.join("/"):null
+};
+this.getElementsByXPath=function(doc,xpath){var nodes=[];
+try{var result=doc.evaluate(xpath,doc,null,XPathResult.ANY_TYPE,null);
+for(var item=result.iterateNext();
+item;
+item=result.iterateNext()){nodes.push(item)
+}}catch(exc){}return nodes
+};
+this.getRuleMatchingElements=function(rule,doc){var css=rule.selectorText;
+var xpath=this.cssToXPath(css);
+return this.getElementsByXPath(doc,xpath)
+}
+}).call(FBL);
+FBL.ns(function(){with(FBL){var toCamelCase=function toCamelCase(s){return s.replace(reSelectorCase,toCamelCaseReplaceFn)
+};
+var toSelectorCase=function toSelectorCase(s){return s.replace(reCamelCase,"-$1").toLowerCase()
+};
+var reCamelCase=/([A-Z])/g;
+var reSelectorCase=/\-(.)/g;
+var toCamelCaseReplaceFn=function toCamelCaseReplaceFn(m,g){return g.toUpperCase()
+};
+var cacheUID=-1;
+var createCache=function(){var map={};
+var CID=cacheID+"b";
+var cacheFunction=function(element){return cacheAPI.set(element)
+};
+var cacheAPI={get:function(key){return map.hasOwnProperty(key)?map[key]:null
+},set:function(element){var id=element[CID];
+if(!id){id=++cacheUID;
+element[CID]=id
+}if(!map.hasOwnProperty(id)){map[id]=element
+}return id
+},key:function(element){return element[CID]
+},has:function(element){return map.hasOwnProperty(element[CID])
+},clear:function(){for(var name in map){var element=map[name];
+element[CID]=null;
+delete element[CID];
+map[name]=null;
+delete map[name]
+}}};
+append(cacheFunction,cacheAPI);
+return cacheFunction
+};
+var globalCSSRuleIndex;
+var externalStyleSheetURLs=[];
+var externalStyleSheetWarning=domplate(Firebug.Rep,{tag:DIV({"class":"warning focusRow",style:"font-weight:normal;",role:"listitem"},SPAN("$object|STR"),A({href:"$href",target:"_blank"},"$link|STR"))});
+FBL.processAllStyleSheets=function(doc,styleSheetIterator){styleSheetIterator=styleSheetIterator||processStyleSheet;
+globalCSSRuleIndex=-1;
+var styleSheets=doc.styleSheets;
+var importedStyleSheets=[];
+if(FBTrace.DBG_CSS){var start=new Date().getTime()
+}for(var i=0,length=styleSheets.length;
+i<length;
+i++){try{var styleSheet=styleSheets[i];
+var rules=isIE?styleSheet.rules:styleSheet.cssRules;
+rules.length
+}catch(e){externalStyleSheetURLs.push(styleSheet.href);
+styleSheet.restricted=true;
+var ssid=StyleSheetCache(styleSheet)
+}styleSheetIterator(doc,styleSheet);
+var importedStyleSheet,importedRules;
+if(isIE){var imports=styleSheet.imports;
+for(var j=0,importsLength=imports.length;
+j<importsLength;
+j++){try{importedStyleSheet=imports[j];
+importedRules=importedStyleSheet.rules;
+importedRules.length
+}catch(e){externalStyleSheetURLs.push(styleSheet.href);
+importedStyleSheet.restricted=true;
+var ssid=StyleSheetCache(importedStyleSheet)
+}styleSheetIterator(doc,importedStyleSheet)
+}}else{if(rules){for(var j=0,rulesLength=rules.length;
+j<rulesLength;
+j++){try{var rule=rules[j];
+importedStyleSheet=rule.styleSheet;
+if(importedStyleSheet){importedRules=importedStyleSheet.cssRules;
+importedRules.length
+}else{break
+}}catch(e){externalStyleSheetURLs.push(styleSheet.href);
+importedStyleSheet.restricted=true;
+var ssid=StyleSheetCache(importedStyleSheet)
+}styleSheetIterator(doc,importedStyleSheet)
+}}}}if(FBTrace.DBG_CSS){FBTrace.sysout("FBL.processAllStyleSheets","all stylesheet rules processed in "+(new Date().getTime()-start)+"ms")
+}};
+var StyleSheetCache=FBL.StyleSheetCache=createCache();
+var ElementCache=FBL.ElementCache=createCache();
+var CSSRuleMap={};
+var ElementCSSRulesMap={};
+var processStyleSheet=function(doc,styleSheet){if(styleSheet.restricted){return
+}var rules=isIE?styleSheet.rules:styleSheet.cssRules;
+var ssid=StyleSheetCache(styleSheet);
+for(var i=0,length=rules.length;
+i<length;
+i++){var rid=ssid+":"+i;
+var rule=rules[i];
+var selector=rule.selectorText;
+if(isIE){selector=selector.replace(reSelectorTag,function(s){return s.toLowerCase()
+})
+}CSSRuleMap[rid]={styleSheetId:ssid,styleSheetIndex:i,order:++globalCSSRuleIndex,specificity:selector&&selector.indexOf(",")!=-1?getCSSRuleSpecificity(selector):0,rule:rule,selector:selector,cssText:rule.style?rule.style.cssText:rule.cssText?rule.cssText:""};
+var elements=Firebug.Selector(selector,doc);
+for(var j=0,elementsLength=elements.length;
+j<elementsLength;
+j++){var element=elements[j];
+var eid=ElementCache(element);
+if(!ElementCSSRulesMap[eid]){ElementCSSRulesMap[eid]=[]
+}ElementCSSRulesMap[eid].push(rid)
+}}};
+FBL.getElementCSSRules=function(element){var eid=ElementCache(element);
+var rules=ElementCSSRulesMap[eid];
+if(!rules){return
+}var arr=[element];
+var Selector=Firebug.Selector;
+var ruleId,rule;
+for(var i=0,length=rules.length;
+i<length;
+i++){ruleId=rules[i];
+rule=CSSRuleMap[ruleId];
+if(rule.selector.indexOf(",")!=-1){var selectors=rule.selector.split(",");
+var maxSpecificity=-1;
+var sel,spec,mostSpecificSelector;
+for(var j,len=selectors.length;
+j<len;
+j++){sel=selectors[j];
+if(Selector.matches(sel,arr).length==1){spec=getCSSRuleSpecificity(sel);
+if(spec>maxSpecificity){maxSpecificity=spec;
+mostSpecificSelector=sel
+}}}rule.specificity=maxSpecificity
+}}rules.sort(sortElementRules);
+return rules
+};
+var sortElementRules=function(a,b){var ruleA=CSSRuleMap[a];
+var ruleB=CSSRuleMap[b];
+var specificityA=ruleA.specificity;
+var specificityB=ruleB.specificity;
+if(specificityA>specificityB){return 1
+}else{if(specificityA<specificityB){return -1
+}else{return ruleA.order>ruleB.order?1:-1
+}}};
+var solveRulesTied=function(a,b){var ruleA=CSSRuleMap[a];
+var ruleB=CSSRuleMap[b];
+if(ruleA.specificity==ruleB.specificity){return ruleA.order>ruleB.order?1:-1
+}return null
+};
+var reSelectorTag=/(^|\s)(?:\w+)/g;
+var reSelectorClass=/\.[\w\d_-]+/g;
+var reSelectorId=/#[\w\d_-]+/g;
+var getCSSRuleSpecificity=function(selector){var match=selector.match(reSelectorTag);
+var tagCount=match?match.length:0;
+match=selector.match(reSelectorClass);
+var classCount=match?match.length:0;
+match=selector.match(reSelectorId);
+var idCount=match?match.length:0;
+return tagCount+10*classCount+100*idCount
+};
+Firebug.SourceBoxPanel=Firebug.Panel;
+var domUtils=null;
+var textContent=isIE?"innerText":"textContent";
+var CSSDomplateBase={isEditable:function(rule){return !rule.isSystemSheet
+},isSelectorEditable:function(rule){return rule.isSelectorEditable&&this.isEditable(rule)
+}};
+var CSSPropTag=domplate(CSSDomplateBase,{tag:DIV({"class":"cssProp focusRow",$disabledStyle:"$prop.disabled",$editGroup:"$rule|isEditable",$cssOverridden:"$prop.overridden",role:"option"},A({"class":"cssPropDisable"},"&nbsp;&nbsp;"),SPAN({"class":"cssPropName",$editable:"$rule|isEditable"},"$prop.name"),SPAN({"class":"cssColon"},":"),SPAN({"class":"cssPropValue",$editable:"$rule|isEditable"},"$prop.value$prop.important"),SPAN({"class":"cssSemi"},";"))});
+var CSSRuleTag=TAG("$rule.tag",{rule:"$rule"});
+var CSSImportRuleTag=domplate({tag:DIV({"class":"cssRule insertInto focusRow importRule",_repObject:"$rule.rule"},"@import &quot;",A({"class":"objectLink",_repObject:"$rule.rule.styleSheet"},"$rule.rule.href"),"&quot;;")});
+var CSSStyleRuleTag=domplate(CSSDomplateBase,{tag:DIV({"class":"cssRule insertInto",$cssEditableRule:"$rule|isEditable",$editGroup:"$rule|isSelectorEditable",_repObject:"$rule.rule",ruleId:"$rule.id",role:"presentation"},DIV({"class":"cssHead focusRow",role:"listitem"},SPAN({"class":"cssSelector",$editable:"$rule|isSelectorEditable"},"$rule.selector")," {"),DIV({role:"group"},DIV({"class":"cssPropertyListBox",role:"listbox"},FOR("prop","$rule.props",TAG(CSSPropTag.tag,{rule:"$rule",prop:"$prop"})))),DIV({"class":"editable insertBefore",role:"presentation"},"}"))});
+var reSplitCSS=/(url\("?[^"\)]+?"?\))|(rgb\(.*?\))|(#[\dA-Fa-f]+)|(-?\d+(\.\d+)?(%|[a-z]{1,2})?)|([^,\s]+)|"(.*?)"/;
+var reURL=/url\("?([^"\)]+)?"?\)/;
+var reRepeat=/no-repeat|repeat-x|repeat-y|repeat/;
+var sothinkInstalled=false;
+var styleGroups={text:["font-family","font-size","font-weight","font-style","color","text-transform","text-decoration","letter-spacing","word-spacing","line-height","text-align","vertical-align","direction","column-count","column-gap","column-width"],background:["background-color","background-image","background-repeat","background-position","background-attachment","opacity"],box:["width","height","top","right","bottom","left","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","-moz-border-top-radius","-moz-border-right-radius","-moz-border-bottom-radius","-moz-border-left-radius","outline-top-width","outline-right-width","outline-bottom-width","outline-left-width","outline-top-color","outline-right-color","outline-bottom-color","outline-left-color","outline-top-style","outline-right-style","outline-bottom-style","outline-left-style"],layout:["position","display","visibility","z-index","overflow-x","overflow-y","overflow-clip","white-space","clip","float","clear","-moz-box-sizing"],other:["cursor","list-style-image","list-style-position","list-style-type","marker-offset","user-focus","user-select","user-modify","user-input"]};
+var styleGroupTitles={text:"Text",background:"Background",box:"Box Model",layout:"Layout",other:"Other"};
+Firebug.CSSModule=extend(Firebug.Module,{freeEdit:function(styleSheet,value){if(!styleSheet.editStyleSheet){var ownerNode=getStyleSheetOwnerNode(styleSheet);
+styleSheet.disabled=true;
+var url=CCSV("@mozilla.org/network/standard-url;1",Components.interfaces.nsIURL);
+url.spec=styleSheet.href;
+var editStyleSheet=ownerNode.ownerDocument.createElementNS("http://www.w3.org/1999/xhtml","style");
+unwrapObject(editStyleSheet).firebugIgnore=true;
+editStyleSheet.setAttribute("type","text/css");
+editStyleSheet.setAttributeNS("http://www.w3.org/XML/1998/namespace","base",url.directory);
+if(ownerNode.hasAttribute("media")){editStyleSheet.setAttribute("media",ownerNode.getAttribute("media"))
+}ownerNode.parentNode.insertBefore(editStyleSheet,ownerNode.nextSibling);
+styleSheet.editStyleSheet=editStyleSheet
+}styleSheet.editStyleSheet.innerHTML=value;
+if(FBTrace.DBG_CSS){FBTrace.sysout("css.saveEdit styleSheet.href:"+styleSheet.href+" got innerHTML:"+value+"\n")
+}dispatch(this.fbListeners,"onCSSFreeEdit",[styleSheet,value])
+},insertRule:function(styleSheet,cssText,ruleIndex){if(FBTrace.DBG_CSS){FBTrace.sysout("Insert: "+ruleIndex+" "+cssText)
+}var insertIndex=styleSheet.insertRule(cssText,ruleIndex);
+dispatch(this.fbListeners,"onCSSInsertRule",[styleSheet,cssText,ruleIndex]);
+return insertIndex
+},deleteRule:function(styleSheet,ruleIndex){if(FBTrace.DBG_CSS){FBTrace.sysout("deleteRule: "+ruleIndex+" "+styleSheet.cssRules.length,styleSheet.cssRules)
+}dispatch(this.fbListeners,"onCSSDeleteRule",[styleSheet,ruleIndex]);
+styleSheet.deleteRule(ruleIndex)
+},setProperty:function(rule,propName,propValue,propPriority){var style=rule.style||rule;
+var baseText=style.cssText;
+if(style.getPropertyValue){var prevValue=style.getPropertyValue(propName);
+var prevPriority=style.getPropertyPriority(propName);
+style.removeProperty(propName);
+style.setProperty(propName,propValue,propPriority)
+}else{style[toCamelCase(propName)]=propValue
+}if(propName){dispatch(this.fbListeners,"onCSSSetProperty",[style,propName,propValue,propPriority,prevValue,prevPriority,rule,baseText])
+}},removeProperty:function(rule,propName,parent){var style=rule.style||rule;
+var baseText=style.cssText;
+if(style.getPropertyValue){var prevValue=style.getPropertyValue(propName);
+var prevPriority=style.getPropertyPriority(propName);
+style.removeProperty(propName)
+}else{style[toCamelCase(propName)]=""
+}if(propName){dispatch(this.fbListeners,"onCSSRemoveProperty",[style,propName,prevValue,prevPriority,rule,baseText])
+}}});
+Firebug.CSSStyleSheetPanel=function(){};
+Firebug.CSSStyleSheetPanel.prototype=extend(Firebug.SourceBoxPanel,{template:domplate({tag:DIV({"class":"cssSheet insertInto a11yCSSView"},FOR("rule","$rules",CSSRuleTag),DIV({"class":"cssSheet editable insertBefore"},""))}),refresh:function(){if(this.location){this.updateLocation(this.location)
+}else{if(this.selection){this.updateSelection(this.selection)
+}}},toggleEditing:function(){if(!this.stylesheetEditor){this.stylesheetEditor=new StyleSheetEditor(this.document)
+}if(this.editing){Firebug.Editor.stopEditing()
+}else{if(!this.location){return
+}var styleSheet=this.location.editStyleSheet?this.location.editStyleSheet.sheet:this.location;
+var css=getStyleSheetCSS(styleSheet,this.context);
+this.stylesheetEditor.styleSheet=this.location;
+Firebug.Editor.startEditing(this.panelNode,css,this.stylesheetEditor)
+}},getStylesheetURL:function(rule){if(this.location.href){return this.location.href
+}else{return this.context.window.location.href
+}},getRuleByLine:function(styleSheet,line){if(!domUtils){return null
+}var cssRules=styleSheet.cssRules;
+for(var i=0;
+i<cssRules.length;
+++i){var rule=cssRules[i];
+if(rule instanceof CSSStyleRule){var ruleLine=domUtils.getRuleLine(rule);
+if(ruleLine>=line){return rule
+}}}},highlightRule:function(rule){var ruleElement=Firebug.getElementByRepObject(this.panelNode.firstChild,rule);
+if(ruleElement){scrollIntoCenterView(ruleElement,this.panelNode);
+setClassTimed(ruleElement,"jumpHighlight",this.context)
+}},getStyleSheetRules:function(context,styleSheet){var isSystemSheet=isSystemStyleSheet(styleSheet);
+function appendRules(cssRules){for(var i=0;
+i<cssRules.length;
+++i){var rule=cssRules[i];
+if(instanceOf(rule,"CSSStyleRule")){var props=this.getRuleProperties(context,rule);
+var line=null;
+var selector=rule.selectorText;
+if(isIE){selector=selector.replace(reSelectorTag,function(s){return s.toLowerCase()
+})
+}var ruleId=rule.selectorText+"/"+line;
+rules.push({tag:CSSStyleRuleTag.tag,rule:rule,id:ruleId,selector:selector,props:props,isSystemSheet:isSystemSheet,isSelectorEditable:true})
+}else{if(instanceOf(rule,"CSSImportRule")){rules.push({tag:CSSImportRuleTag.tag,rule:rule})
+}else{if(instanceOf(rule,"CSSMediaRule")){appendRules.apply(this,[rule.cssRules])
+}else{if(FBTrace.DBG_ERRORS||FBTrace.DBG_CSS){FBTrace.sysout("css getStyleSheetRules failed to classify a rule ",rule)
+}}}}}}var rules=[];
+appendRules.apply(this,[styleSheet.cssRules||styleSheet.rules]);
+return rules
+},parseCSSProps:function(style,inheritMode){var props=[];
+if(Firebug.expandShorthandProps){var count=style.length-1,index=style.length;
+while(index--){var propName=style.item(count-index);
+this.addProperty(propName,style.getPropertyValue(propName),!!style.getPropertyPriority(propName),false,inheritMode,props)
+}}else{var lines=style.cssText.match(/(?:[^;\(]*(?:\([^\)]*?\))?[^;\(]*)*;?/g);
+var propRE=/\s*([^:\s]*)\s*:\s*(.*?)\s*(! important)?;?$/;
+var line,i=0;
+var m;
+while(line=lines[i++]){m=propRE.exec(line);
+if(!m){continue
+}if(m[2]){this.addProperty(m[1],m[2],!!m[3],false,inheritMode,props)
+}}}return props
+},getRuleProperties:function(context,rule,inheritMode){var props=this.parseCSSProps(rule.style,inheritMode);
+var line;
+var ruleId=rule.selectorText+"/"+line;
+this.addOldProperties(context,ruleId,inheritMode,props);
+sortProperties(props);
+return props
+},addOldProperties:function(context,ruleId,inheritMode,props){if(context.selectorMap&&context.selectorMap.hasOwnProperty(ruleId)){var moreProps=context.selectorMap[ruleId];
+for(var i=0;
+i<moreProps.length;
+++i){var prop=moreProps[i];
+this.addProperty(prop.name,prop.value,prop.important,true,inheritMode,props)
+}}},addProperty:function(name,value,important,disabled,inheritMode,props){name=name.toLowerCase();
+if(inheritMode&&!inheritedStyleNames[name]){return
+}name=this.translateName(name,value);
+if(name){value=stripUnits(rgbToHex(value));
+important=important?" !important":"";
+var prop={name:name,value:value,important:important,disabled:disabled};
+props.push(prop)
+}},translateName:function(name,value){if((value=="-moz-initial"&&(name=="-moz-background-clip"||name=="-moz-background-origin"||name=="-moz-background-inline-policy"))||(value=="physical"&&(name=="margin-left-ltr-source"||name=="margin-left-rtl-source"||name=="margin-right-ltr-source"||name=="margin-right-rtl-source"))||(value=="physical"&&(name=="padding-left-ltr-source"||name=="padding-left-rtl-source"||name=="padding-right-ltr-source"||name=="padding-right-rtl-source"))){return null
+}if(name=="margin-left-value"){return"margin-left"
+}else{if(name=="margin-right-value"){return"margin-right"
+}else{if(name=="margin-top-value"){return"margin-top"
+}else{if(name=="margin-bottom-value"){return"margin-bottom"
+}else{if(name=="padding-left-value"){return"padding-left"
+}else{if(name=="padding-right-value"){return"padding-right"
+}else{if(name=="padding-top-value"){return"padding-top"
+}else{if(name=="padding-bottom-value"){return"padding-bottom"
+}else{return name
+}}}}}}}}},editElementStyle:function(){var rulesBox=$$(".cssElementRuleContainer",this.panelNode)[0];
+var styleRuleBox=rulesBox&&Firebug.getElementByRepObject(rulesBox,this.selection);
+if(!styleRuleBox){var rule={rule:this.selection,inherited:false,selector:"element.style",props:[]};
+if(!rulesBox){styleRuleBox=this.template.cascadedTag.replace({rules:[rule],inherited:[],inheritLabel:"Inherited from"},this.panelNode);
+styleRuleBox=$$(".cssElementRuleContainer",styleRuleBox)[0]
+}else{styleRuleBox=this.template.ruleTag.insertBefore({rule:rule},rulesBox)
+}styleRuleBox=$$(".insertInto",styleRuleBox)[0]
+}Firebug.Editor.insertRowForObject(styleRuleBox)
+},insertPropertyRow:function(row){Firebug.Editor.insertRowForObject(row)
+},insertRule:function(row){var location=getAncestorByClass(row,"cssRule");
+if(!location){location=getChildByClass(this.panelNode,"cssSheet");
+Firebug.Editor.insertRowForObject(location)
+}else{Firebug.Editor.insertRow(location,"before")
+}},editPropertyRow:function(row){var propValueBox=getChildByClass(row,"cssPropValue");
+Firebug.Editor.startEditing(propValueBox)
+},deletePropertyRow:function(row){var rule=Firebug.getRepObject(row);
+var propName=getChildByClass(row,"cssPropName")[textContent];
+Firebug.CSSModule.removeProperty(rule,propName);
+var ruleId=Firebug.getRepNode(row).getAttribute("ruleId");
+if(this.context.selectorMap&&this.context.selectorMap.hasOwnProperty(ruleId)){var map=this.context.selectorMap[ruleId];
+for(var i=0;
+i<map.length;
+++i){if(map[i].name==propName){map.splice(i,1);
+break
+}}}if(this.name=="stylesheet"){dispatch([Firebug.A11yModel],"onInlineEditorClose",[this,row.firstChild,true])
+}row.parentNode.removeChild(row);
+this.markChange(this.name=="stylesheet")
+},disablePropertyRow:function(row){toggleClass(row,"disabledStyle");
+var rule=Firebug.getRepObject(row);
+var propName=getChildByClass(row,"cssPropName")[textContent];
+if(!this.context.selectorMap){this.context.selectorMap={}
+}var ruleId=Firebug.getRepNode(row).getAttribute("ruleId");
+if(!(this.context.selectorMap.hasOwnProperty(ruleId))){this.context.selectorMap[ruleId]=[]
+}var map=this.context.selectorMap[ruleId];
+var propValue=getChildByClass(row,"cssPropValue")[textContent];
+var parsedValue=parsePriority(propValue);
+if(hasClass(row,"disabledStyle")){Firebug.CSSModule.removeProperty(rule,propName);
+map.push({name:propName,value:parsedValue.value,important:parsedValue.priority})
+}else{Firebug.CSSModule.setProperty(rule,propName,parsedValue.value,parsedValue.priority);
+var index=findPropByName(map,propName);
+map.splice(index,1)
+}this.markChange(this.name=="stylesheet")
+},onMouseDown:function(event){var offset=event.clientX-this.panelNode.parentNode.offsetLeft;
+if(!isLeftClick(event)||offset>20){return
+}var target=event.target||event.srcElement;
+if(hasClass(target,"textEditor")){return
+}var row=getAncestorByClass(target,"cssProp");
+if(row&&hasClass(row,"editGroup")){this.disablePropertyRow(row);
+cancelEvent(event)
+}},onDoubleClick:function(event){var offset=event.clientX-this.panelNode.parentNode.offsetLeft;
+if(!isLeftClick(event)||offset<=20){return
+}var target=event.target||event.srcElement;
+if(hasClass(target,"textEditorInner")){return
+}var row=getAncestorByClass(target,"cssRule");
+if(row&&!getAncestorByClass(target,"cssPropName")&&!getAncestorByClass(target,"cssPropValue")){this.insertPropertyRow(row);
+cancelEvent(event)
+}},name:"stylesheet",title:"CSS",parentPanel:null,searchable:true,dependents:["css","stylesheet","dom","domSide","layout"],options:{hasToolButtons:true},create:function(){Firebug.Panel.create.apply(this,arguments);
+this.onMouseDown=bind(this.onMouseDown,this);
+this.onDoubleClick=bind(this.onDoubleClick,this);
+if(this.name=="stylesheet"){this.onChangeSelect=bind(this.onChangeSelect,this);
+var doc=Firebug.browser.document;
+var selectNode=this.selectNode=createElement("select");
+processAllStyleSheets(doc,function(doc,styleSheet){var key=StyleSheetCache.key(styleSheet);
+var fileName=getFileName(styleSheet.href)||getFileName(doc.location.href);
+var option=createElement("option",{value:key});
+option.appendChild(Firebug.chrome.document.createTextNode(fileName));
+selectNode.appendChild(option)
+});
+this.toolButtonsNode.appendChild(selectNode)
+}},onChangeSelect:function(event){event=event||window.event;
+var target=event.srcElement||event.currentTarget;
+var key=target.value;
+var styleSheet=StyleSheetCache.get(key);
+this.updateLocation(styleSheet)
+},initialize:function(){Firebug.Panel.initialize.apply(this,arguments);
+this.context=Firebug.chrome;
+this.document=Firebug.chrome.document;
+this.initializeNode();
+if(this.name=="stylesheet"){var styleSheets=Firebug.browser.document.styleSheets;
+if(styleSheets.length>0){addEvent(this.selectNode,"change",this.onChangeSelect);
+this.updateLocation(styleSheets[0])
+}}},shutdown:function(){Firebug.Editor.stopEditing();
+if(this.name=="stylesheet"){removeEvent(this.selectNode,"change",this.onChangeSelect)
+}this.destroyNode();
+Firebug.Panel.shutdown.apply(this,arguments)
+},destroy:function(state){Firebug.Panel.destroy.apply(this,arguments)
+},initializeNode:function(oldPanelNode){addEvent(this.panelNode,"mousedown",this.onMouseDown);
+addEvent(this.panelNode,"dblclick",this.onDoubleClick)
+},destroyNode:function(){removeEvent(this.panelNode,"mousedown",this.onMouseDown);
+removeEvent(this.panelNode,"dblclick",this.onDoubleClick)
+},ishow:function(state){Firebug.Inspector.stopInspecting(true);
+this.showToolbarButtons("fbCSSButtons",true);
+if(this.context.loaded&&!this.location){restoreObjects(this,state);
+if(!this.location){this.location=this.getDefaultLocation()
+}if(state&&state.scrollTop){this.panelNode.scrollTop=state.scrollTop
+}}},ihide:function(){this.showToolbarButtons("fbCSSButtons",false);
+this.lastScrollTop=this.panelNode.scrollTop
+},supportsObject:function(object){if(object instanceof CSSStyleSheet){return 1
+}else{if(object instanceof CSSStyleRule){return 2
+}else{if(object instanceof CSSStyleDeclaration){return 2
+}else{if(object instanceof SourceLink&&object.type=="css"&&reCSS.test(object.href)){return 2
+}else{return 0
+}}}}},updateLocation:function(styleSheet){if(!styleSheet){return
+}if(styleSheet.editStyleSheet){styleSheet=styleSheet.editStyleSheet.sheet
+}if(styleSheet.restricted){FirebugReps.Warning.tag.replace({object:"AccessRestricted"},this.panelNode);
+externalStyleSheetWarning.tag.append({object:"The stylesheet could not be loaded due to access restrictions. ",link:"more...",href:"http://getfirebug.com/wiki/index.php/Firebug_Lite_FAQ#I_keep_seeing_.22Access_to_restricted_URI_denied.22"},this.panelNode);
+return
+}var rules=this.getStyleSheetRules(this.context,styleSheet);
+var result;
+if(rules.length){result=this.template.tag.replace({rules:rules},this.panelNode)
+}else{result=FirebugReps.Warning.tag.replace({object:"EmptyStyleSheet"},this.panelNode)
+}},updateSelection:function(object){this.selection=null;
+if(object instanceof CSSStyleDeclaration){object=object.parentRule
+}if(object instanceof CSSStyleRule){this.navigate(object.parentStyleSheet);
+this.highlightRule(object)
+}else{if(object instanceof CSSStyleSheet){this.navigate(object)
+}else{if(object instanceof SourceLink){try{var sourceLink=object;
+var sourceFile=getSourceFileByHref(sourceLink.href,this.context);
+if(sourceFile){clearNode(this.panelNode);
+this.showSourceFile(sourceFile);
+var lineNo=object.line;
+if(lineNo){this.scrollToLine(lineNo,this.jumpHighlightFactory(lineNo,this.context))
+}}else{var stylesheet=getStyleSheetByHref(sourceLink.href,this.context);
+if(stylesheet){this.navigate(stylesheet)
+}else{if(FBTrace.DBG_CSS){FBTrace.sysout("css.updateSelection no sourceFile for "+sourceLink.href,sourceLink)
+}}}}catch(exc){if(FBTrace.DBG_CSS){FBTrace.sysout("css.upDateSelection FAILS "+exc,exc)
+}}}}}},updateOption:function(name,value){if(name=="expandShorthandProps"){this.refresh()
+}},getLocationList:function(){var styleSheets=getAllStyleSheets(this.context);
+return styleSheets
+},getOptionsMenuItems:function(){return[{label:"Expand Shorthand Properties",type:"checkbox",checked:Firebug.expandShorthandProps,command:bindFixed(Firebug.togglePref,Firebug,"expandShorthandProps")},"-",{label:"Refresh",command:bind(this.refresh,this)}]
+},getContextMenuItems:function(style,target){var items=[];
+if(this.infoTipType=="color"){items.push({label:"CopyColor",command:bindFixed(copyToClipboard,FBL,this.infoTipObject)})
+}else{if(this.infoTipType=="image"){items.push({label:"CopyImageLocation",command:bindFixed(copyToClipboard,FBL,this.infoTipObject)},{label:"OpenImageInNewTab",command:bindFixed(openNewTab,FBL,this.infoTipObject)})
+}}if(isElement(this.selection)){items.push({label:"EditStyle",command:bindFixed(this.editElementStyle,this)})
+}else{if(!isSystemStyleSheet(this.selection)){items.push({label:"NewRule",command:bindFixed(this.insertRule,this,target)})
+}}var cssRule=getAncestorByClass(target,"cssRule");
+if(cssRule&&hasClass(cssRule,"cssEditableRule")){items.push("-",{label:"NewProp",command:bindFixed(this.insertPropertyRow,this,target)});
+var propRow=getAncestorByClass(target,"cssProp");
+if(propRow){var propName=getChildByClass(propRow,"cssPropName")[textContent];
+var isDisabled=hasClass(propRow,"disabledStyle");
+items.push({label:$STRF("EditProp",[propName]),nol10n:true,command:bindFixed(this.editPropertyRow,this,propRow)},{label:$STRF("DeleteProp",[propName]),nol10n:true,command:bindFixed(this.deletePropertyRow,this,propRow)},{label:$STRF("DisableProp",[propName]),nol10n:true,type:"checkbox",checked:isDisabled,command:bindFixed(this.disablePropertyRow,this,propRow)})
+}}items.push("-",{label:"Refresh",command:bind(this.refresh,this)});
+return items
+},browseObject:function(object){if(this.infoTipType=="image"){openNewTab(this.infoTipObject);
+return true
+}},showInfoTip:function(infoTip,target,x,y){var propValue=getAncestorByClass(target,"cssPropValue");
+if(propValue){var offset=getClientOffset(propValue);
+var offsetX=x-offset.x;
+var text=propValue[textContent];
+var charWidth=propValue.offsetWidth/text.length;
+var charOffset=Math.floor(offsetX/charWidth);
+var cssValue=parseCSSValue(text,charOffset);
+if(cssValue){if(cssValue.value==this.infoTipValue){return true
+}this.infoTipValue=cssValue.value;
+if(cssValue.type=="rgb"||(!cssValue.type&&isColorKeyword(cssValue.value))){this.infoTipType="color";
+this.infoTipObject=cssValue.value;
+return Firebug.InfoTip.populateColorInfoTip(infoTip,cssValue.value)
+}else{if(cssValue.type=="url"){var propNameNode=target.parentNode.getElementsByClassName("cssPropName").item(0);
+if(propNameNode&&isImageRule(propNameNode[textContent])){var rule=Firebug.getRepObject(target);
+var baseURL=this.getStylesheetURL(rule);
+var relURL=parseURLValue(cssValue.value);
+var absURL=isDataURL(relURL)?relURL:absoluteURL(relURL,baseURL);
+var repeat=parseRepeatValue(text);
+this.infoTipType="image";
+this.infoTipObject=absURL;
+return Firebug.InfoTip.populateImageInfoTip(infoTip,absURL,repeat)
+}}}}}delete this.infoTipType;
+delete this.infoTipValue;
+delete this.infoTipObject
+},getEditor:function(target,value){if(target==this.panelNode||hasClass(target,"cssSelector")||hasClass(target,"cssRule")||hasClass(target,"cssSheet")){if(!this.ruleEditor){this.ruleEditor=new CSSRuleEditor(this.document)
+}return this.ruleEditor
+}else{if(!this.editor){this.editor=new CSSEditor(this.document)
+}return this.editor
+}},getDefaultLocation:function(){try{var styleSheets=this.context.window.document.styleSheets;
+if(styleSheets.length){var sheet=styleSheets[0];
+return(Firebug.filterSystemURLs&&isSystemURL(getURLForStyleSheet(sheet)))?null:sheet
+}}catch(exc){if(FBTrace.DBG_LOCATIONS){FBTrace.sysout("css.getDefaultLocation FAILS "+exc,exc)
+}}},getObjectDescription:function(styleSheet){var url=getURLForStyleSheet(styleSheet);
+var instance=getInstanceForStyleSheet(styleSheet);
+var baseDescription=splitURLBase(url);
+if(instance){baseDescription.name=baseDescription.name+" #"+(instance+1)
+}return baseDescription
+},search:function(text,reverse){var curDoc=this.searchCurrentDoc(!Firebug.searchGlobal,text,reverse);
+if(!curDoc&&Firebug.searchGlobal){return this.searchOtherDocs(text,reverse)
+}return curDoc
+},searchOtherDocs:function(text,reverse){var scanRE=Firebug.Search.getTestingRegex(text);
+function scanDoc(styleSheet){for(var i=0;
+i<styleSheet.cssRules.length;
+i++){if(scanRE.test(styleSheet.cssRules[i].cssText)){return true
+}}}if(this.navigateToNextDocument(scanDoc,reverse)){return this.searchCurrentDoc(true,text,reverse)
+}},searchCurrentDoc:function(wrapSearch,text,reverse){if(!text){delete this.currentSearch;
+return false
+}var row;
+if(this.currentSearch&&text==this.currentSearch.text){row=this.currentSearch.findNext(wrapSearch,false,reverse,Firebug.Search.isCaseSensitive(text))
+}else{if(this.editing){this.currentSearch=new TextSearch(this.stylesheetEditor.box);
+row=this.currentSearch.find(text,reverse,Firebug.Search.isCaseSensitive(text));
+if(row){var sel=this.document.defaultView.getSelection();
+sel.removeAllRanges();
+sel.addRange(this.currentSearch.range);
+scrollSelectionIntoView(this);
+return true
+}else{return false
+}}else{function findRow(node){return node.nodeType==1?node:node.parentNode
+}this.currentSearch=new TextSearch(this.panelNode,findRow);
+row=this.currentSearch.find(text,reverse,Firebug.Search.isCaseSensitive(text))
+}}if(row){this.document.defaultView.getSelection().selectAllChildren(row);
+scrollIntoCenterView(row,this.panelNode);
+dispatch([Firebug.A11yModel],"onCSSSearchMatchFound",[this,text,row]);
+return true
+}else{dispatch([Firebug.A11yModel],"onCSSSearchMatchFound",[this,text,null]);
+return false
+}},getSearchOptionsMenuItems:function(){return[Firebug.Search.searchOptionMenu("search.Case_Sensitive","searchCaseSensitive"),Firebug.Search.searchOptionMenu("search.Multiple_Files","searchGlobal")]
+}});
+function CSSElementPanel(){}CSSElementPanel.prototype=extend(Firebug.CSSStyleSheetPanel.prototype,{template:domplate({cascadedTag:DIV({"class":"a11yCSSView",role:"presentation"},DIV({role:"list","aria-label":$STR("aria.labels.style rules")},FOR("rule","$rules",TAG("$ruleTag",{rule:"$rule"}))),DIV({role:"list","aria-label":$STR("aria.labels.inherited style rules")},FOR("section","$inherited",H1({"class":"cssInheritHeader groupHeader focusRow",role:"listitem"},SPAN({"class":"cssInheritLabel"},"$inheritLabel"),TAG(FirebugReps.Element.shortTag,{object:"$section.element"})),DIV({role:"group"},FOR("rule","$section.rules",TAG("$ruleTag",{rule:"$rule"})))))),ruleTag:isIE?DIV({"class":"cssElementRuleContainer"},TAG(FirebugReps.SourceLink.tag,{object:"$rule.sourceLink"}),TAG(CSSStyleRuleTag.tag,{rule:"$rule"})):DIV({"class":"cssElementRuleContainer"},TAG(CSSStyleRuleTag.tag,{rule:"$rule"}),TAG(FirebugReps.SourceLink.tag,{object:"$rule.sourceLink"}))}),updateCascadeView:function(element){var rules=[],sections=[],usedProps={};
+this.getInheritedRules(element,sections,usedProps);
+this.getElementRules(element,rules,usedProps);
+if(rules.length||sections.length){var inheritLabel="Inherited from";
+var result=this.template.cascadedTag.replace({rules:rules,inherited:sections,inheritLabel:inheritLabel},this.panelNode)
+}else{var result=FirebugReps.Warning.tag.replace({object:"EmptyElementCSS"},this.panelNode)
+}if(externalStyleSheetURLs.length>0){externalStyleSheetWarning.tag.append({object:"The results here may be inaccurate because some stylesheets could not be loaded due to access restrictions. ",link:"more...",href:"http://getfirebug.com/wiki/index.php/Firebug_Lite_FAQ#I_keep_seeing_.22This_element_has_no_style_rules.22"},this.panelNode)
+}},getStylesheetURL:function(rule){if(rule&&rule.parentStyleSheet.href){return rule.parentStyleSheet.href
+}else{return this.selection.ownerDocument.location.href
+}},getInheritedRules:function(element,sections,usedProps){var parent=element.parentNode;
+if(parent&&parent.nodeType==1){this.getInheritedRules(parent,sections,usedProps);
+var rules=[];
+this.getElementRules(parent,rules,usedProps,true);
+if(rules.length){sections.splice(0,0,{element:parent,rules:rules})
+}}},getElementRules:function(element,rules,usedProps,inheritMode){var inspectedRules,displayedRules={};
+inspectedRules=getElementCSSRules(element);
+if(inspectedRules){for(var i=0,length=inspectedRules.length;
+i<length;
+++i){var ruleId=inspectedRules[i];
+var ruleData=CSSRuleMap[ruleId];
+var rule=ruleData.rule;
+var ssid=ruleData.styleSheetId;
+var parentStyleSheet=StyleSheetCache.get(ssid);
+var href=parentStyleSheet.href;
+var instance=null;
+var isSystemSheet=false;
+if(!Firebug.showUserAgentCSS&&isSystemSheet){continue
+}if(!href){href=element.ownerDocument.location.href
+}var props=this.getRuleProperties(this.context,rule,inheritMode);
+if(inheritMode&&!props.length){continue
+}var line;
+var ruleId=rule.selectorText+"/"+line;
+var sourceLink=new SourceLink(href,line,"css",rule,instance);
+this.markOverridenProps(props,usedProps,inheritMode);
+rules.splice(0,0,{rule:rule,id:ruleId,selector:ruleData.selector,sourceLink:sourceLink,props:props,inherited:inheritMode,isSystemSheet:isSystemSheet})
+}}if(element.style){this.getStyleProperties(element,rules,usedProps,inheritMode)
+}if(FBTrace.DBG_CSS){FBTrace.sysout("getElementRules "+rules.length+" rules for "+getElementXPath(element),rules)
+}},markOverridenProps:function(props,usedProps,inheritMode){for(var i=0;
+i<props.length;
+++i){var prop=props[i];
+if(usedProps.hasOwnProperty(prop.name)){var deadProps=usedProps[prop.name];
+for(var j=0;
+j<deadProps.length;
+++j){var deadProp=deadProps[j];
+if(!deadProp.disabled&&!deadProp.wasInherited&&deadProp.important&&!prop.important){prop.overridden=true
+}else{if(!prop.disabled){deadProp.overridden=true
+}}}}else{usedProps[prop.name]=[]
+}prop.wasInherited=inheritMode?true:false;
+usedProps[prop.name].push(prop)
+}},getStyleProperties:function(element,rules,usedProps,inheritMode){var props=this.parseCSSProps(element.style,inheritMode);
+this.addOldProperties(this.context,getElementXPath(element),inheritMode,props);
+sortProperties(props);
+this.markOverridenProps(props,usedProps,inheritMode);
+if(props.length){rules.splice(0,0,{rule:element,id:getElementXPath(element),selector:"element.style",props:props,inherited:inheritMode})
+}},name:"css",title:"Style",parentPanel:"HTML",order:0,initialize:function(){this.context=Firebug.chrome;
+this.document=Firebug.chrome.document;
+Firebug.CSSStyleSheetPanel.prototype.initialize.apply(this,arguments);
+var selection=documentCache[FirebugChrome.selectedHTMLElementId];
+if(selection){this.select(selection,true)
+}},ishow:function(state){},watchWindow:function(win){if(domUtils){var doc=win.document
+}},unwatchWindow:function(win){var doc=win.document;
+if(isAncestor(this.stateChangeEl,doc)){this.removeStateChangeHandlers()
+}},supportsObject:function(object){return object instanceof Element?1:0
+},updateView:function(element){this.updateCascadeView(element);
+if(domUtils){this.contentState=safeGetContentState(element);
+this.addStateChangeHandlers(element)
+}},updateSelection:function(element){if(!instanceOf(element,"Element")){return
+}if(sothinkInstalled){FirebugReps.Warning.tag.replace({object:"SothinkWarning"},this.panelNode);
+return
+}if(!element){return
+}this.updateView(element)
+},updateOption:function(name,value){if(name=="showUserAgentCSS"||name=="expandShorthandProps"){this.refresh()
+}},getOptionsMenuItems:function(){var ret=[{label:"Show User Agent CSS",type:"checkbox",checked:Firebug.showUserAgentCSS,command:bindFixed(Firebug.togglePref,Firebug,"showUserAgentCSS")},{label:"Expand Shorthand Properties",type:"checkbox",checked:Firebug.expandShorthandProps,command:bindFixed(Firebug.togglePref,Firebug,"expandShorthandProps")}];
+if(domUtils&&this.selection){var state=safeGetContentState(this.selection);
+ret.push("-");
+ret.push({label:":active",type:"checkbox",checked:state&STATE_ACTIVE,command:bindFixed(this.updateContentState,this,STATE_ACTIVE,state&STATE_ACTIVE)});
+ret.push({label:":hover",type:"checkbox",checked:state&STATE_HOVER,command:bindFixed(this.updateContentState,this,STATE_HOVER,state&STATE_HOVER)})
+}return ret
+},updateContentState:function(state,remove){domUtils.setContentState(remove?this.selection.ownerDocument.documentElement:this.selection,state);
+this.refresh()
+},addStateChangeHandlers:function(el){this.removeStateChangeHandlers();
+this.stateChangeEl=el
+},removeStateChangeHandlers:function(){var sel=this.stateChangeEl;
+if(sel){}},contentStateCheck:function(state){if(!state||this.contentState&state){var timeoutRunner=bindFixed(function(){var newState=safeGetContentState(this.selection);
+if(newState!=this.contentState){this.context.invalidatePanels(this.name)
+}},this);
+setTimeout(timeoutRunner,0)
+}}});
+function safeGetContentState(selection){try{return domUtils.getContentState(selection)
+}catch(e){if(FBTrace.DBG_ERRORS){FBTrace.sysout("css.safeGetContentState; EXCEPTION",e)
+}}}function CSSComputedElementPanel(){}CSSComputedElementPanel.prototype=extend(CSSElementPanel.prototype,{template:domplate({computedTag:DIV({"class":"a11yCSSView",role:"list","aria-label":$STR("aria.labels.computed styles")},FOR("group","$groups",H1({"class":"cssInheritHeader groupHeader focusRow",role:"listitem"},SPAN({"class":"cssInheritLabel"},"$group.title")),TABLE({width:"100%",role:"group"},TBODY({role:"presentation"},FOR("prop","$group.props",TR({"class":"focusRow computedStyleRow",role:"listitem"},TD({"class":"stylePropName",role:"presentation"},"$prop.name"),TD({"class":"stylePropValue",role:"presentation"},"$prop.value")))))))}),updateComputedView:function(element){var win=isIE?element.ownerDocument.parentWindow:element.ownerDocument.defaultView;
+var style=isIE?element.currentStyle:win.getComputedStyle(element,"");
+var groups=[];
+for(var groupName in styleGroups){var title=styleGroupTitles[groupName];
+var group={title:title,props:[]};
+groups.push(group);
+var props=styleGroups[groupName];
+for(var i=0;
+i<props.length;
+++i){var propName=props[i];
+var propValue=style.getPropertyValue?style.getPropertyValue(propName):""+style[toCamelCase(propName)];
+if(propValue===undefined||propValue===null){continue
+}propValue=stripUnits(rgbToHex(propValue));
+if(propValue){group.props.push({name:propName,value:propValue})
+}}}var result=this.template.computedTag.replace({groups:groups},this.panelNode)
+},name:"computed",title:"Computed",parentPanel:"HTML",order:1,updateView:function(element){this.updateComputedView(element)
+},getOptionsMenuItems:function(){return[{label:"Refresh",command:bind(this.refresh,this)}]
+}});
+function CSSEditor(doc){this.initializeInline(doc)
+}CSSEditor.prototype=domplate(Firebug.InlineEditor.prototype,{insertNewRow:function(target,insertWhere){var rule=Firebug.getRepObject(target);
+var emptyProp={name:"",value:"",important:""};
+if(insertWhere=="before"){return CSSPropTag.tag.insertBefore({prop:emptyProp,rule:rule},target)
+}else{return CSSPropTag.tag.insertAfter({prop:emptyProp,rule:rule},target)
+}},saveEdit:function(target,value,previousValue){if(!value){return
+}target.innerHTML=escapeForCss(value);
+var row=getAncestorByClass(target,"cssProp");
+if(hasClass(row,"disabledStyle")){toggleClass(row,"disabledStyle")
+}var rule=Firebug.getRepObject(target);
+if(hasClass(target,"cssPropName")){if(value&&previousValue!=value){var propValue=getChildByClass(row,"cssPropValue")[textContent];
+var parsedValue=parsePriority(propValue);
+if(propValue&&propValue!="undefined"){if(FBTrace.DBG_CSS){FBTrace.sysout("CSSEditor.saveEdit : "+previousValue+"->"+value+" = "+propValue+"\n")
+}if(previousValue){Firebug.CSSModule.removeProperty(rule,previousValue)
+}Firebug.CSSModule.setProperty(rule,value,parsedValue.value,parsedValue.priority)
+}}else{if(!value){Firebug.CSSModule.removeProperty(rule,previousValue)
+}}}else{if(getAncestorByClass(target,"cssPropValue")){var propName=getChildByClass(row,"cssPropName")[textContent];
+var propValue=getChildByClass(row,"cssPropValue")[textContent];
+if(FBTrace.DBG_CSS){FBTrace.sysout("CSSEditor.saveEdit propName=propValue: "+propName+" = "+propValue+"\n")
+}if(value&&value!="null"){var parsedValue=parsePriority(value);
+Firebug.CSSModule.setProperty(rule,propName,parsedValue.value,parsedValue.priority)
+}else{if(previousValue&&previousValue!="null"){Firebug.CSSModule.removeProperty(rule,propName)
+}}}}this.panel.markChange(this.panel.name=="stylesheet")
+},advanceToNext:function(target,charCode){if(charCode==58&&hasClass(target,"cssPropName")){return true
+}},getAutoCompleteRange:function(value,offset){if(hasClass(this.target,"cssPropName")){return{start:0,end:value.length-1}
+}else{return parseCSSValue(value,offset)
+}},getAutoCompleteList:function(preExpr,expr,postExpr){if(hasClass(this.target,"cssPropName")){return getCSSPropertyNames()
+}else{var row=getAncestorByClass(this.target,"cssProp");
+var propName=getChildByClass(row,"cssPropName")[textContent];
+return getCSSKeywordsByProperty(propName)
+}}});
+function CSSRuleEditor(doc){this.initializeInline(doc);
+this.completeAsYouType=false
+}CSSRuleEditor.uniquifier=0;
+CSSRuleEditor.prototype=domplate(Firebug.InlineEditor.prototype,{insertNewRow:function(target,insertWhere){var emptyRule={selector:"",id:"",props:[],isSelectorEditable:true};
+if(insertWhere=="before"){return CSSStyleRuleTag.tag.insertBefore({rule:emptyRule},target)
+}else{return CSSStyleRuleTag.tag.insertAfter({rule:emptyRule},target)
+}},saveEdit:function(target,value,previousValue){if(FBTrace.DBG_CSS){FBTrace.sysout("CSSRuleEditor.saveEdit: '"+value+"'  '"+previousValue+"'",target)
+}target.innerHTML=escapeForCss(value);
+if(value===previousValue){return
+}var row=getAncestorByClass(target,"cssRule");
+var styleSheet=this.panel.location;
+styleSheet=styleSheet.editStyleSheet?styleSheet.editStyleSheet.sheet:styleSheet;
+var cssRules=styleSheet.cssRules;
+var rule=Firebug.getRepObject(target),oldRule=rule;
+var ruleIndex=cssRules.length;
+if(rule||Firebug.getRepObject(row.nextSibling)){var searchRule=rule||Firebug.getRepObject(row.nextSibling);
+for(ruleIndex=0;
+ruleIndex<cssRules.length&&searchRule!=cssRules[ruleIndex];
+ruleIndex++){}}if(oldRule){Firebug.CSSModule.deleteRule(styleSheet,ruleIndex)
+}if(value){var cssText=[value,"{",];
+var props=row.getElementsByClassName("cssProp");
+for(var i=0;
+i<props.length;
+i++){var propEl=props[i];
+if(!hasClass(propEl,"disabledStyle")){cssText.push(getChildByClass(propEl,"cssPropName")[textContent]);
+cssText.push(":");
+cssText.push(getChildByClass(propEl,"cssPropValue")[textContent]);
+cssText.push(";")
+}}cssText.push("}");
+cssText=cssText.join("");
+try{var insertLoc=Firebug.CSSModule.insertRule(styleSheet,cssText,ruleIndex);
+rule=cssRules[insertLoc];
+ruleIndex++
+}catch(err){if(FBTrace.DBG_CSS||FBTrace.DBG_ERRORS){FBTrace.sysout("CSS Insert Error: "+err,err)
+}target.innerHTML=escapeForCss(previousValue);
+row.repObject=undefined;
+return
+}}else{rule=undefined
+}row.repObject=rule;
+if(!oldRule){var ruleId="new/"+value+"/"+(++CSSRuleEditor.uniquifier);
+row.setAttribute("ruleId",ruleId)
+}this.panel.markChange(this.panel.name=="stylesheet")
+}});
+function StyleSheetEditor(doc){this.box=this.tag.replace({},doc,this);
+this.input=this.box.firstChild
+}StyleSheetEditor.prototype=domplate(Firebug.BaseEditor,{multiLine:true,tag:DIV(TEXTAREA({"class":"styleSheetEditor fullPanelEditor",oninput:"$onInput"})),getValue:function(){return this.input.value
+},setValue:function(value){return this.input.value=value
+},show:function(target,panel,value,textSize,targetSize){this.target=target;
+this.panel=panel;
+this.panel.panelNode.appendChild(this.box);
+this.input.value=value;
+this.input.focus();
+var command=Firebug.chrome.$("cmd_toggleCSSEditing");
+command.setAttribute("checked",true)
+},hide:function(){var command=Firebug.chrome.$("cmd_toggleCSSEditing");
+command.setAttribute("checked",false);
+if(this.box.parentNode==this.panel.panelNode){this.panel.panelNode.removeChild(this.box)
+}delete this.target;
+delete this.panel;
+delete this.styleSheet
+},saveEdit:function(target,value,previousValue){Firebug.CSSModule.freeEdit(this.styleSheet,value)
+},endEditing:function(){this.panel.refresh();
+return true
+},onInput:function(){Firebug.Editor.update()
+},scrollToLine:function(line,offset){this.startMeasuring(this.input);
+var lineHeight=this.measureText().height;
+this.stopMeasuring();
+this.input.scrollTop=(line*lineHeight)+offset
+}});
+var rgbToHex=function rgbToHex(value){return value.replace(/\brgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)/gi,rgbToHexReplacer)
+};
+var rgbToHexReplacer=function(_,r,g,b){return"#"+((1<<24)+(r<<16)+(g<<8)+(b<<0)).toString(16).substr(-6).toUpperCase()
+};
+var stripUnits=function stripUnits(value){return value.replace(/(url\(.*?\)|[^0]\S*\s*)|0(%|em|ex|px|in|cm|mm|pt|pc)(\s|$)/gi,stripUnitsReplacer)
+};
+var stripUnitsReplacer=function(_,skip,remove,whitespace){return skip||("0"+whitespace)
+};
+function parsePriority(value){var rePriority=/(.*?)\s*(!important)?$/;
+var m=rePriority.exec(value);
+var propValue=m?m[1]:"";
+var priority=m&&m[2]?"important":"";
+return{value:propValue,priority:priority}
+}function parseURLValue(value){var m=reURL.exec(value);
+return m?m[1]:""
+}function parseRepeatValue(value){var m=reRepeat.exec(value);
+return m?m[0]:""
+}function parseCSSValue(value,offset){var start=0;
+var m;
+while(1){m=reSplitCSS.exec(value);
+if(m&&m.index+m[0].length<offset){value=value.substr(m.index+m[0].length);
+start+=m.index+m[0].length;
+offset-=m.index+m[0].length
+}else{break
+}}if(m){var type;
+if(m[1]){type="url"
+}else{if(m[2]||m[3]){type="rgb"
+}else{if(m[4]){type="int"
+}}}return{value:m[0],start:start+m.index,end:start+m.index+(m[0].length-1),type:type}
+}}function findPropByName(props,name){for(var i=0;
+i<props.length;
+++i){if(props[i].name==name){return i
+}}}function sortProperties(props){props.sort(function(a,b){return a.name>b.name?1:-1
+})
+}function getTopmostRuleLine(panelNode){for(var child=panelNode.firstChild;
+child;
+child=child.nextSibling){if(child.offsetTop+child.offsetHeight>panelNode.scrollTop){var rule=child.repObject;
+if(rule){return{line:domUtils.getRuleLine(rule),offset:panelNode.scrollTop-child.offsetTop}
+}}}return 0
+}function getStyleSheetCSS(sheet,context){if(sheet.ownerNode instanceof HTMLStyleElement){return sheet.ownerNode.innerHTML
+}else{return context.sourceCache.load(sheet.href).join("")
+}}function getStyleSheetOwnerNode(sheet){for(;
+sheet&&!sheet.ownerNode;
+sheet=sheet.parentStyleSheet){}return sheet.ownerNode
+}function scrollSelectionIntoView(panel){var selCon=getSelectionController(panel);
+selCon.scrollSelectionIntoView(nsISelectionController.SELECTION_NORMAL,nsISelectionController.SELECTION_FOCUS_REGION,true)
+}function getSelectionController(panel){var browser=Firebug.chrome.getPanelBrowser(panel);
+return browser.docShell.QueryInterface(nsIInterfaceRequestor).getInterface(nsISelectionDisplay).QueryInterface(nsISelectionController)
+}Firebug.registerModule(Firebug.CSSModule);
+Firebug.registerPanel(Firebug.CSSStyleSheetPanel);
+Firebug.registerPanel(CSSElementPanel);
+Firebug.registerPanel(CSSComputedElementPanel)
+}});
+FBL.ns(function(){with(FBL){Firebug.Script=extend(Firebug.Module,{getPanel:function(){return Firebug.chrome?Firebug.chrome.getPanel("Script"):null
+},selectSourceCode:function(index){this.getPanel().selectSourceCode(index)
+}});
+Firebug.registerModule(Firebug.Script);
+function ScriptPanel(){}ScriptPanel.prototype=extend(Firebug.Panel,{name:"Script",title:"Script",selectIndex:0,sourceIndex:-1,options:{hasToolButtons:true},create:function(){Firebug.Panel.create.apply(this,arguments);
+this.onChangeSelect=bind(this.onChangeSelect,this);
+var doc=Firebug.browser.document;
+var scripts=doc.getElementsByTagName("script");
+var selectNode=this.selectNode=createElement("select");
+for(var i=0,script;
+script=scripts[i];
+i++){if(Firebug.ignoreFirebugElements&&script.getAttribute("firebugIgnore")){continue
+}var fileName=getFileName(script.src)||getFileName(doc.location.href);
+var option=createElement("option",{value:i});
+option.appendChild(Firebug.chrome.document.createTextNode(fileName));
+selectNode.appendChild(option)
+}this.toolButtonsNode.appendChild(selectNode)
+},initialize:function(){this.selectSourceCode(this.selectIndex);
+Firebug.Panel.initialize.apply(this,arguments);
+addEvent(this.selectNode,"change",this.onChangeSelect)
+},shutdown:function(){removeEvent(this.selectNode,"change",this.onChangeSelect);
+Firebug.Panel.shutdown.apply(this,arguments)
+},detach:function(oldChrome,newChrome){Firebug.Panel.detach.apply(this,arguments);
+var oldPanel=oldChrome.getPanel("Script");
+var index=oldPanel.selectIndex;
+this.selectNode.selectedIndex=index;
+this.selectIndex=index;
+this.sourceIndex=-1
+},onChangeSelect:function(event){var select=this.selectNode;
+this.selectIndex=select.selectedIndex;
+var option=select.options[select.selectedIndex];
+if(!option){return
+}var selectedSourceIndex=parseInt(option.value);
+this.renderSourceCode(selectedSourceIndex)
+},selectSourceCode:function(index){var select=this.selectNode;
+select.selectedIndex=index;
+var option=select.options[index];
+if(!option){return
+}var selectedSourceIndex=parseInt(option.value);
+this.renderSourceCode(selectedSourceIndex)
+},renderSourceCode:function(index){if(this.sourceIndex!=index){var renderProcess=function renderProcess(src){var html=[],hl=0;
+src=isIE&&!isExternal?src+"\n":"\n"+src;
+src=src.replace(/\n\r|\r\n/g,"\n");
+var match=src.match(/[\n]/g);
+var lines=match?match.length:0;
+html[hl++]='<div><div class="sourceBox" style="left:';
+html[hl++]=35+7*(lines+"").length;
+html[hl++]='px;"><pre class="sourceCode">';
+html[hl++]=escapeHTML(src);
+html[hl++]='</pre></div><div class="lineNo">';
+for(var l=1,lines;
+l<=lines;
+l++){html[hl++]='<div line="';
+html[hl++]=l;
+html[hl++]='">';
+html[hl++]=l;
+html[hl++]="</div>"
+}html[hl++]="</div></div>";
+updatePanel(html)
+};
+var updatePanel=function(html){self.panelNode.innerHTML=html.join("");
+setTimeout(function(){self.synchronizeUI()
+},0)
+};
+var onFailure=function(){FirebugReps.Warning.tag.replace({object:"AccessRestricted"},self.panelNode)
+};
+var self=this;
+var doc=Firebug.browser.document;
+var script=doc.getElementsByTagName("script")[index];
+var url=getScriptURL(script);
+var isExternal=url&&url!=doc.location.href;
+try{if(isExternal){Ajax.request({url:url,onSuccess:renderProcess,onFailure:onFailure})
+}else{var src=script.innerHTML;
+renderProcess(src)
+}}catch(e){onFailure()
+}this.sourceIndex=index
+}}});
+Firebug.registerPanel(ScriptPanel);
+var getScriptURL=function getScriptURL(script){var reFile=/([^\/\?#]+)(#.+)?$/;
+var rePath=/^(.*\/)/;
+var reProtocol=/^\w+:\/\//;
+var path=null;
+var doc=Firebug.browser.document;
+var file=reFile.exec(script.src);
+if(file){var fileName=file[1];
+var fileOptions=file[2];
+if(reProtocol.test(script.src)){path=rePath.exec(script.src)[1]
+}else{var r=rePath.exec(script.src);
+var src=r?r[1]:script.src;
+var backDir=/^((?:\.\.\/)+)(.*)/.exec(src);
+var reLastDir=/^(.*\/)[^\/]+\/$/;
+path=rePath.exec(doc.location.href)[1];
+if(backDir){var j=backDir[1].length/3;
+var p;
+while(j-->0){path=reLastDir.exec(path)[1]
+}path+=backDir[2]
+}else{if(src.indexOf("/")!=-1){if(/^\.\/./.test(src)){path+=src.substring(2)
+}else{if(/^\/./.test(src)){var domain=/^(\w+:\/\/[^\/]+)/.exec(path);
+path=domain[1]+src
+}else{path+=src
+}}}}}}var m=path&&path.match(/([^\/]+)\/$/)||null;
+if(path&&m){return path+fileName
+}};
+var getFileName=function getFileName(path){if(!path){return""
+}var match=path&&path.match(/[^\/]+(\?.*)?(#.*)?$/);
+return match&&match[0]||path
+}
+}});
+FBL.ns(function(){with(FBL){var insertSliceSize=18;
+var insertInterval=40;
+var ignoreVars={__firebug__:1,"eval":1,java:1,sun:1,Packages:1,JavaArray:1,JavaMember:1,JavaObject:1,JavaClass:1,JavaPackage:1,_firebug:1,_FirebugConsole:1,_FirebugCommandLine:1};
+if(Firebug.ignoreFirebugElements){ignoreVars[cacheID]=1
+}var memberPanelRep=isIE6?{"class":"memberLabel $member.type\\Label",href:"javacript:void(0)"}:{"class":"memberLabel $member.type\\Label"};
+var RowTag=TR({"class":"memberRow $member.open $member.type\\Row",$hasChildren:"$member.hasChildren",role:"presentation",level:"$member.level"},TD({"class":"memberLabelCell",style:"padding-left: $member.indent\\px",role:"presentation"},A(memberPanelRep,SPAN({},"$member.name"))),TD({"class":"memberValueCell",role:"presentation"},TAG("$member.tag",{object:"$member.value"})));
+var WatchRowTag=TR({"class":"watchNewRow",level:0},TD({"class":"watchEditCell",colspan:2},DIV({"class":"watchEditBox a11yFocusNoTab",role:"button",tabindex:"0","aria-label":$STR("press enter to add new watch expression")},$STR("NewWatch"))));
+var SizerRow=TR({role:"presentation"},TD({width:"30%"}),TD({width:"70%"}));
+var domTableClass=isIElt8?"domTable domTableIE":"domTable";
+var DirTablePlate=domplate(Firebug.Rep,{tag:TABLE({"class":domTableClass,cellpadding:0,cellspacing:0,onclick:"$onClick",role:"tree"},TBODY({role:"presentation"},SizerRow,FOR("member","$object|memberIterator",RowTag))),watchTag:TABLE({"class":domTableClass,cellpadding:0,cellspacing:0,_toggles:"$toggles",_domPanel:"$domPanel",onclick:"$onClick",role:"tree"},TBODY({role:"presentation"},SizerRow,WatchRowTag)),tableTag:TABLE({"class":domTableClass,cellpadding:0,cellspacing:0,_toggles:"$toggles",_domPanel:"$domPanel",onclick:"$onClick",role:"tree"},TBODY({role:"presentation"},SizerRow)),rowTag:FOR("member","$members",RowTag),memberIterator:function(object,level){return getMembers(object,level)
+},onClick:function(event){if(!isLeftClick(event)){return
+}var target=event.target||event.srcElement;
+var row=getAncestorByClass(target,"memberRow");
+var label=getAncestorByClass(target,"memberLabel");
+if(label&&hasClass(row,"hasChildren")){var row=label.parentNode.parentNode;
+this.toggleRow(row)
+}else{var object=Firebug.getRepObject(target);
+if(typeof(object)=="function"){Firebug.chrome.select(object,"script");
+cancelEvent(event)
+}else{if(event.detail==2&&!object){var panel=row.parentNode.parentNode.domPanel;
+if(panel){var rowValue=panel.getRowPropertyValue(row);
+if(typeof(rowValue)=="boolean"){panel.setPropertyValue(row,!rowValue)
+}else{panel.editProperty(row)
+}cancelEvent(event)
+}}}}return false
+},toggleRow:function(row){var level=parseInt(row.getAttribute("level"));
+var toggles=row.parentNode.parentNode.toggles;
+if(hasClass(row,"opened")){removeClass(row,"opened");
+if(toggles){var path=getPath(row);
+for(var i=0;
+i<path.length;
+++i){if(i==path.length-1){delete toggles[path[i]]
+}else{toggles=toggles[path[i]]
+}}}var rowTag=this.rowTag;
+var tbody=row.parentNode;
+setTimeout(function(){for(var firstRow=row.nextSibling;
+firstRow;
+firstRow=row.nextSibling){if(parseInt(firstRow.getAttribute("level"))<=level){break
+}tbody.removeChild(firstRow)
+}},row.insertTimeout?row.insertTimeout:0)
+}else{setClass(row,"opened");
+if(toggles){var path=getPath(row);
+for(var i=0;
+i<path.length;
+++i){var name=path[i];
+if(toggles.hasOwnProperty(name)){toggles=toggles[name]
+}else{toggles=toggles[name]={}
+}}}var value=row.lastChild.firstChild.repObject;
+var members=getMembers(value,level+1);
+var rowTag=this.rowTag;
+var lastRow=row;
+var delay=0;
+while(members.length){with({slice:members.splice(0,insertSliceSize),isLast:!members.length}){setTimeout(function(){if(lastRow.parentNode){var result=rowTag.insertRows({members:slice},lastRow);
+lastRow=result[1]
+}if(isLast){row.removeAttribute("insertTimeout")
+}},delay)
+}delay+=insertInterval
+}row.insertTimeout=delay
+}}});
+Firebug.DOMBasePanel=function(){};
+Firebug.DOMBasePanel.prototype=extend(Firebug.Panel,{tag:DirTablePlate.tableTag,getRealObject:function(object){if(!object){return object
+}if(object.wrappedJSObject){return object.wrappedJSObject
+}return object
+},rebuild:function(update,scrollTop){var members=getMembers(this.selection);
+expandMembers(members,this.toggles,0,0);
+this.showMembers(members,update,scrollTop);
+if(!this.parentPanel){updateStatusBar(this)
+}},showMembers:function(members,update,scrollTop){if(this.timeouts){for(var i=0;
+i<this.timeouts.length;
+++i){this.context.clearTimeout(this.timeouts[i])
+}delete this.timeouts
+}if(!members.length){return this.showEmptyMembers()
+}var panelNode=this.panelNode;
+var priorScrollTop=scrollTop==undefined?panelNode.scrollTop:scrollTop;
+var offscreen=update&&panelNode.firstChild;
+var dest=offscreen?panelNode.ownerDocument:panelNode;
+var table=this.tag.replace({domPanel:this,toggles:this.toggles},dest);
+var tbody=table.lastChild;
+var rowTag=DirTablePlate.rowTag;
+var panel=this;
+var result;
+var timeouts=[];
+var delay=0;
+var renderStart=new Date().getTime();
+while(members.length){with({slice:members.splice(0,insertSliceSize),isLast:!members.length}){timeouts.push(this.context.setTimeout(function(){if(!tbody.lastChild){return
+}result=rowTag.insertRows({members:slice},tbody.lastChild);
+if((panelNode.scrollHeight+panelNode.offsetHeight)>=priorScrollTop){panelNode.scrollTop=priorScrollTop
+}},delay));
+delay+=insertInterval
+}}if(offscreen){timeouts.push(this.context.setTimeout(function(){if(panelNode.firstChild){panelNode.replaceChild(table,panelNode.firstChild)
+}else{panelNode.appendChild(table)
+}panelNode.scrollTop=priorScrollTop
+},delay))
+}else{timeouts.push(this.context.setTimeout(function(){panelNode.scrollTop=scrollTop==undefined?0:scrollTop
+},delay))
+}this.timeouts=timeouts
+},showEmptyMembers:function(){FirebugReps.Warning.tag.replace({object:"NoMembersWarning"},this.panelNode)
+},findPathObject:function(object){var pathIndex=-1;
+for(var i=0;
+i<this.objectPath.length;
+++i){if(this.getPathObject(i)===object){return i
+}}return -1
+},getPathObject:function(index){var object=this.objectPath[index];
+if(object instanceof Property){return object.getObject()
+}else{return object
+}},getRowObject:function(row){var object=getRowOwnerObject(row);
+return object?object:this.selection
+},getRowPropertyValue:function(row){var object=this.getRowObject(row);
+object=this.getRealObject(object);
+if(object){var propName=getRowName(row);
+if(object instanceof jsdIStackFrame){return Firebug.Debugger.evaluate(propName,this.context)
+}else{return object[propName]
+}}},onMouseMove:function(event){var target=event.srcElement||event.target;
+var object=getAncestorByClass(target,"objectLink-element");
+object=object?object.repObject:null;
+if(object&&instanceOf(object,"Element")&&object.nodeType==1){if(object!=lastHighlightedObject){Firebug.Inspector.drawBoxModel(object);
+object=lastHighlightedObject
+}}else{Firebug.Inspector.hideBoxModel()
+}},create:function(){this.context=Firebug.browser;
+this.objectPath=[];
+this.propertyPath=[];
+this.viewPath=[];
+this.pathIndex=-1;
+this.toggles={};
+Firebug.Panel.create.apply(this,arguments);
+this.panelNode.style.padding="0 1px"
+},initialize:function(){Firebug.Panel.initialize.apply(this,arguments);
+addEvent(this.panelNode,"mousemove",this.onMouseMove)
+},shutdown:function(){removeEvent(this.panelNode,"mousemove",this.onMouseMove);
+Firebug.Panel.shutdown.apply(this,arguments)
+},ishow:function(state){if(this.context.loaded&&!this.selection){if(!state){this.select(null);
+return
+}if(state.viewPath){this.viewPath=state.viewPath
+}if(state.propertyPath){this.propertyPath=state.propertyPath
+}var defaultObject=this.getDefaultSelection(this.context);
+var selectObject=defaultObject;
+if(state.firstSelection){var restored=state.firstSelection(this.context);
+if(restored){selectObject=restored;
+this.objectPath=[defaultObject,restored]
+}else{this.objectPath=[defaultObject]
+}}else{this.objectPath=[defaultObject]
+}if(this.propertyPath.length>1){for(var i=1;
+i<this.propertyPath.length;
+++i){var name=this.propertyPath[i];
+if(!name){continue
+}var object=selectObject;
+try{selectObject=object[name]
+}catch(exc){selectObject=null
+}if(selectObject){this.objectPath.push(new Property(object,name))
+}else{this.viewPath.splice(i);
+this.propertyPath.splice(i);
+this.objectPath.splice(i);
+selectObject=this.getPathObject(this.objectPath.length-1);
+break
+}}}var selection=state.pathIndex<=this.objectPath.length-1?this.getPathObject(state.pathIndex):this.getPathObject(this.objectPath.length-1);
+this.select(selection)
+}},supportsObject:function(object){if(object==null){return 1000
+}if(typeof(object)=="undefined"){return 1000
+}else{if(object instanceof SourceLink){return 0
+}else{return 1
+}}},refresh:function(){this.rebuild(true)
+},updateSelection:function(object){var previousIndex=this.pathIndex;
+var previousView=previousIndex==-1?null:this.viewPath[previousIndex];
+var newPath=this.pathToAppend;
+delete this.pathToAppend;
+var pathIndex=this.findPathObject(object);
+if(newPath||pathIndex==-1){this.toggles={};
+if(newPath){if(previousView){if(this.panelNode.scrollTop){previousView.scrollTop=this.panelNode.scrollTop
+}var start=previousIndex+1,length=this.objectPath.length-start;
+this.objectPath.splice(start,length);
+this.propertyPath.splice(start,length);
+this.viewPath.splice(start,length)
+}var value=this.getPathObject(previousIndex);
+if(!value){if(FBTrace.DBG_ERRORS){FBTrace.sysout("dom.updateSelection no pathObject for "+previousIndex+"\n")
+}return
+}for(var i=0,length=newPath.length;
+i<length;
+++i){var name=newPath[i];
+var object=value;
+try{value=value[name]
+}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("dom.updateSelection FAILS at path_i="+i+" for name:"+name+"\n")
+}return
+}++this.pathIndex;
+this.objectPath.push(new Property(object,name));
+this.propertyPath.push(name);
+this.viewPath.push({toggles:this.toggles,scrollTop:0})
+}}else{this.toggles={};
+var win=Firebug.browser.window;
+if(object===win){this.pathIndex=0;
+this.objectPath=[win];
+this.propertyPath=[null];
+this.viewPath=[{toggles:this.toggles,scrollTop:0}]
+}else{this.pathIndex=1;
+this.objectPath=[win,object];
+this.propertyPath=[null,null];
+this.viewPath=[{toggles:{},scrollTop:0},{toggles:this.toggles,scrollTop:0}]
+}}this.panelNode.scrollTop=0;
+this.rebuild()
+}else{this.pathIndex=pathIndex;
+var view=this.viewPath[pathIndex];
+this.toggles=view.toggles;
+if(previousView&&this.panelNode.scrollTop){previousView.scrollTop=this.panelNode.scrollTop
+}this.rebuild(false,view.scrollTop)
+}},getObjectPath:function(object){return this.objectPath
+},getDefaultSelection:function(){return Firebug.browser.window
+}});
+var updateStatusBar=function(panel){var path=panel.propertyPath;
+var index=panel.pathIndex;
+var r=[];
+for(var i=0,l=path.length;
+i<l;
+i++){r.push(i==index?'<a class="fbHover fbButton fbBtnSelected" ':'<a class="fbHover fbButton" ');
+r.push("pathIndex=");
+r.push(i);
+if(isIE6){r.push(' href="javascript:void(0)"')
+}r.push(">");
+r.push(i==0?"window":path[i]||"Object");
+r.push("</a>");
+if(i<l-1){r.push('<span class="fbStatusSeparator">&gt;</span>')
+}}panel.statusBarNode.innerHTML=r.join("")
+};
+var DOMMainPanel=Firebug.DOMPanel=function(){};
+Firebug.DOMPanel.DirTable=DirTablePlate;
+DOMMainPanel.prototype=extend(Firebug.DOMBasePanel.prototype,{onClickStatusBar:function(event){var target=event.srcElement||event.target;
+var element=getAncestorByClass(target,"fbHover");
+if(element){var pathIndex=element.getAttribute("pathIndex");
+if(pathIndex){this.select(this.getPathObject(pathIndex))
+}}},selectRow:function(row,target){if(!target){target=row.lastChild.firstChild
+}if(!target||!target.repObject){return
+}this.pathToAppend=getPath(row);
+var valueBox=row.lastChild.firstChild;
+if(hasClass(valueBox,"objectBox-array")){var arrayIndex=FirebugReps.Arr.getItemIndex(target);
+this.pathToAppend.push(arrayIndex)
+}this.select(target.repObject,true)
+},onClick:function(event){var target=event.srcElement||event.target;
+var repNode=Firebug.getRepNode(target);
+if(repNode){var row=getAncestorByClass(target,"memberRow");
+if(row){this.selectRow(row,repNode);
+cancelEvent(event)
+}}},name:"DOM",title:"DOM",searchable:true,statusSeparator:">",options:{hasToolButtons:true,hasStatusBar:true},create:function(){Firebug.DOMBasePanel.prototype.create.apply(this,arguments);
+this.onClick=bind(this.onClick,this);
+this.onClickStatusBar=bind(this.onClickStatusBar,this);
+this.panelNode.style.padding="0 1px"
+},initialize:function(oldPanelNode){Firebug.DOMBasePanel.prototype.initialize.apply(this,arguments);
+addEvent(this.panelNode,"click",this.onClick);
+this.ishow();
+addEvent(this.statusBarNode,"click",this.onClickStatusBar)
+},shutdown:function(){removeEvent(this.panelNode,"click",this.onClick);
+Firebug.DOMBasePanel.prototype.shutdown.apply(this,arguments)
+}});
+Firebug.registerPanel(DOMMainPanel);
+var getMembers=function getMembers(object,level){if(!level){level=0
+}var ordinals=[],userProps=[],userClasses=[],userFuncs=[],domProps=[],domFuncs=[],domConstants=[];
+try{var domMembers=getDOMMembers(object);
+if(object.wrappedJSObject){var insecureObject=object.wrappedJSObject
+}else{var insecureObject=object
+}if(isIE&&isFunction(object)){addMember("user",userProps,"prototype",object.prototype,level)
+}for(var name in insecureObject){if(ignoreVars[name]==1){continue
+}var val;
+try{val=insecureObject[name]
+}catch(exc){if(FBTrace.DBG_ERRORS&&FBTrace.DBG_DOM){FBTrace.sysout("dom.getMembers cannot access "+name,exc)
+}}var ordinal=parseInt(name);
+if(ordinal||ordinal==0){addMember("ordinal",ordinals,name,val,level)
+}else{if(isFunction(val)){if(isClassFunction(val)&&!(name in domMembers)){addMember("userClass",userClasses,name,val,level)
+}else{if(name in domMembers){addMember("domFunction",domFuncs,name,val,level,domMembers[name])
+}else{addMember("userFunction",userFuncs,name,val,level)
+}}}else{var prefix="";
+if(name in domMembers&&!(name in domConstantMap)){addMember("dom",domProps,(prefix+name),val,level,domMembers[name])
+}else{if(name in domConstantMap){addMember("dom",domConstants,(prefix+name),val,level)
+}else{addMember("user",userProps,(prefix+name),val,level)
+}}}}}}catch(exc){throw exc;
+if(FBTrace.DBG_ERRORS&&FBTrace.DBG_DOM){FBTrace.sysout("dom.getMembers FAILS: ",exc)
+}}function sortName(a,b){return a.name>b.name?1:-1
+}function sortOrder(a,b){return a.order>b.order?1:-1
+}var members=[];
+members.push.apply(members,ordinals);
+Firebug.showUserProps=true;
+Firebug.showUserFuncs=true;
+Firebug.showDOMProps=true;
+Firebug.showDOMFuncs=true;
+Firebug.showDOMConstants=true;
+if(Firebug.showUserProps){userProps.sort(sortName);
+members.push.apply(members,userProps)
+}if(Firebug.showUserFuncs){userClasses.sort(sortName);
+members.push.apply(members,userClasses);
+userFuncs.sort(sortName);
+members.push.apply(members,userFuncs)
+}if(Firebug.showDOMProps){domProps.sort(sortName);
+members.push.apply(members,domProps)
+}if(Firebug.showDOMFuncs){domFuncs.sort(sortName);
+members.push.apply(members,domFuncs)
+}if(Firebug.showDOMConstants){members.push.apply(members,domConstants)
+}return members
+};
+function expandMembers(members,toggles,offset,level){var expanded=0;
+for(var i=offset;
+i<members.length;
+++i){var member=members[i];
+if(member.level>level){break
+}if(toggles.hasOwnProperty(member.name)){member.open="opened";
+var newMembers=getMembers(member.value,level+1);
+var args=[i+1,0];
+args.push.apply(args,newMembers);
+members.splice.apply(members,args);
+expanded+=newMembers.length;
+i+=newMembers.length+expandMembers(members,toggles[member.name],i+1,level+1)
+}}return expanded
+}function isClassFunction(fn){try{for(var name in fn.prototype){return true
+}}catch(exc){}return false
+}var hasProperties=function hasProperties(ob){try{for(var name in ob){return true
+}}catch(exc){}if(isFunction(ob)){return true
+}return false
+};
+FBL.ErrorCopy=function(message){this.message=message
+};
+var addMember=function addMember(type,props,name,value,level,order){var rep=Firebug.getRep(value);
+var tag=rep.shortTag?rep.shortTag:rep.tag;
+var ErrorCopy=function(){};
+var valueType=typeof(value);
+var hasChildren=hasProperties(value)&&!(value instanceof ErrorCopy)&&(isFunction(value)||(valueType=="object"&&value!=null)||(valueType=="string"&&value.length>Firebug.stringCropLength));
+props.push({name:name,value:value,type:type,rowClass:"memberRow-"+type,open:"",order:order,level:level,indent:level*16,hasChildren:hasChildren,tag:tag})
+};
+var getWatchRowIndex=function getWatchRowIndex(row){var index=-1;
+for(;
+row&&hasClass(row,"watchRow");
+row=row.previousSibling){++index
+}return index
+};
+var getRowName=function getRowName(row){var node=row.firstChild;
+return node.textContent?node.textContent:node.innerText
+};
+var getRowValue=function getRowValue(row){return row.lastChild.firstChild.repObject
+};
+var getRowOwnerObject=function getRowOwnerObject(row){var parentRow=getParentRow(row);
+if(parentRow){return getRowValue(parentRow)
+}};
+var getParentRow=function getParentRow(row){var level=parseInt(row.getAttribute("level"))-1;
+for(row=row.previousSibling;
+row;
+row=row.previousSibling){if(parseInt(row.getAttribute("level"))==level){return row
+}}};
+var getPath=function getPath(row){var name=getRowName(row);
+var path=[name];
+var level=parseInt(row.getAttribute("level"))-1;
+for(row=row.previousSibling;
+row;
+row=row.previousSibling){if(parseInt(row.getAttribute("level"))==level){var name=getRowName(row);
+path.splice(0,0,name);
+--level
+}}return path
+};
+Firebug.DOM=extend(Firebug.Module,{getPanel:function(){return Firebug.chrome?Firebug.chrome.getPanel("DOM"):null
+}});
+Firebug.registerModule(Firebug.DOM);
+var lastHighlightedObject;
+function DOMSidePanel(){}DOMSidePanel.prototype=extend(Firebug.DOMBasePanel.prototype,{selectRow:function(row,target){if(!target){target=row.lastChild.firstChild
+}if(!target||!target.repObject){return
+}this.pathToAppend=getPath(row);
+var valueBox=row.lastChild.firstChild;
+if(hasClass(valueBox,"objectBox-array")){var arrayIndex=FirebugReps.Arr.getItemIndex(target);
+this.pathToAppend.push(arrayIndex)
+}var object=target.repObject;
+if(instanceOf(object,"Element")&&object[cacheID]){Firebug.HTML.selectTreeNode(object[cacheID])
+}else{Firebug.chrome.selectPanel("DOM");
+Firebug.chrome.getPanel("DOM").select(object,true)
+}},onClick:function(event){var target=event.srcElement||event.target;
+var repNode=Firebug.getRepNode(target);
+if(repNode){var row=getAncestorByClass(target,"memberRow");
+if(row){this.selectRow(row,repNode);
+cancelEvent(event)
+}}},name:"DOMSidePanel",parentPanel:"HTML",title:"DOM",options:{hasToolButtons:true},isInitialized:false,create:function(){Firebug.DOMBasePanel.prototype.create.apply(this,arguments);
+this.onClick=bind(this.onClick,this)
+},initialize:function(){Firebug.DOMBasePanel.prototype.initialize.apply(this,arguments);
+addEvent(this.panelNode,"click",this.onClick);
+var selection=documentCache[FirebugChrome.selectedHTMLElementId];
+if(selection){this.select(selection,true)
+}},shutdown:function(){removeEvent(this.panelNode,"click",this.onClick);
+Firebug.DOMBasePanel.prototype.shutdown.apply(this,arguments)
+},reattach:function(oldChrome){this.toggles=oldChrome.getPanel("DOMSidePanel").toggles
+}});
+Firebug.registerPanel(DOMSidePanel)
+}});
+FBL.FBTrace={};
+(function(){var traceOptions={DBG_TIMESTAMP:1,DBG_INITIALIZE:1,DBG_CHROME:1,DBG_ERRORS:1,DBG_DISPATCH:1,DBG_CSS:1};
+this.module=null;
+this.initialize=function(){if(!this.messageQueue){this.messageQueue=[]
+}for(var name in traceOptions){this[name]=traceOptions[name]
+}};
+this.sysout=function(){return this.logFormatted(arguments,"")
+};
+this.dumpProperties=function(title,object){return this.logFormatted("dumpProperties() not supported.","warning")
+};
+this.dumpStack=function(){return this.logFormatted("dumpStack() not supported.","warning")
+};
+this.flush=function(module){this.module=module;
+var queue=this.messageQueue;
+this.messageQueue=[];
+for(var i=0;
+i<queue.length;
+++i){this.writeMessage(queue[i][0],queue[i][1],queue[i][2])
+}};
+this.getPanel=function(){return this.module?this.module.getPanel():null
+};
+this.logFormatted=function(objects,className){var html=this.DBG_TIMESTAMP?[getTimestamp()," | "]:[];
+var length=objects.length;
+for(var i=0;
+i<length;
+++i){appendText(" ",html);
+var object=objects[i];
+if(i==0){html.push("<b>");
+appendText(object,html);
+html.push("</b>")
+}else{appendText(object,html)
+}}return this.logRow(html,className)
+};
+this.logRow=function(message,className){var panel=this.getPanel();
+if(panel&&panel.contentNode){this.writeMessage(message,className)
+}else{this.messageQueue.push([message,className])
+}return this.LOG_COMMAND
+};
+this.writeMessage=function(message,className){var container=this.getPanel().containerNode;
+var isScrolledToBottom=container.scrollTop+container.offsetHeight>=container.scrollHeight;
+this.writeRow.call(this,message,className);
+if(isScrolledToBottom){container.scrollTop=container.scrollHeight-container.offsetHeight
+}};
+this.appendRow=function(row){var container=this.getPanel().contentNode;
+container.appendChild(row)
+};
+this.writeRow=function(message,className){var row=this.getPanel().contentNode.ownerDocument.createElement("div");
+row.className="logRow"+(className?" logRow-"+className:"");
+row.innerHTML=message.join("");
+this.appendRow(row)
+};
+function appendText(object,html){html.push(escapeHTML(objectToString(object)))
+}function getTimestamp(){var now=new Date();
+var ms=""+(now.getMilliseconds()/1000).toFixed(3);
+ms=ms.substr(2);
+return now.toLocaleTimeString()+"."+ms
+}var HTMLtoEntity={"<":"&lt;",">":"&gt;","&":"&amp;","'":"&#39;",'"':"&quot;"};
+function replaceChars(ch){return HTMLtoEntity[ch]
+}function escapeHTML(value){return(value+"").replace(/[<>&"']/g,replaceChars)
+}function objectToString(object){try{return object+""
+}catch(exc){return null
+}}}).apply(FBL.FBTrace);
+FBL.ns(function(){with(FBL){if(!Env.Options.enableTrace){return
+}Firebug.Trace=extend(Firebug.Module,{getPanel:function(){return Firebug.chrome?Firebug.chrome.getPanel("Trace"):null
+},clear:function(){this.getPanel().contentNode.innerHTML=""
+}});
+Firebug.registerModule(Firebug.Trace);
+function TracePanel(){}TracePanel.prototype=extend(Firebug.Panel,{name:"Trace",title:"Trace",options:{hasToolButtons:true,innerHTMLSync:true},create:function(){Firebug.Panel.create.apply(this,arguments);
+this.clearButton=new Button({caption:"Clear",title:"Clear FBTrace logs",owner:Firebug.Trace,onClick:Firebug.Trace.clear})
+},initialize:function(){Firebug.Panel.initialize.apply(this,arguments);
+this.clearButton.initialize()
+}});
+Firebug.registerPanel(TracePanel)
+}});
+FBL.ns(function(){with(FBL){var modules=[];
+var panelTypes=[];
+var panelTypeMap={};
+var parentPanelMap={};
+var registerModule=Firebug.registerModule;
+var registerPanel=Firebug.registerPanel;
+append(Firebug,{extend:function(fn){if(Firebug.chrome&&Firebug.chrome.addPanel){var namespace=ns(fn);
+fn.call(namespace,FBL)
+}else{setTimeout(function(){Firebug.extend(fn)
+},100)
+}},registerModule:function(){registerModule.apply(Firebug,arguments);
+modules.push.apply(modules,arguments);
+dispatch(modules,"initialize",[]);
+if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.registerModule")
+}},registerPanel:function(){registerPanel.apply(Firebug,arguments);
+panelTypes.push.apply(panelTypes,arguments);
+for(var i=0,panelType;
+panelType=arguments[i];
+++i){if(panelType.prototype.name=="Dev"){continue
+}panelTypeMap[panelType.prototype.name]=arguments[i];
+var parentPanelName=panelType.prototype.parentPanel;
+if(parentPanelName){parentPanelMap[parentPanelName]=1
+}else{var panelName=panelType.prototype.name;
+var chrome=Firebug.chrome;
+chrome.addPanel(panelName);
+var onTabClick=function onTabClick(){chrome.selectPanel(panelName);
+return false
+};
+chrome.addController([chrome.panelMap[panelName].tabNode,"mousedown",onTabClick])
+}}if(FBTrace.DBG_INITIALIZE){for(var i=0;
+i<arguments.length;
+++i){FBTrace.sysout("Firebug.registerPanel",arguments[i].prototype.name)
+}}}})
+}});
+FBL.ns(function(){with(FBL){FirebugChrome.Skin={CSS:'.collapsed{display:none;}[collapsed="true"]{display:none;}#fbCSS{padding:0 !important;}.cssPropDisable{float:left;display:block;width:2em;cursor:default;}.infoTip{z-index:2147483647;position:fixed;padding:2px 3px;border:1px solid #CBE087;background:LightYellow;font-family:Monaco,monospace;color:#000000;display:none;white-space:nowrap;pointer-events:none;}.infoTip[active="true"]{display:block;}.infoTipLoading{width:16px;height:16px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/loading_16.gif) no-repeat;}.infoTipImageBox{min-width:100px;text-align:center;}.infoTipCaption{font:message-box;}.infoTipLoading > .infoTipImage,.infoTipLoading > .infoTipCaption{display:none;}h1.groupHeader{padding:2px 4px;margin:0 0 4px 0;border-top:1px solid #CCCCCC;border-bottom:1px solid #CCCCCC;background:#eee url(https://getfirebug.com/releases/lite/latest/skin/xp/group.gif) repeat-x;font-size:11px;font-weight:bold;_position:relative;}.inlineEditor,.fixedWidthEditor{z-index:2147483647;position:absolute;display:none;}.inlineEditor{margin-left:-6px;margin-top:-3px;}.textEditorInner,.fixedWidthEditor{margin:0 0 0 0 !important;padding:0;border:none !important;font:inherit;text-decoration:inherit;background-color:#FFFFFF;}.fixedWidthEditor{border-top:1px solid #888888 !important;border-bottom:1px solid #888888 !important;}.textEditorInner{position:relative;top:-7px;left:-5px;outline:none;resize:none;}.textEditorInner1{padding-left:11px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorBorders.png) repeat-y;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorBorders.gif) repeat-y;_overflow:hidden;}.textEditorInner2{position:relative;padding-right:2px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorBorders.png) repeat-y 100% 0;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorBorders.gif) repeat-y 100% 0;_position:fixed;}.textEditorTop1{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.png) no-repeat 100% 0;margin-left:11px;height:10px;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.gif) no-repeat 100% 0;_overflow:hidden;}.textEditorTop2{position:relative;left:-11px;width:11px;height:10px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.png) no-repeat;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.gif) no-repeat;}.textEditorBottom1{position:relative;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.png) no-repeat 100% 100%;margin-left:11px;height:12px;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.gif) no-repeat 100% 100%;}.textEditorBottom2{position:relative;left:-11px;width:11px;height:12px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.png) no-repeat 0 100%;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.gif) no-repeat 0 100%;}.panelNode-css{overflow-x:hidden;}.cssSheet > .insertBefore{height:1.5em;}.cssRule{position:relative;margin:0;padding:1em 0 0 6px;font-family:Monaco,monospace;color:#000000;}.cssRule:first-child{padding-top:6px;}.cssElementRuleContainer{position:relative;}.cssHead{padding-right:150px;}.cssProp{}.cssPropName{color:DarkGreen;}.cssPropValue{margin-left:8px;color:DarkBlue;}.cssOverridden span{text-decoration:line-through;}.cssInheritedRule{}.cssInheritLabel{margin-right:0.5em;font-weight:bold;}.cssRule .objectLink-sourceLink{top:0;}.cssProp.editGroup:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/disable.png) no-repeat 2px 1px;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/disable.gif) no-repeat 2px 1px;}.cssProp.editGroup.editing{background:none;}.cssProp.disabledStyle{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/disableHover.png) no-repeat 2px 1px;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/disableHover.gif) no-repeat 2px 1px;opacity:1;color:#CCCCCC;}.disabledStyle .cssPropName,.disabledStyle .cssPropValue{color:#CCCCCC;}.cssPropValue.editing + .cssSemi,.inlineExpander + .cssSemi{display:none;}.cssPropValue.editing{white-space:nowrap;}.stylePropName{font-weight:bold;padding:0 4px 4px 4px;width:50%;}.stylePropValue{width:50%;}.panelNode-net{overflow-x:hidden;}.netTable{width:100%;}.hideCategory-undefined .category-undefined,.hideCategory-html .category-html,.hideCategory-css .category-css,.hideCategory-js .category-js,.hideCategory-image .category-image,.hideCategory-xhr .category-xhr,.hideCategory-flash .category-flash,.hideCategory-txt .category-txt,.hideCategory-bin .category-bin{display:none;}.netHeadRow{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/group.gif) repeat-x #FFFFFF;}.netHeadCol{border-bottom:1px solid #CCCCCC;padding:2px 4px 2px 18px;font-weight:bold;}.netHeadLabel{white-space:nowrap;overflow:hidden;}.netHeaderRow{height:16px;}.netHeaderCell{cursor:pointer;-moz-user-select:none;border-bottom:1px solid #9C9C9C;padding:0 !important;font-weight:bold;background:#BBBBBB url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/tableHeader.gif) repeat-x;white-space:nowrap;}.netHeaderRow > .netHeaderCell:first-child > .netHeaderCellBox{padding:2px 14px 2px 18px;}.netHeaderCellBox{padding:2px 14px 2px 10px;border-left:1px solid #D9D9D9;border-right:1px solid #9C9C9C;}.netHeaderCell:hover:active{background:#959595 url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/tableHeaderActive.gif) repeat-x;}.netHeaderSorted{background:#7D93B2 url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/tableHeaderSorted.gif) repeat-x;}.netHeaderSorted > .netHeaderCellBox{border-right-color:#6B7C93;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/arrowDown.png) no-repeat right;}.netHeaderSorted.sortedAscending > .netHeaderCellBox{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/arrowUp.png);}.netHeaderSorted:hover:active{background:#536B90 url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/tableHeaderSortedActive.gif) repeat-x;}.panelNode-net .netRowHeader{display:block;}.netRowHeader{cursor:pointer;display:none;height:15px;margin-right:0 !important;}.netRow .netRowHeader{background-position:5px 1px;}.netRow[breakpoint="true"] .netRowHeader{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/breakpoint.png);}.netRow[breakpoint="true"][disabledBreakpoint="true"] .netRowHeader{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/breakpointDisabled.png);}.netRow.category-xhr:hover .netRowHeader{background-color:#F6F6F6;}#netBreakpointBar{max-width:38px;}#netHrefCol > .netHeaderCellBox{border-left:0px;}.netRow .netRowHeader{width:3px;}.netInfoRow .netRowHeader{display:table-cell;}.netTable[hiddenCols~=netHrefCol] TD[id="netHrefCol"],.netTable[hiddenCols~=netHrefCol] TD.netHrefCol,.netTable[hiddenCols~=netStatusCol] TD[id="netStatusCol"],.netTable[hiddenCols~=netStatusCol] TD.netStatusCol,.netTable[hiddenCols~=netDomainCol] TD[id="netDomainCol"],.netTable[hiddenCols~=netDomainCol] TD.netDomainCol,.netTable[hiddenCols~=netSizeCol] TD[id="netSizeCol"],.netTable[hiddenCols~=netSizeCol] TD.netSizeCol,.netTable[hiddenCols~=netTimeCol] TD[id="netTimeCol"],.netTable[hiddenCols~=netTimeCol] TD.netTimeCol{display:none;}.netRow{background:LightYellow;}.netRow.loaded{background:#FFFFFF;}.netRow.loaded:hover{background:#EFEFEF;}.netCol{padding:0;vertical-align:top;border-bottom:1px solid #EFEFEF;white-space:nowrap;height:17px;}.netLabel{width:100%;}.netStatusCol{padding-left:10px;color:rgb(128,128,128);}.responseError > .netStatusCol{color:red;}.netDomainCol{padding-left:5px;}.netSizeCol{text-align:right;padding-right:10px;}.netHrefLabel{-moz-box-sizing:padding-box;overflow:hidden;z-index:10;position:absolute;padding-left:18px;padding-top:1px;max-width:15%;font-weight:bold;}.netFullHrefLabel{display:none;-moz-user-select:none;padding-right:10px;padding-bottom:3px;max-width:100%;background:#FFFFFF;z-index:200;}.netHrefCol:hover > .netFullHrefLabel{display:block;}.netRow.loaded:hover .netCol > .netFullHrefLabel{background-color:#EFEFEF;}.useA11y .a11yShowFullLabel{display:block;background-image:none !important;border:1px solid #CBE087;background-color:LightYellow;font-family:Monaco,monospace;color:#000000;font-size:10px;z-index:2147483647;}.netSizeLabel{padding-left:6px;}.netStatusLabel,.netDomainLabel,.netSizeLabel,.netBar{padding:1px 0 2px 0 !important;}.responseError{color:red;}.hasHeaders .netHrefLabel:hover{cursor:pointer;color:blue;text-decoration:underline;}.netLoadingIcon{position:absolute;border:0;margin-left:14px;width:16px;height:16px;background:transparent no-repeat 0 0;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/loading_16.gif);display:inline-block;}.loaded .netLoadingIcon{display:none;}.netBar,.netSummaryBar{position:relative;border-right:50px solid transparent;}.netResolvingBar{position:absolute;left:0;top:0;bottom:0;background:#FFFFFF url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarResolving.gif) repeat-x;z-index:60;}.netConnectingBar{position:absolute;left:0;top:0;bottom:0;background:#FFFFFF url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarConnecting.gif) repeat-x;z-index:50;}.netBlockingBar{position:absolute;left:0;top:0;bottom:0;background:#FFFFFF url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarWaiting.gif) repeat-x;z-index:40;}.netSendingBar{position:absolute;left:0;top:0;bottom:0;background:#FFFFFF url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarSending.gif) repeat-x;z-index:30;}.netWaitingBar{position:absolute;left:0;top:0;bottom:0;background:#FFFFFF url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarResponded.gif) repeat-x;z-index:20;min-width:1px;}.netReceivingBar{position:absolute;left:0;top:0;bottom:0;background:#38D63B url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarLoading.gif) repeat-x;z-index:10;}.netWindowLoadBar,.netContentLoadBar{position:absolute;left:0;top:0;bottom:0;width:1px;background-color:red;z-index:70;opacity:0.5;display:none;margin-bottom:-1px;}.netContentLoadBar{background-color:Blue;}.netTimeLabel{-moz-box-sizing:padding-box;position:absolute;top:1px;left:100%;padding-left:6px;color:#444444;min-width:16px;}.loaded .netReceivingBar,.loaded.netReceivingBar{background:#B6B6B6 url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarLoaded.gif) repeat-x;border-color:#B6B6B6;}.fromCache .netReceivingBar,.fromCache.netReceivingBar{background:#D6D6D6 url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarCached.gif) repeat-x;border-color:#D6D6D6;}.netSummaryRow .netTimeLabel,.loaded .netTimeLabel{background:transparent;}.timeInfoTip{width:150px; height:40px}.timeInfoTipBar,.timeInfoTipEventBar{position:relative;display:block;margin:0;opacity:1;height:15px;width:4px;}.timeInfoTipEventBar{width:1px !important;}.timeInfoTipCell.startTime{padding-right:8px;}.timeInfoTipCell.elapsedTime{text-align:right;padding-right:8px;}.sizeInfoLabelCol{font-weight:bold;padding-right:10px;font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px;}.sizeInfoSizeCol{font-weight:bold;}.sizeInfoDetailCol{color:gray;text-align:right;}.sizeInfoDescCol{font-style:italic;}.netSummaryRow .netReceivingBar{background:#BBBBBB;border:none;}.netSummaryLabel{color:#222222;}.netSummaryRow{background:#BBBBBB !important;font-weight:bold;}.netSummaryRow .netBar{border-right-color:#BBBBBB;}.netSummaryRow > .netCol{border-top:1px solid #999999;border-bottom:2px solid;-moz-border-bottom-colors:#EFEFEF #999999;padding-top:1px;padding-bottom:2px;}.netSummaryRow > .netHrefCol:hover{background:transparent !important;}.netCountLabel{padding-left:18px;}.netTotalSizeCol{text-align:right;padding-right:10px;}.netTotalTimeCol{text-align:right;}.netCacheSizeLabel{position:absolute;z-index:1000;left:0;top:0;}.netLimitRow{background:rgb(255,255,225) !important;font-weight:normal;color:black;font-weight:normal;}.netLimitLabel{padding-left:18px;}.netLimitRow > .netCol{border-bottom:2px solid;-moz-border-bottom-colors:#EFEFEF #999999;vertical-align:middle !important;padding-top:2px;padding-bottom:2px;}.netLimitButton{font-size:11px;padding-top:1px;padding-bottom:1px;}.netInfoCol{border-top:1px solid #EEEEEE;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/group.gif) repeat-x #FFFFFF;}.netInfoBody{margin:10px 0 4px 10px;}.netInfoTabs{position:relative;padding-left:17px;}.netInfoTab{position:relative;top:-3px;margin-top:10px;padding:4px 6px;border:1px solid transparent;border-bottom:none;_border:none;font-weight:bold;color:#565656;cursor:pointer;}.netInfoTabSelected{cursor:default !important;border:1px solid #D7D7D7 !important;border-bottom:none !important;-moz-border-radius:4px 4px 0 0;-webkit-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;background-color:#FFFFFF;}.logRow-netInfo.error .netInfoTitle{color:red;}.logRow-netInfo.loading .netInfoResponseText{font-style:italic;color:#888888;}.loading .netInfoResponseHeadersTitle{display:none;}.netInfoResponseSizeLimit{font-family:Lucida Grande,Tahoma,sans-serif;padding-top:10px;font-size:11px;}.netInfoText{display:none;margin:0;border:1px solid #D7D7D7;border-right:none;padding:8px;background-color:#FFFFFF;font-family:Monaco,monospace;white-space:pre-wrap;}.netInfoTextSelected{display:block;}.netInfoParamName{padding-right:10px;font-family:Lucida Grande,Tahoma,sans-serif;font-weight:bold;vertical-align:top;text-align:right;white-space:nowrap;}.netInfoPostText .netInfoParamName{width:1px;}.netInfoParamValue{width:100%;}.netInfoHeadersText,.netInfoPostText,.netInfoPutText{padding-top:0;}.netInfoHeadersGroup,.netInfoPostParams,.netInfoPostSource{margin-bottom:4px;border-bottom:1px solid #D7D7D7;padding-top:8px;padding-bottom:2px;font-family:Lucida Grande,Tahoma,sans-serif;font-weight:bold;color:#565656;}.netInfoPostParamsTable,.netInfoPostPartsTable,.netInfoPostJSONTable,.netInfoPostXMLTable,.netInfoPostSourceTable{margin-bottom:10px;width:100%;}.netInfoPostContentType{color:#bdbdbd;padding-left:50px;font-weight:normal;}.netInfoHtmlPreview{border:0;width:100%;height:100%;}.netHeadersViewSource{color:#bdbdbd;margin-left:200px;font-weight:normal;}.netHeadersViewSource:hover{color:blue;cursor:pointer;}.netActivationRow,.netPageSeparatorRow{background:rgb(229,229,229) !important;font-weight:normal;color:black;}.netActivationLabel{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/infoIcon.png) no-repeat 3px 2px;padding-left:22px;}.netPageSeparatorRow{height:5px !important;}.netPageSeparatorLabel{padding-left:22px;height:5px !important;}.netPageRow{background-color:rgb(255,255,255);}.netPageRow:hover{background:#EFEFEF;}.netPageLabel{padding:1px 0 2px 18px !important;font-weight:bold;}.netActivationRow > .netCol{border-bottom:2px solid;-moz-border-bottom-colors:#EFEFEF #999999;padding-top:2px;padding-bottom:3px;}.twisty,.logRow-errorMessage > .hasTwisty > .errorTitle,.logRow-log > .objectBox-array.hasTwisty,.logRow-spy .spyHead .spyTitle,.logGroup > .logRow,.memberRow.hasChildren > .memberLabelCell > .memberLabel,.hasHeaders .netHrefLabel,.netPageRow > .netCol > .netPageTitle{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_open.gif);background-repeat:no-repeat;background-position:2px 2px;min-height:12px;}.logRow-errorMessage > .hasTwisty.opened > .errorTitle,.logRow-log > .objectBox-array.hasTwisty.opened,.logRow-spy.opened .spyHead .spyTitle,.logGroup.opened > .logRow,.memberRow.hasChildren.opened > .memberLabelCell > .memberLabel,.nodeBox.highlightOpen > .nodeLabel > .twisty,.nodeBox.open > .nodeLabel > .twisty,.netRow.opened > .netCol > .netHrefLabel,.netPageRow.opened > .netCol > .netPageTitle{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_close.gif);}.twisty{background-position:4px 4px;}* html .logRow-spy .spyHead .spyTitle,* html .logGroup .logGroupLabel,* html .hasChildren .memberLabelCell .memberLabel,* html .hasHeaders .netHrefLabel{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_open.gif);background-repeat:no-repeat;background-position:2px 2px;}* html .opened .spyHead .spyTitle,* html .opened .logGroupLabel,* html .opened .memberLabelCell .memberLabel{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_close.gif);background-repeat:no-repeat;background-position:2px 2px;}.panelNode-console{overflow-x:hidden;}.objectLink{text-decoration:none;}.objectLink:hover{cursor:pointer;text-decoration:underline;}.logRow{position:relative;margin:0;border-bottom:1px solid #D7D7D7;padding:2px 4px 1px 6px;background-color:#FFFFFF;overflow:hidden !important;}.useA11y .logRow:focus{border-bottom:1px solid #000000 !important;outline:none !important;background-color:#FFFFAD !important;}.useA11y .logRow:focus a.objectLink-sourceLink{background-color:#FFFFAD;}.useA11y .a11yFocus:focus,.useA11y .objectBox:focus{outline:2px solid #FF9933;background-color:#FFFFAD;}.useA11y .objectBox-null:focus,.useA11y .objectBox-undefined:focus{background-color:#888888 !important;}.useA11y .logGroup.opened > .logRow{border-bottom:1px solid #ffffff;}.logGroup{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/group.gif) repeat-x #FFFFFF;padding:0 !important;border:none !important;}.logGroupBody{display:none;margin-left:16px;border-left:1px solid #D7D7D7;border-top:1px solid #D7D7D7;background:#FFFFFF;}.logGroup > .logRow{background-color:transparent !important;font-weight:bold;}.logGroup.opened > .logRow{border-bottom:none;}.logGroup.opened > .logGroupBody{display:block;}.logRow-command > .objectBox-text{font-family:Monaco,monospace;color:#0000FF;white-space:pre-wrap;}.logRow-info,.logRow-warn,.logRow-error,.logRow-assert,.logRow-warningMessage,.logRow-errorMessage{padding-left:22px;background-repeat:no-repeat;background-position:4px 2px;}.logRow-assert,.logRow-warningMessage,.logRow-errorMessage{padding-top:0;padding-bottom:0;}.logRow-info,.logRow-info .objectLink-sourceLink{background-color:#FFFFFF;}.logRow-warn,.logRow-warningMessage,.logRow-warn .objectLink-sourceLink,.logRow-warningMessage .objectLink-sourceLink{background-color:cyan;}.logRow-error,.logRow-assert,.logRow-errorMessage,.logRow-error .objectLink-sourceLink,.logRow-errorMessage .objectLink-sourceLink{background-color:LightYellow;}.logRow-error,.logRow-assert,.logRow-errorMessage{color:#FF0000;}.logRow-info{}.logRow-warn,.logRow-warningMessage{}.logRow-error,.logRow-assert,.logRow-errorMessage{}.objectBox-string,.objectBox-text,.objectBox-number,.objectLink-element,.objectLink-textNode,.objectLink-function,.objectBox-stackTrace,.objectLink-profile{font-family:Monaco,monospace;}.objectBox-string,.objectBox-text,.objectLink-textNode{white-space:pre-wrap;}.objectBox-number,.objectLink-styleRule,.objectLink-element,.objectLink-textNode{color:#000088;}.objectBox-string{color:#FF0000;}.objectLink-function,.objectBox-stackTrace,.objectLink-profile{color:DarkGreen;}.objectBox-null,.objectBox-undefined{padding:0 2px;border:1px solid #666666;background-color:#888888;color:#FFFFFF;}.objectBox-exception{padding:0 2px 0 18px;color:red;}.objectLink-sourceLink{position:absolute;right:4px;top:2px;padding-left:8px;font-family:Lucida Grande,sans-serif;font-weight:bold;color:#0000FF;}.errorTitle{margin-top:0px;margin-bottom:1px;padding-top:2px;padding-bottom:2px;}.errorTrace{margin-left:17px;}.errorSourceBox{margin:2px 0;}.errorSource-none{display:none;}.errorSource-syntax > .errorBreak{visibility:hidden;}.errorSource{cursor:pointer;font-family:Monaco,monospace;color:DarkGreen;}.errorSource:hover{text-decoration:underline;}.errorBreak{cursor:pointer;display:none;margin:0 6px 0 0;width:13px;height:14px;vertical-align:bottom;opacity:0.1;}.hasBreakSwitch .errorBreak{display:inline;}.breakForError .errorBreak{opacity:1;}.assertDescription{margin:0;}.logRow-profile > .logRow > .objectBox-text{font-family:Lucida Grande,Tahoma,sans-serif;color:#000000;}.logRow-profile > .logRow > .objectBox-text:last-child{color:#555555;font-style:italic;}.logRow-profile.opened > .logRow{padding-bottom:4px;}.profilerRunning > .logRow{padding-left:22px !important;}.profileSizer{width:100%;overflow-x:auto;overflow-y:scroll;}.profileTable{border-bottom:1px solid #D7D7D7;padding:0 0 4px 0;}.profileTable tr[odd="1"]{background-color:#F5F5F5;vertical-align:middle;}.profileTable a{vertical-align:middle;}.profileTable td{padding:1px 4px 0 4px;}.headerCell{cursor:pointer;-moz-user-select:none;border-bottom:1px solid #9C9C9C;padding:0 !important;font-weight:bold;}.headerCellBox{padding:2px 4px;border-left:1px solid #D9D9D9;border-right:1px solid #9C9C9C;}.headerCell:hover:active{}.headerSorted{}.headerSorted > .headerCellBox{border-right-color:#6B7C93;}.headerSorted.sortedAscending > .headerCellBox{}.headerSorted:hover:active{}.linkCell{text-align:right;}.linkCell > .objectLink-sourceLink{position:static;}.logRow-stackTrace{padding-top:0;background:#f8f8f8;}.logRow-stackTrace > .objectBox-stackFrame{position:relative;padding-top:2px;}.objectLink-object{font-family:Lucida Grande,sans-serif;font-weight:bold;color:DarkGreen;white-space:pre-wrap;}.objectProp-object{color:DarkGreen;}.objectProps{color:#000;font-weight:normal;}.objectPropName{color:#777;}.objectProps .objectProp-string{color:#f55;}.objectProps .objectProp-number{color:#55a;}.objectProps .objectProp-object{color:#585;}.selectorTag,.selectorId,.selectorClass{font-family:Monaco,monospace;font-weight:normal;}.selectorTag{color:#0000FF;}.selectorId{color:DarkBlue;}.selectorClass{color:red;}.selectorHidden > .selectorTag{color:#5F82D9;}.selectorHidden > .selectorId{color:#888888;}.selectorHidden > .selectorClass{color:#D86060;}.selectorValue{font-family:Lucida Grande,sans-serif;font-style:italic;color:#555555;}.panelNode.searching .logRow{display:none;}.logRow.matched{display:block !important;}.logRow.matching{position:absolute;left:-1000px;top:-1000px;max-width:0;max-height:0;overflow:hidden;}.objectLeftBrace,.objectRightBrace,.objectEqual,.objectComma,.arrayLeftBracket,.arrayRightBracket,.arrayComma{font-family:Monaco,monospace;}.objectLeftBrace,.objectRightBrace,.arrayLeftBracket,.arrayRightBracket{font-weight:bold;}.objectLeftBrace,.arrayLeftBracket{margin-right:4px;}.objectRightBrace,.arrayRightBracket{margin-left:4px;}.logRow-dir{padding:0;}.logRow-errorMessage .hasTwisty .errorTitle,.logRow-spy .spyHead .spyTitle,.logGroup .logRow{cursor:pointer;padding-left:18px;background-repeat:no-repeat;background-position:3px 3px;}.logRow-errorMessage > .hasTwisty > .errorTitle{background-position:2px 3px;}.logRow-errorMessage > .hasTwisty > .errorTitle:hover,.logRow-spy .spyHead .spyTitle:hover,.logGroup > .logRow:hover{text-decoration:underline;}.logRow-spy{padding:0 !important;}.logRow-spy,.logRow-spy .objectLink-sourceLink{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/group.gif) repeat-x #FFFFFF;padding-right:4px;right:0;}.logRow-spy.opened{padding-bottom:4px;border-bottom:none;}.spyTitle{color:#000000;font-weight:bold;-moz-box-sizing:padding-box;overflow:hidden;z-index:100;padding-left:18px;}.spyCol{padding:0;white-space:nowrap;height:16px;}.spyTitleCol:hover > .objectLink-sourceLink,.spyTitleCol:hover > .spyTime,.spyTitleCol:hover > .spyStatus,.spyTitleCol:hover > .spyTitle{display:none;}.spyFullTitle{display:none;-moz-user-select:none;max-width:100%;background-color:Transparent;}.spyTitleCol:hover > .spyFullTitle{display:block;}.spyStatus{padding-left:10px;color:rgb(128,128,128);}.spyTime{margin-left:4px;margin-right:4px;color:rgb(128,128,128);}.spyIcon{margin-right:4px;margin-left:4px;width:16px;height:16px;vertical-align:middle;background:transparent no-repeat 0 0;display:none;}.loading .spyHead .spyRow .spyIcon{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/loading_16.gif);display:block;}.logRow-spy.loaded:not(.error) .spyHead .spyRow .spyIcon{width:0;margin:0;}.logRow-spy.error .spyHead .spyRow .spyIcon{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/errorIcon-sm.png);display:block;background-position:2px 2px;}.logRow-spy .spyHead .netInfoBody{display:none;}.logRow-spy.opened .spyHead .netInfoBody{margin-top:10px;display:block;}.logRow-spy.error .spyTitle,.logRow-spy.error .spyStatus,.logRow-spy.error .spyTime{color:red;}.logRow-spy.loading .spyResponseText{font-style:italic;color:#888888;}.caption{font-family:Lucida Grande,Tahoma,sans-serif;font-weight:bold;color:#444444;}.warning{padding:10px;font-family:Lucida Grande,Tahoma,sans-serif;font-weight:bold;color:#888888;}.panelNode-dom{overflow-x:hidden !important;}.domTable{font-size:1em;width:100%;table-layout:fixed;background:#fff;}.domTableIE{width:auto;}.memberLabelCell{padding:2px 0 2px 0;vertical-align:top;}.memberValueCell{padding:1px 0 1px 5px;display:block;overflow:hidden;}.memberLabel{display:block;cursor:default;-moz-user-select:none;overflow:hidden;padding-left:18px;background-color:#FFFFFF;text-decoration:none;}.memberRow.hasChildren .memberLabelCell .memberLabel:hover{cursor:pointer;color:blue;text-decoration:underline;}.userLabel{color:#000000;font-weight:bold;}.userClassLabel{color:#E90000;font-weight:bold;}.userFunctionLabel{color:#025E2A;font-weight:bold;}.domLabel{color:#000000;}.domFunctionLabel{color:#025E2A;}.ordinalLabel{color:SlateBlue;font-weight:bold;}.scopesRow{padding:2px 18px;background-color:LightYellow;border-bottom:5px solid #BEBEBE;color:#666666;}.scopesLabel{background-color:LightYellow;}.watchEditCell{padding:2px 18px;background-color:LightYellow;border-bottom:1px solid #BEBEBE;color:#666666;}.editor-watchNewRow,.editor-memberRow{font-family:Monaco,monospace !important;}.editor-memberRow{padding:1px 0 !important;}.editor-watchRow{padding-bottom:0 !important;}.watchRow > .memberLabelCell{font-family:Monaco,monospace;padding-top:1px;padding-bottom:1px;}.watchRow > .memberLabelCell > .memberLabel{background-color:transparent;}.watchRow > .memberValueCell{padding-top:2px;padding-bottom:2px;}.watchRow > .memberLabelCell,.watchRow > .memberValueCell{background-color:#F5F5F5;border-bottom:1px solid #BEBEBE;}.watchToolbox{z-index:2147483647;position:absolute;right:0;padding:1px 2px;}#fbConsole{overflow-x:hidden !important;}#fbCSS{font:1em Monaco,monospace;padding:0 7px;}#fbstylesheetButtons select,#fbScriptButtons select{font:11px Lucida Grande,Tahoma,sans-serif;margin-top:1px;padding-left:3px;background:#fafafa;border:1px inset #fff;width:220px;outline:none;}.Selector{margin-top:10px}.CSSItem{margin-left:4%}.CSSText{padding-left:20px;}.CSSProperty{color:#005500;}.CSSValue{padding-left:5px; color:#000088;}#fbHTMLStatusBar{display:inline;}.fbToolbarButtons{display:none;}.fbStatusSeparator{display:block;float:left;padding-top:4px;}#fbStatusBarBox{display:none;}#fbToolbarContent{display:block;position:absolute;_position:absolute;top:0;padding-top:4px;height:23px;clip:rect(0,2048px,27px,0);}.fbTabMenuTarget{display:none !important;float:left;width:10px;height:10px;margin-top:6px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuTarget.png);}.fbTabMenuTarget:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuTargetHover.png);}.fbShadow{float:left;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/shadowAlpha.png) no-repeat bottom right !important;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/shadow2.gif) no-repeat bottom right;margin:10px 0 0 10px !important;margin:10px 0 0 5px;}.fbShadowContent{display:block;position:relative;background-color:#fff;border:1px solid #a9a9a9;top:-6px;left:-6px;}.fbMenu{display:none;position:absolute;font-size:11px;z-index:2147483647;}.fbMenuContent{padding:2px;}.fbMenuSeparator{display:block;position:relative;padding:1px 18px 0;text-decoration:none;color:#000;cursor:default;background:#ACA899;margin:4px 0;}.fbMenuOption{display:block;position:relative;padding:2px 18px;text-decoration:none;color:#000;cursor:default;}.fbMenuOption:hover{color:#fff;background:#316AC5;}.fbMenuGroup{background:transparent url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuPin.png) no-repeat right 0;}.fbMenuGroup:hover{background:#316AC5 url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuPin.png) no-repeat right -17px;}.fbMenuGroupSelected{color:#fff;background:#316AC5 url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuPin.png) no-repeat right -17px;}.fbMenuChecked{background:transparent url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuCheckbox.png) no-repeat 4px 0;}.fbMenuChecked:hover{background:#316AC5 url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuCheckbox.png) no-repeat 4px -17px;}.fbMenuRadioSelected{background:transparent url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuRadio.png) no-repeat 4px 0;}.fbMenuRadioSelected:hover{background:#316AC5 url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuRadio.png) no-repeat 4px -17px;}.fbMenuShortcut{padding-right:85px;}.fbMenuShortcutKey{position:absolute;right:0;top:2px;width:77px;}#fbFirebugMenu{top:22px;left:0;}.fbMenuDisabled{color:#ACA899 !important;}#fbFirebugSettingsMenu{left:245px;top:99px;}#fbConsoleMenu{top:42px;left:48px;}.fbIconButton{display:block;}.fbIconButton{display:block;}.fbIconButton{display:block;float:left;height:20px;width:20px;color:#000;margin-right:2px;text-decoration:none;cursor:default;}.fbIconButton:hover{position:relative;top:-1px;left:-1px;margin-right:0;_margin-right:1px;color:#333;border:1px solid #fff;border-bottom:1px solid #bbb;border-right:1px solid #bbb;}.fbIconPressed{position:relative;margin-right:0;_margin-right:1px;top:0 !important;left:0 !important;height:19px;color:#333 !important;border:1px solid #bbb !important;border-bottom:1px solid #cfcfcf !important;border-right:1px solid #ddd !important;}#fbErrorPopup{position:absolute;right:0;bottom:0;height:19px;width:75px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #f1f2ee 0 0;z-index:999;}#fbErrorPopupContent{position:absolute;right:0;top:1px;height:18px;width:75px;_width:74px;border-left:1px solid #aca899;}#fbErrorIndicator{position:absolute;top:2px;right:5px;}.fbBtnInspectActive{background:#aaa;color:#fff !important;}.fbBody{margin:0;padding:0;overflow:hidden;font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px;background:#fff;}.clear{clear:both;}#fbMiniChrome{display:none;right:0;height:27px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #f1f2ee 0 0;margin-left:1px;}#fbMiniContent{display:block;position:relative;left:-1px;right:0;top:1px;height:25px;border-left:1px solid #aca899;}#fbToolbarSearch{float:right;border:1px solid #ccc;margin:0 5px 0 0;background:#fff url(https://getfirebug.com/releases/lite/latest/skin/xp/search.png) no-repeat 4px 2px !important;background:#fff url(https://getfirebug.com/releases/lite/latest/skin/xp/search.gif) no-repeat 4px 2px;padding-left:20px;font-size:11px;}#fbToolbarErrors{float:right;margin:1px 4px 0 0;font-size:11px;}#fbLeftToolbarErrors{float:left;margin:7px 0px 0 5px;font-size:11px;}.fbErrors{padding-left:20px;height:14px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/errorIcon.png) no-repeat !important;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/errorIcon.gif) no-repeat;color:#f00;font-weight:bold;}#fbMiniErrors{display:inline;display:none;float:right;margin:5px 2px 0 5px;}#fbMiniIcon{float:right;margin:3px 4px 0;height:20px;width:20px;float:right;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) 0 -135px;cursor:pointer;}#fbChrome{font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px;position:absolute;_position:static;top:0;left:0;height:100%;width:100%;border-collapse:collapse;border-spacing:0;background:#fff;overflow:hidden;}#fbChrome > tbody > tr > td{padding:0;}#fbTop{height:49px;}#fbToolbar{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #f1f2ee 0 0;height:27px;font-size:11px;}#fbPanelBarBox{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #dbd9c9 0 -27px;height:22px;}#fbContent{height:100%;vertical-align:top;}#fbBottom{height:18px;background:#fff;}#fbToolbarIcon{float:left;padding:0 5px 0;}#fbToolbarIcon a{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) 0 -135px;}#fbToolbarButtons{padding:0 2px 0 5px;}#fbToolbarButtons{padding:0 2px 0 5px;}.fbButton{text-decoration:none;display:block;float:left;color:#000;padding:4px 6px 4px 7px;cursor:default;}.fbButton:hover{color:#333;background:#f5f5ef url(https://getfirebug.com/releases/lite/latest/skin/xp/buttonBg.png);padding:3px 5px 3px 6px;border:1px solid #fff;border-bottom:1px solid #bbb;border-right:1px solid #bbb;}.fbBtnPressed{background:#e3e3db url(https://getfirebug.com/releases/lite/latest/skin/xp/buttonBgHover.png) !important;padding:3px 4px 2px 6px !important;margin:1px 0 0 1px !important;border:1px solid #ACA899 !important;border-color:#ACA899 #ECEBE3 #ECEBE3 #ACA899 !important;}#fbStatusBarBox{top:4px;cursor:default;}.fbToolbarSeparator{overflow:hidden;border:1px solid;border-color:transparent #fff transparent #777;_border-color:#eee #fff #eee #777;height:7px;margin:6px 3px;float:left;}.fbBtnSelected{font-weight:bold;}.fbStatusBar{color:#aca899;}.fbStatusBar a{text-decoration:none;color:black;}.fbStatusBar a:hover{color:blue;cursor:pointer;}#fbWindowButtons{position:absolute;white-space:nowrap;right:0;top:0;height:17px;width:48px;padding:5px;z-index:6;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #f1f2ee 0 0;}#fbPanelBar1{width:1024px; z-index:8;left:0;white-space:nowrap;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #dbd9c9 0 -27px;position:absolute;left:4px;}#fbPanelBar2Box{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #dbd9c9 0 -27px;position:absolute;height:22px;width:300px; z-index:9;right:0;}#fbPanelBar2{position:absolute;width:290px; height:22px;padding-left:4px;}.fbPanel{display:none;}#fbPanelBox1,#fbPanelBox2{max-height:inherit;height:100%;font-size:1em;}#fbPanelBox2{background:#fff;}#fbPanelBox2{width:300px;background:#fff;}#fbPanel2{margin-left:6px;background:#fff;}#fbLargeCommandLine{display:none;position:absolute;z-index:9;top:27px;right:0;width:294px;height:201px;border-width:0;margin:0;padding:2px 0 0 2px;resize:none;outline:none;font-size:11px;overflow:auto;border-top:1px solid #B9B7AF;_right:-1px;_border-left:1px solid #fff;}#fbLargeCommandButtons{display:none;background:#ECE9D8;bottom:0;right:0;width:294px;height:21px;padding-top:1px;position:fixed;border-top:1px solid #ACA899;z-index:9;}#fbSmallCommandLineIcon{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/down.png) no-repeat;position:absolute;right:2px;bottom:3px;z-index:99;}#fbSmallCommandLineIcon:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/downHover.png) no-repeat;}.hide{overflow:hidden !important;position:fixed !important;display:none !important;visibility:hidden !important;}#fbCommand{height:18px;}#fbCommandBox{position:fixed;_position:absolute;width:100%;height:18px;bottom:0;overflow:hidden;z-index:9;background:#fff;border:0;border-top:1px solid #ccc;}#fbCommandIcon{position:absolute;color:#00f;top:2px;left:6px;display:inline;font:11px Monaco,monospace;z-index:10;}#fbCommandLine{position:absolute;width:100%;top:0;left:0;border:0;margin:0;padding:2px 0 2px 32px;font:11px Monaco,monospace;z-index:9;outline:none;}#fbLargeCommandLineIcon{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/up.png) no-repeat;position:absolute;right:1px;bottom:1px;z-index:10;}#fbLargeCommandLineIcon:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/upHover.png) no-repeat;}div.fbFitHeight{overflow:auto;position:relative;}.fbSmallButton{overflow:hidden;width:16px;height:16px;display:block;text-decoration:none;cursor:default;}#fbWindowButtons .fbSmallButton{float:right;}#fbWindow_btClose{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/min.png);}#fbWindow_btClose:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/minHover.png);}#fbWindow_btDetach{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/detach.png);}#fbWindow_btDetach:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/detachHover.png);}#fbWindow_btDeactivate{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/off.png);}#fbWindow_btDeactivate:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/offHover.png);}.fbTab{text-decoration:none;display:none;float:left;width:auto;float:left;cursor:default;font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px;font-weight:bold;height:22px;color:#565656;}.fbPanelBar span{float:left;}.fbPanelBar .fbTabL,.fbPanelBar .fbTabR{height:22px;width:8px;}.fbPanelBar .fbTabText{padding:4px 1px 0;}a.fbTab:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) 0 -73px;}a.fbTab:hover .fbTabL{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) -16px -96px;}a.fbTab:hover .fbTabR{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) -24px -96px;}.fbSelectedTab{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #f1f2ee 0 -50px !important;color:#000;}.fbSelectedTab .fbTabL{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) 0 -96px !important;}.fbSelectedTab .fbTabR{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) -8px -96px !important;}#fbHSplitter{position:fixed;_position:absolute;left:0;top:0;width:100%;height:5px;overflow:hidden;cursor:n-resize !important;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/pixel_transparent.gif);z-index:9;}#fbHSplitter.fbOnMovingHSplitter{height:100%;z-index:100;}.fbVSplitter{background:#ece9d8;color:#000;border:1px solid #716f64;border-width:0 1px;border-left-color:#aca899;width:4px;cursor:e-resize;overflow:hidden;right:294px;text-decoration:none;z-index:10;position:absolute;height:100%;top:27px;}div.lineNo{font:1em Monaco,monospace;position:relative;float:left;top:0;left:0;margin:0 5px 0 0;padding:0 5px 0 10px;background:#eee;color:#888;border-right:1px solid #ccc;text-align:right;}.sourceBox{position:absolute;}.sourceCode{font:1em Monaco,monospace;overflow:hidden;white-space:pre;display:inline;}.nodeControl{margin-top:3px;margin-left:-14px;float:left;width:9px;height:9px;overflow:hidden;cursor:default;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_open.gif);_float:none;_display:inline;_position:absolute;}div.nodeMaximized{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_close.gif);}div.objectBox-element{padding:1px 3px;}.objectBox-selector{cursor:default;}.selectedElement{background:highlight;color:#fff !important;}.selectedElement span{color:#fff !important;}* html .selectedElement{position:relative;}@media screen and (-webkit-min-device-pixel-ratio:0){.selectedElement{background:#316AC5;color:#fff !important;}}.logRow *{font-size:1em;}.logRow{position:relative;border-bottom:1px solid #D7D7D7;padding:2px 4px 1px 6px;zbackground-color:#FFFFFF;}.logRow-command{font-family:Monaco,monospace;color:blue;}.objectBox-string,.objectBox-text,.objectBox-number,.objectBox-function,.objectLink-element,.objectLink-textNode,.objectLink-function,.objectBox-stackTrace,.objectLink-profile{font-family:Monaco,monospace;}.objectBox-null{padding:0 2px;border:1px solid #666666;background-color:#888888;color:#FFFFFF;}.objectBox-string{color:red;}.objectBox-number{color:#000088;}.objectBox-function{color:DarkGreen;}.objectBox-object{color:DarkGreen;font-weight:bold;font-family:Lucida Grande,sans-serif;}.objectBox-array{color:#000;}.logRow-info,.logRow-error,.logRow-warn{background:#fff no-repeat 2px 2px;padding-left:20px;padding-bottom:3px;}.logRow-info{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/infoIcon.png) !important;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/infoIcon.gif);}.logRow-warn{background-color:cyan;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/warningIcon.png) !important;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/warningIcon.gif);}.logRow-error{background-color:LightYellow;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/errorIcon.png) !important;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/errorIcon.gif);color:#f00;}.errorMessage{vertical-align:top;color:#f00;}.objectBox-sourceLink{position:absolute;right:4px;top:2px;padding-left:8px;font-family:Lucida Grande,sans-serif;font-weight:bold;color:#0000FF;}.selectorTag,.selectorId,.selectorClass{font-family:Monaco,monospace;font-weight:normal;}.selectorTag{color:#0000FF;}.selectorId{color:DarkBlue;}.selectorClass{color:red;}.objectBox-element{font-family:Monaco,monospace;color:#000088;}.nodeChildren{padding-left:26px;}.nodeTag{color:blue;cursor:pointer;}.nodeValue{color:#FF0000;font-weight:normal;}.nodeText,.nodeComment{margin:0 2px;vertical-align:top;}.nodeText{color:#333333;font-family:Monaco,monospace;}.nodeComment{color:DarkGreen;}.nodeHidden,.nodeHidden *{color:#888888;}.nodeHidden .nodeTag{color:#5F82D9;}.nodeHidden .nodeValue{color:#D86060;}.selectedElement .nodeHidden,.selectedElement .nodeHidden *{color:SkyBlue !important;}.log-object{}.property{position:relative;clear:both;height:15px;}.propertyNameCell{vertical-align:top;float:left;width:28%;position:absolute;left:0;z-index:0;}.propertyValueCell{float:right;width:68%;background:#fff;position:absolute;padding-left:5px;display:table-cell;right:0;z-index:1;}.propertyName{font-weight:bold;}.FirebugPopup{height:100% !important;}.FirebugPopup #fbWindowButtons{display:none !important;}.FirebugPopup #fbHSplitter{display:none !important;}',HTML:'<table id="fbChrome" cellpadding="0" cellspacing="0" border="0"><tbody><tr><td id="fbTop" colspan="2"><div id="fbWindowButtons"><a id="fbWindow_btDeactivate" class="fbSmallButton fbHover" title="Deactivate Firebug for this web page">&nbsp;</a><a id="fbWindow_btDetach" class="fbSmallButton fbHover" title="Open Firebug in popup window">&nbsp;</a><a id="fbWindow_btClose" class="fbSmallButton fbHover" title="Minimize Firebug">&nbsp;</a></div><div id="fbToolbar"><div id="fbToolbarContent"><span id="fbToolbarIcon"><a id="fbFirebugButton" class="fbIconButton" class="fbHover" target="_blank">&nbsp;</a></span><span id="fbToolbarButtons"><span id="fbFixedButtons"><a id="fbChrome_btInspect" class="fbButton fbHover" title="Click an element in the page to inspect">Inspect</a></span><span id="fbConsoleButtons" class="fbToolbarButtons"><a id="fbConsole_btClear" class="fbButton fbHover" title="Clear the console">Clear</a></span></span><span id="fbStatusBarBox"><span class="fbToolbarSeparator"></span></span></div></div><div id="fbPanelBarBox"><div id="fbPanelBar1" class="fbPanelBar"><a id="fbConsoleTab" class="fbTab fbHover"><span class="fbTabL"></span><span class="fbTabText">Console</span><span class="fbTabMenuTarget"></span><span class="fbTabR"></span></a><a id="fbHTMLTab" class="fbTab fbHover"><span class="fbTabL"></span><span class="fbTabText">HTML</span><span class="fbTabR"></span></a><a class="fbTab fbHover"><span class="fbTabL"></span><span class="fbTabText">CSS</span><span class="fbTabR"></span></a><a class="fbTab fbHover"><span class="fbTabL"></span><span class="fbTabText">Script</span><span class="fbTabR"></span></a><a class="fbTab fbHover"><span class="fbTabL"></span><span class="fbTabText">DOM</span><span class="fbTabR"></span></a></div><div id="fbPanelBar2Box" class="hide"><div id="fbPanelBar2" class="fbPanelBar"></div></div></div><div id="fbHSplitter">&nbsp;</div></td></tr><tr id="fbContent"><td id="fbPanelBox1"><div id="fbPanel1" class="fbFitHeight"><div id="fbConsole" class="fbPanel"></div><div id="fbHTML" class="fbPanel"></div></div></td><td id="fbPanelBox2" class="hide"><div id="fbVSplitter" class="fbVSplitter">&nbsp;</div><div id="fbPanel2" class="fbFitHeight"><div id="fbHTML_Style" class="fbPanel"></div><div id="fbHTML_Layout" class="fbPanel"></div><div id="fbHTML_DOM" class="fbPanel"></div></div><textarea id="fbLargeCommandLine" class="fbFitHeight"></textarea><div id="fbLargeCommandButtons"><a id="fbCommand_btRun" class="fbButton fbHover">Run</a><a id="fbCommand_btClear" class="fbButton fbHover">Clear</a><a id="fbSmallCommandLineIcon" class="fbSmallButton fbHover"></a></div></td></tr><tr id="fbBottom" class="hide"><td id="fbCommand" colspan="2"><div id="fbCommandBox"><div id="fbCommandIcon">&gt;&gt;&gt;</div><input id="fbCommandLine" name="fbCommandLine" type="text"/><a id="fbLargeCommandLineIcon" class="fbSmallButton fbHover"></a></div></td></tr></tbody></table><span id="fbMiniChrome"><span id="fbMiniContent"><span id="fbMiniIcon" title="Open Firebug Lite"></span><span id="fbMiniErrors" class="fbErrors">2 errors</span></span></span>'}
+}});
+FBL.initialize()
+})();
Index: extensions/iPiwigo/www/index.html
===================================================================
--- extensions/iPiwigo/www/index.html	(revision 9188)
+++ extensions/iPiwigo/www/index.html	(revision 9188)
@@ -0,0 +1,166 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+  <head>
+	<!-- Change this if you want to allow scaling -->
+    <meta name="viewport" content="width=default-width; user-scalable=no" />
+
+    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+    <title>iPiwigo</title>
+	
+	<!-- iPad/iPhone specific css below, add after your main css >
+	<link rel="stylesheet" media="only screen and (max-device-width: 1024px)" href="ipad.css" type="text/css" />		
+	<link rel="stylesheet" media="only screen and (max-device-width: 480px)" href="iphone.css" type="text/css" />		
+	-->
+	<!-- If you application is targeting iOS BEFORE 4.0 you MUST put json2.js from http://www.JSON.org/json2.js into your www directory and include it here -->
+	<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
+    <script type="text/javascript" charset="utf-8">
+
+
+	// If you want to prevent dragging, uncomment this section
+	/*
+	function preventBehavior(e) 
+	{ 
+      e.preventDefault(); 
+    };
+	document.addEventListener("touchmove", preventBehavior, false);
+	*/
+	
+	function onBodyLoad()
+	{
+		document.addEventListener("deviceready",onDeviceReady,false);
+	}
+	
+	/* When this function is called, PhoneGap has been initialized and is ready to roll */
+	function onDeviceReady()
+	{
+		// do your thing!
+	}
+    
+    </script>
+
+<!-- CSS -->
+	<style type="text/css" media="screen">@import "jqtouch/jqtouch.css";</style>
+	<style type="text/css" media="screen">@import "themes/piwigo/theme.css";</style>
+
+<!-- JQUERY - JQTOUCH -->
+	<script src="jquery-1.5.js" type="application/x-javascript" charset="utf-8"></script>
+	<script src="jqtouch/jqtouch.js" type="application/x-javascript" charset="utf-8"></script>
+	<script src="piwigo.js" type="application/x-javascript" charset="utf-8"></script>
+        <script type="text/javascript">
+          
+            
+        </script>
+
+
+  </head>
+  <body onload="onBodyLoad()">
+
+        <div id="settings" class="selectable">
+				<div class="toolbar">
+                	<a class="leftButton button cube back" id="back" href="#">cancel</a>
+                	<h1>settings <img src="images/home_icon.png"></h1>
+                	<a id="save_settings" class="button cube" href="#">save</a>
+            	</div>
+            	<div class="bindSuccess"></div>
+	            <h1 >User settings</h1>
+	            <form>
+	                <ul class="edit rounded">
+	                    <li><input type="text" name="name" placeholder="Name" id="piwigo_name" /></li>
+	                    <li><input type="text" name="url" placeholder="URL to Piwigo" id="piwigo_url" /></li>
+	                    <li><input type="text" name="username" placeholder="username" id="piwigo_username"  /></li>
+	                    <li><input type="password" name="password" placeholder="password" id="piwigo_password" /></li>
+	                </ul>
+	            </form>
+
+				<h1>Upload High Resolution?</h1>
+				<form>
+					<ul class="edit rounded">
+	                    <li>upload High Res <span class="toggle"><input id="piwigo_highres" type="checkbox" /></span></li>
+	                </ul>
+				</form>
+
+				<h1>Image size</h1>
+				<form>
+					<ul class="edit rounded">
+	                    <li><input type="text" name="width" placeholder="width" id="piwigo_width" /></li>
+	                    <li><input type="text" name="height" placeholder="height" id="piwigo_height" /></li>
+	                </ul>
+				</form>
+
+                <div class="spaceBottom"></div>
+                
+        </div>
+
+        <div id="about" class="selectable">
+                <p><img src="images/logo_about.png" /></p>
+
+                <h1>iPiwigo</h1>
+                Version 0.1 / alpha1 -- very, very initial Release<br />
+                <a href="http://www.piwigo.org">by JR and the Piwigo community</a>
+
+                <p><br /><br /><a href="#" class="grayButton goback">Close</a></p>
+        </div>
+        <div id="home" class="current">
+            <div class="toolbar">
+                <a class="leftButton button cube" id="infoButton" href="#settings">Settings</a>
+                <h1>iPiwigo <img src="images/home_icon.png"></h1>
+                <a class="button cube" id="infoButton" href="#about">About</a>
+
+            </div>
+
+			<!-- LOADING CATEGORY -->
+            <ul class="categories rounded">
+				
+
+            </ul>
+		</div>
+
+        <div id="images">
+            <div class="toolbar">
+                <a class="leftButton back button slideup" id="infoButton" href="#">back</a>
+                <h1>iPiwigo <img src="images/home_icon.png"></h1>
+                <a id="save_settings" class="button slideup" href="#settings">save</a>
+                
+
+            </div>
+
+			<!-- LOADING IMAGES -->
+			
+            <ul class="images">
+				
+			</ul>
+		</div>
+		<div id="imageZoom">
+            <div class="toolbar">
+                <a class="leftButton back button slideup" id="infoButton" href="#">back</a>
+                <h1>ImageZoom <img src="images/home_icon.png"></h1>
+                <a id="save_settings" class="button slideup" href="#settings">save</a>
+            </div>
+			<ul class="imageZoom"></ul>
+			
+			<div class="navigation">
+				<a class="prev" href="#">slide left</a>
+				<a class="play" href="#">play</a>
+				<a class="next" href="#">slide right</a>
+			</div>
+			
+		</div>
+		
+		
+		<div id="addImages">
+            <div class="toolbar">
+                <a class="leftButton button slideup" id="infoButton" href="#home">back</a>
+                <h1>iPiwigo <img src="images/home_icon.png"></h1>
+                <a class="button slideup" id="infoButton" href="#addImages">Add</a>
+
+            </div>
+
+			<!-- LOADING ADDIMAGES -->
+            <ul class="addImages rounded">
+				
+
+            </ul>
+		</div>
+
+  </body>
+</html>
Index: extensions/iPiwigo/www/jqtouch/jqtouch.css
===================================================================
--- extensions/iPiwigo/www/jqtouch/jqtouch.css	(revision 9188)
+++ extensions/iPiwigo/www/jqtouch/jqtouch.css	(revision 9188)
@@ -0,0 +1,377 @@
+* {
+    margin: 0;
+    padding: 0;
+}
+a {
+    -webkit-tap-highlight-color: rgba(0,0,0,0);
+}
+
+body {
+    overflow-x: hidden;
+    -webkit-user-select: none;
+    -webkit-text-size-adjust: none;
+    font-family: Helvetica;
+    -webkit-perspective: 800;
+    -webkit-transform-style: preserve-3d;
+}
+.selectable, input, textarea {
+    -webkit-user-select: auto;
+}
+body > * {
+    -webkit-backface-visibility: hidden;
+    -webkit-box-sizing: border-box;
+    display: none;
+    position: absolute;
+    left: 0;
+    width: 100%;
+    -webkit-transform: translate3d(0,0,0) rotate(0) scale(1);
+    min-height: 460px !important;
+}
+body.fullscreen > * {
+    min-height: 460px !important;
+}
+body.fullscreen.black-translucent > * {
+    min-height: 480px !important;
+}
+body.landscape > * {
+    min-height: 320px !important;
+}
+
+body.wide > * {
+    min-height: 320px !important;
+}
+body > .current {
+    display: block !important;
+}
+
+.in, .out {
+	-webkit-animation-timing-function: ease-in-out;
+	-webkit-animation-duration: 350ms;
+}
+
+.slide.in {
+	-webkit-animation-name: slideinfromright;
+}
+
+.slide.out {
+	-webkit-animation-name: slideouttoleft;
+}
+
+.slide.in.reverse {
+	-webkit-animation-name: slideinfromleft;
+}
+
+.slide.out.reverse {
+	-webkit-animation-name: slideouttoright;
+}
+
+@-webkit-keyframes slideinfromright {
+    from { -webkit-transform: translateX(100%); }
+    to { -webkit-transform: translateX(0); }
+}
+
+@-webkit-keyframes slideinfromleft {
+    from { -webkit-transform: translateX(-100%); }
+    to { -webkit-transform: translateX(0); }
+}
+
+@-webkit-keyframes slideouttoleft {
+    from { -webkit-transform: translateX(0); }
+    to { -webkit-transform: translateX(-100%); }
+}
+
+@-webkit-keyframes slideouttoright {
+    from { -webkit-transform: translateX(0); }
+    to { -webkit-transform: translateX(100%); }
+}
+
+@-webkit-keyframes fadein {
+    from { opacity: 0; }
+    to { opacity: 1; }
+}
+
+@-webkit-keyframes fadeout {
+    from { opacity: 1; }
+    to { opacity: 0; }
+}
+
+.fade.in {
+	z-index: 10;
+	-webkit-animation-name: fadein;
+}
+.fade.out {
+	z-index: 0;
+}
+
+.dissolve.in {
+	-webkit-animation-name: fadein;
+}
+
+.dissolve.out {
+	-webkit-animation-name: fadeout;	
+}
+
+
+
+.flip {
+	-webkit-animation-duration: .65s;
+}
+
+.flip.in {
+	-webkit-animation-name: flipinfromleft;
+}
+
+.flip.out {
+	-webkit-animation-name: flipouttoleft;
+}
+
+/* Shake it all about */
+
+.flip.in.reverse {
+	-webkit-animation-name: flipinfromright;
+}
+
+.flip.out.reverse {
+	-webkit-animation-name: flipouttoright;
+}
+
+@-webkit-keyframes flipinfromright {
+    from { -webkit-transform: rotateY(-180deg) scale(.8); }
+    to { -webkit-transform: rotateY(0) scale(1); }
+}
+
+@-webkit-keyframes flipinfromleft {
+    from { -webkit-transform: rotateY(180deg) scale(.8); }
+    to { -webkit-transform: rotateY(0) scale(1); }
+}
+
+@-webkit-keyframes flipouttoleft {
+    from { -webkit-transform: rotateY(0) scale(1); }
+    to { -webkit-transform: rotateY(-180deg) scale(.8); }
+}
+
+@-webkit-keyframes flipouttoright {
+    from { -webkit-transform: rotateY(0) scale(1); }
+    to { -webkit-transform: rotateY(180deg) scale(.8); }
+}
+
+.slideup.in {
+	-webkit-animation-name: slideup;
+	z-index: 10;
+}
+
+.slideup.out {
+	-webkit-animation-name: dontmove;
+	z-index: 0;
+}
+
+.slideup.out.reverse {
+	z-index: 10;
+	-webkit-animation-name: slidedown;
+}
+
+.slideup.in.reverse {
+	z-index: 0;
+	-webkit-animation-name: dontmove;
+}
+
+
+@-webkit-keyframes slideup {
+    from { -webkit-transform: translateY(100%); }
+    to { -webkit-transform: translateY(0); }
+}
+
+@-webkit-keyframes slidedown {
+    from { -webkit-transform: translateY(0); }
+    to { -webkit-transform: translateY(100%); }
+}
+
+
+
+/* Hackish, but reliable. */
+
+@-webkit-keyframes dontmove {
+    from { opacity: 1; }
+    to { opacity: 1; }
+}
+
+.swap {
+	-webkit-transform: perspective(800);
+	-webkit-animation-duration: .7s;
+}
+.swap.out {
+	-webkit-animation-name: swapouttoleft;
+}
+.swap.in {
+	-webkit-animation-name: swapinfromright;
+}
+.swap.out.reverse {
+	-webkit-animation-name: swapouttoright;
+}
+.swap.in.reverse {
+	-webkit-animation-name: swapinfromleft;
+}
+
+
+@-webkit-keyframes swapouttoright {
+    0% {
+        -webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg);
+        -webkit-animation-timing-function: ease-in-out;
+    }
+    50% {
+        -webkit-transform: translate3d(-180px, 0px, -400px) rotateY(20deg);
+        -webkit-animation-timing-function: ease-in;
+    }
+    100% {
+        -webkit-transform:  translate3d(0px, 0px, -800px) rotateY(70deg);
+    }
+}
+
+@-webkit-keyframes swapouttoleft {
+    0% {
+        -webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg);
+        -webkit-animation-timing-function: ease-in-out;
+    }
+    50% {
+        -webkit-transform:  translate3d(180px, 0px, -400px) rotateY(-20deg);
+        -webkit-animation-timing-function: ease-in;
+    }
+    100% {
+        -webkit-transform: translate3d(0px, 0px, -800px) rotateY(-70deg);
+    }
+}
+
+@-webkit-keyframes swapinfromright {
+    0% {
+        -webkit-transform: translate3d(0px, 0px, -800px) rotateY(70deg);
+        -webkit-animation-timing-function: ease-out;
+    }
+    50% {
+        -webkit-transform: translate3d(-180px, 0px, -400px) rotateY(20deg);
+        -webkit-animation-timing-function: ease-in-out;
+    }
+    100% {
+        -webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg);
+    }
+}
+
+@-webkit-keyframes swapinfromleft {
+    0% {
+        -webkit-transform: translate3d(0px, 0px, -800px) rotateY(-70deg);
+        -webkit-animation-timing-function: ease-out;
+    }
+    50% {
+        -webkit-transform: translate3d(180px, 0px, -400px) rotateY(-20deg);
+        -webkit-animation-timing-function: ease-in-out;
+    }
+    100% {
+        -webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg);
+    }
+}
+
+.cube {
+    -webkit-animation-duration: .55s;
+}
+
+.cube.in {
+	-webkit-animation-name: cubeinfromright;
+    -webkit-transform-origin: 0% 50%;
+}
+.cube.out {
+	-webkit-animation-name: cubeouttoleft;
+    -webkit-transform-origin: 100% 50%;
+}
+.cube.in.reverse {
+	-webkit-animation-name: cubeinfromleft;	
+    -webkit-transform-origin: 100% 50%;
+}
+.cube.out.reverse {
+	-webkit-animation-name: cubeouttoright;
+    -webkit-transform-origin: 0% 50%;
+
+}
+
+@-webkit-keyframes cubeinfromleft {
+	from {
+        -webkit-transform: rotateY(-90deg) translateZ(320px);
+        opacity: .5;
+	}
+    to {
+        -webkit-transform: rotateY(0deg) translateZ(0);
+        opacity: 1;
+    }
+}
+@-webkit-keyframes cubeouttoright {
+    from {
+        -webkit-transform: rotateY(0deg) translateX(0);
+        opacity: 1;
+    }
+    to {
+        -webkit-transform: rotateY(90deg) translateZ(320px);
+        opacity: .5;
+    }
+}
+@-webkit-keyframes cubeinfromright {
+    from {
+        -webkit-transform: rotateY(90deg) translateZ(320px);
+        opacity: .5;
+    }
+    to {
+        -webkit-transform: rotateY(0deg) translateZ(0);
+        opacity: 1;
+    }
+}
+@-webkit-keyframes cubeouttoleft {
+    from {
+        -webkit-transform: rotateY(0deg) translateZ(0);
+        opacity: 1;
+    }
+    to {
+        -webkit-transform: rotateY(-90deg) translateZ(320px);
+        opacity: .5;
+    }
+}
+
+
+
+
+.pop {
+	-webkit-transform-origin: 50% 50%;
+}
+
+.pop.in {
+	-webkit-animation-name: popin;
+	z-index: 10;
+}
+
+.pop.out.reverse {
+	-webkit-animation-name: popout;
+	z-index: 10;
+}
+
+.pop.in.reverse {
+	z-index: 0;
+	-webkit-animation-name: dontmove;
+}
+
+@-webkit-keyframes popin {
+    from {
+        -webkit-transform: scale(.2);
+        opacity: 0;
+    }
+    to {
+        -webkit-transform: scale(1);
+        opacity: 1;
+    }
+}
+
+@-webkit-keyframes popout {
+    from {
+        -webkit-transform: scale(1);
+        opacity: 1;
+    }
+    to {
+        -webkit-transform: scale(.2);
+        opacity: 0;
+    }
+}
Index: extensions/iPiwigo/www/jqtouch/jqtouch.js
===================================================================
--- extensions/iPiwigo/www/jqtouch/jqtouch.js	(revision 9188)
+++ extensions/iPiwigo/www/jqtouch/jqtouch.js	(revision 9188)
@@ -0,0 +1,634 @@
+/*
+
+            _/    _/_/    _/_/_/_/_/                              _/       
+               _/    _/      _/      _/_/    _/    _/    _/_/_/  _/_/_/    
+          _/  _/  _/_/      _/    _/    _/  _/    _/  _/        _/    _/   
+         _/  _/    _/      _/    _/    _/  _/    _/  _/        _/    _/    
+        _/    _/_/  _/    _/      _/_/      _/_/_/    _/_/_/  _/    _/     
+       _/                                                                  
+    _/
+
+    Created by David Kaneda <http://www.davidkaneda.com>
+    Documentation and issue tracking on Google Code <http://code.google.com/p/jqtouch/>
+    
+    Special thanks to Jonathan Stark <http://jonathanstark.com/>
+    and pinch/zoom <http://www.pinchzoom.com/>
+    
+    (c) 2009 by jQTouch project members.
+    See LICENSE.txt for license.
+    
+    $Revision: 109 $
+    $Date: 2009-10-06 12:23:30 -0400 (Tue, 06 Oct 2009) $
+    $LastChangedBy: davidcolbykaneda $
+
+*/
+
+(function($) {
+    $.jQTouch = function(options) {
+        
+        // Set support values
+        $.support.WebKitCSSMatrix = (typeof WebKitCSSMatrix == "object");
+        $.support.touch = (typeof Touch == "object");
+        $.support.WebKitAnimationEvent = (typeof WebKitTransitionEvent == "object");
+        
+        // Initialize internal variables
+        var $body, 
+            $head=$('head'), 
+            hist=[], 
+            newPageCount=0, 
+            jQTSettings={}, 
+            hashCheck, 
+            currentPage, 
+            orientation, 
+            isMobileWebKit = RegExp(" Mobile/").test(navigator.userAgent), 
+            tapReady=true,
+            lastAnimationTime=0,
+            touchSelectors=[],
+            publicObj={},
+            extensions=$.jQTouch.prototype.extensions,
+            defaultAnimations=['slide','flip','slideup','swap','cube','pop','dissolve','fade','back'], 
+            animations=[], 
+            hairextensions='';
+
+        // Get the party started
+        init(options);
+
+        function init(options) {
+            
+            var defaults = {
+                addGlossToIcon: true,
+                backSelector: '.back, .cancel, .goback',
+                cacheGetRequests: true,
+                cubeSelector: '.cube',
+                dissolveSelector: '.dissolve',
+                fadeSelector: '.fade',
+                fixedViewport: true,
+                flipSelector: '.flip',
+                formSelector: 'form',
+                fullScreen: true,
+                fullScreenClass: 'fullscreen',
+                icon: null,
+                touchSelector: 'a, .touch',
+                popSelector: '.pop',
+                preloadImages: false,
+                slideSelector: 'body > * > ul li a',
+                slideupSelector: '.slideup',
+                startupScreen: null,
+                statusBar: 'default', // other options: black-translucent, black
+                submitSelector: '.submit',
+                swapSelector: '.swap',
+                useAnimations: true,
+                useFastTouch: true // Experimental.
+            };
+            jQTSettings = $.extend({}, defaults, options);
+            
+            // Preload images
+            if (jQTSettings.preloadImages) {
+                for (var i = jQTSettings.preloadImages.length - 1; i >= 0; i--){
+                    (new Image()).src = jQTSettings.preloadImages[i];
+                };
+            }
+            // Set icon
+            if (jQTSettings.icon) {
+                var precomposed = (jQTSettings.addGlossToIcon) ? '' : '-precomposed';
+                hairextensions += '<link rel="apple-touch-icon' + precomposed + '" href="' + jQTSettings.icon + '" />';
+            }
+            // Set startup screen
+            if (jQTSettings.startupScreen) {
+                hairextensions += '<link rel="apple-touch-startup-image" href="' + jQTSettings.startupScreen + '" />';
+            }
+            // Set viewport
+            if (jQTSettings.fixedViewport) {
+                hairextensions += '<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;"/>';
+            }
+            // Set full-screen
+            if (jQTSettings.fullScreen) {
+                hairextensions += '<meta name="apple-mobile-web-app-capable" content="yes" />';
+                if (jQTSettings.statusBar) {
+                    hairextensions += '<meta name="apple-mobile-web-app-status-bar-style" content="' + jQTSettings.statusBar + '" />';
+                }
+            }
+            if (hairextensions) $head.append(hairextensions);
+
+            // Initialize on document load:
+            $(document).ready(function(){
+
+                // Add extensions
+                for (var i in extensions)
+                {
+                    var fn = extensions[i];
+                    if ($.isFunction(fn))
+                    {
+                        $.extend(publicObj, fn(publicObj));
+                    }
+                }
+                
+                // Add animations
+                for (var i in defaultAnimations)
+                {
+                    var name = defaultAnimations[i];
+                    var selector = jQTSettings[name + 'Selector'];
+                    if (typeof(selector) == 'string') {
+                        addAnimation({name:name, selector:selector});
+                    }
+                }
+
+                touchSelectors.push('input');
+                touchSelectors.push(jQTSettings.touchSelector);
+                touchSelectors.push(jQTSettings.backSelector);
+                touchSelectors.push(jQTSettings.submitSelector);
+                $(touchSelectors.join(', ')).css('-webkit-touch-callout', 'none');
+                $(jQTSettings.backSelector).tap(liveTap);
+                $(jQTSettings.submitSelector).tap(submitParentForm);
+
+                $body = $('body');
+                
+                if (jQTSettings.fullScreenClass && window.navigator.standalone == true) {
+                    $body.addClass(jQTSettings.fullScreenClass + ' ' + jQTSettings.statusBar);
+                }
+
+                // Create custom live events
+                $body
+                    .bind('touchstart', handleTouch)
+                    .bind('orientationchange', updateOrientation)
+                    .trigger('orientationchange')
+                    .submit(submitForm);
+                    
+                if (jQTSettings.useFastTouch && $.support.touch)
+                {
+                    $body.click(function(e){
+                        var $el = $(e.target);
+                        if ($el.attr('target') == '_blank' || $el.attr('rel') == 'external' || $el.is('input[type="checkbox"]'))
+                        {
+                            return true;
+                        } else {
+                            return false;
+                        }
+                    });
+                    
+                    // This additionally gets rid of form focusses
+                    $body.mousedown(function(e){
+                        var timeDiff = (new Date()).getTime() - lastAnimationTime;
+                        if (timeDiff < 200)
+                        {
+                            return false;
+                        }
+                    });
+                }
+
+                // Make sure exactly one child of body has "current" class
+                if ($('body > .current').length == 0) {
+                    currentPage = $('body > *:first');
+                } else {
+                    currentPage = $('body > .current:first');
+                    $('body > .current').removeClass('current');
+                }
+                
+                // Go to the top of the "current" page
+                $(currentPage).addClass('current');
+                location.hash = $(currentPage).attr('id');
+                addPageToHistory(currentPage);
+                scrollTo(0, 0);
+                dumbLoopStart();
+            });
+        }
+        
+        // PUBLIC FUNCTIONS
+        function goBack(to) {
+            // Init the param
+            if (hist.length > 1) {
+                var numberOfPages = Math.min(parseInt(to || 1, 10), hist.length-1);
+
+                // Search through the history for an ID
+                if( isNaN(numberOfPages) && typeof(to) === "string" && to != '#' ) {
+                    for( var i=1, length=hist.length; i < length; i++ ) {
+                        if( '#' + hist[i].id === to ) {
+                            numberOfPages = i;
+                            break;
+                        }
+                    }
+                }
+
+                // If still nothing, assume one
+                if( isNaN(numberOfPages) || numberOfPages < 1 ) {
+                    numberOfPages = 1;
+                };
+
+                // Grab the current page for the "from" info
+                var animation = hist[0].animation;
+                var fromPage = hist[0].page;
+
+                // Remove all pages in front of the target page
+                hist.splice(0, numberOfPages);
+
+                // Grab the target page
+                var toPage = hist[0].page;
+
+                // Make the animations
+                animatePages(fromPage, toPage, animation, true);
+                
+                return publicObj;
+            } else {
+                console.error('No pages in history.');
+                return false;
+            }
+        }
+        function goTo(toPage, animation) {
+            var fromPage = hist[0].page;
+            
+            if (typeof(toPage) === 'string') {
+                toPage = $(toPage);
+            }
+            if (typeof(animation) === 'string') {
+                for (var i = animations.length - 1; i >= 0; i--){
+                    if (animations[i].name === animation)
+                    {
+                        animation = animations[i];
+                        break;
+                    }
+                }
+            }
+            if (animatePages(fromPage, toPage, animation)) {
+                addPageToHistory(toPage, animation);
+                return publicObj;
+            }
+            else
+            {
+                console.error('Could not animate pages.');
+                return false;
+            }
+        }
+        function getOrientation() {
+            return orientation;
+        }
+
+        // PRIVATE FUNCTIONS
+        function liveTap(e){
+            
+            // Grab the clicked element
+            var $el = $(e.target);
+
+            if ($el.attr('nodeName')!=='A'){
+                $el = $el.parent('a');
+            }
+            
+            var target = $el.attr('target'), 
+            hash = $el.attr('hash'), 
+            animation=null;
+            
+            if (tapReady == false || !$el.length) {
+                console.warn('Not able to tap element.')
+                return false;
+            }
+            
+            if ($el.attr('target') == '_blank' || $el.attr('rel') == 'external')
+            {
+                return true;
+            }
+            
+            // Figure out the animation to use
+            for (var i = animations.length - 1; i >= 0; i--){
+                if ($el.is(animations[i].selector)) {
+                    animation = animations[i];
+                    break;
+                }
+            };
+
+            // User clicked an internal link, fullscreen mode
+            if (target == '_webapp') {
+                window.location = $el.attr('href');
+            }
+            // User clicked a back button
+            else if ($el.is(jQTSettings.backSelector)) {
+                goBack(hash);
+            }
+            // Branch on internal or external href
+            else if (hash && hash!='#') {
+                $el.addClass('active');
+                goTo($(hash).data('referrer', $el), animation);
+            } else {
+                $el.addClass('loading active');
+                showPageByHref($el.attr('href'), {
+                    animation: animation,
+                    callback: function(){ 
+                        $el.removeClass('loading'); setTimeout($.fn.unselect, 250, $el);
+                    },
+                    $referrer: $el
+                });
+            }
+            return false;
+        }
+        function addPageToHistory(page, animation) {
+            // Grab some info
+            var pageId = page.attr('id');
+
+            // Prepend info to page history
+            hist.unshift({
+                page: page, 
+                animation: animation, 
+                id: pageId
+            });
+        }
+        function animatePages(fromPage, toPage, animation, backwards) {
+            // Error check for target page
+            if(toPage.length === 0){
+                $.fn.unselect();
+                console.error('Target element is missing.');
+                return false;
+            }
+            
+            // Collapse the keyboard
+            $(':focus').blur();
+
+            // Make sure we are scrolled up to hide location bar
+            scrollTo(0, 0);
+            
+            // Define callback to run after animation completes
+            var callback = function(event){
+
+                if (animation)
+                {
+                    toPage.removeClass('in reverse ' + animation.name);
+                    fromPage.removeClass('current out reverse ' + animation.name);
+                }
+                else
+                {
+                    fromPage.removeClass('current');
+                }
+
+                toPage.trigger('pageAnimationEnd', { direction: 'in' });
+    	        fromPage.trigger('pageAnimationEnd', { direction: 'out' });
+                
+                clearInterval(dumbLoop);
+                currentPage = toPage;
+                location.hash = currentPage.attr('id');
+                dumbLoopStart();
+
+                var $originallink = toPage.data('referrer');
+                if ($originallink) {
+                    $originallink.unselect();
+                }
+                lastAnimationTime = (new Date()).getTime();
+                tapReady = true;
+            }
+
+            fromPage.trigger('pageAnimationStart', { direction: 'out' });
+            toPage.trigger('pageAnimationStart', { direction: 'in' });
+
+            if ($.support.WebKitAnimationEvent && animation && jQTSettings.useAnimations) {
+                toPage.one('webkitAnimationEnd', callback);
+                tapReady = false;
+                toPage.addClass(animation.name + ' in current ' + (backwards ? ' reverse' : ''));
+                fromPage.addClass(animation.name + ' out' + (backwards ? ' reverse' : ''));
+            } else {
+                toPage.addClass('current');
+                callback();
+            }
+
+            return true;
+        }
+        function dumbLoopStart() {
+            dumbLoop = setInterval(function(){
+                var curid = currentPage.attr('id');
+                if (location.hash == '') {
+                    location.hash = '#' + curid;
+                } else if (location.hash != '#' + curid) {
+                    try {
+                        goBack(location.hash)
+                    } catch(e) {
+                        console.error('Unknown hash change.');
+                    }
+                }
+            }, 100);
+        }
+        function insertPages(nodes, animation) {
+            var targetPage = null;
+            $(nodes).each(function(index, node){
+                var $node = $(this);
+                if (!$node.attr('id')) {
+                    $node.attr('id', 'page-' + (++newPageCount));
+                }
+                $node.appendTo($body);
+                if ($node.hasClass('current') || !targetPage ) {
+                    targetPage = $node;
+                }
+            });
+            if (targetPage !== null) {
+                goTo(targetPage, animation);
+                return targetPage;
+            }
+            else
+            {
+                return false;
+            }
+        }
+        function showPageByHref(href, options) {
+            var defaults = {
+                data: null,
+                method: 'GET',
+                animation: null,
+                callback: null,
+                $referrer: null
+            };
+            
+            var settings = $.extend({}, defaults, options);
+
+            if (href != '#')
+            {
+                $.ajax({
+                    url: href,
+                    data: settings.data,
+                    type: settings.method,
+                    success: function (data, textStatus) {
+                        var firstPage = insertPages(data, settings.animation);
+                        if (firstPage)
+                        {
+                            if (settings.method == 'GET' && jQTSettings.cacheGetRequests && settings.$referrer)
+                            {
+                                settings.$referrer.attr('href', '#' + firstPage.attr('id'));
+                            }
+                            if (settings.callback) {
+                                settings.callback(true);
+                            }
+                        }
+                    },
+                    error: function (data) {
+                        if (settings.$referrer) settings.$referrer.unselect();
+                        if (settings.callback) {
+                            settings.callback(false);
+                        }
+                    }
+                });
+            }
+            else if ($referrer)
+            {
+                $referrer.unselect();
+            }
+        }
+        function submitForm(e, callback){
+            var $form = (typeof(e)==='string') ? $(e) : $(e.target);
+
+            if ($form.length && $form.is(jQTSettings.formSelector) && $form.attr('action')) {
+                showPageByHref($form.attr('action'), {
+                    data: $form.serialize(),
+                    method: $form.attr('method') || "POST",
+                    animation: animations[0] || null,
+                    callback: callback
+                });
+                return false;
+            }
+            return true;
+        }
+        function submitParentForm(e){
+            var $form = $(this).closest('form');
+            if ($form.length)
+            {
+                evt = jQuery.Event("submit");
+                evt.preventDefault();
+                $form.trigger(evt);
+                return false;
+            }
+            return true;
+        }
+        function addAnimation(animation) {
+            if (typeof(animation.selector) == 'string' && typeof(animation.name) == 'string') {
+                animations.push(animation);
+                $(animation.selector).tap(liveTap);
+                touchSelectors.push(animation.selector);
+            }
+        }
+        function updateOrientation() {
+            orientation = window.innerWidth < window.innerHeight ? 'profile' : 'landscape';
+            $body.removeClass('profile landscape').addClass(orientation).trigger('turn', {orientation: orientation});
+            // scrollTo(0, 0);
+        }
+        function handleTouch(e) {
+
+            var $el = $(e.target);
+
+            // Only handle touchSelectors
+            if (!$(e.target).is(touchSelectors.join(', ')))
+            {
+                var $link = $(e.target).closest('a');
+                
+                if ($link.length){
+                    $el = $link;
+                } else {
+                    return;
+                }
+            }
+            if (event)
+            {
+                var hoverTimeout = null,
+                    startX = event.changedTouches[0].clientX,
+                    startY = event.changedTouches[0].clientY,
+                    startTime = (new Date).getTime(),
+                    deltaX = 0,
+                    deltaY = 0,
+                    deltaT = 0;
+
+                // Let's bind these after the fact, so we can keep some internal values
+                $el.bind('touchmove', touchmove).bind('touchend', touchend);
+
+                hoverTimeout = setTimeout(function(){
+                    $el.makeActive();
+                }, 100);
+                
+            }
+
+            // Private touch functions (TODO: insert dirty joke)
+            function touchmove(e) {
+                
+                updateChanges();
+                var absX = Math.abs(deltaX);
+                var absY = Math.abs(deltaY);
+                                
+                // Check for swipe
+                if (absX > absY && (absX > 35) && deltaT < 1000) {
+                    $el.trigger('swipe', {direction: (deltaX < 0) ? 'left' : 'right'}).unbind('touchmove touchend');
+                } else if (absY > 1) {
+                    $el.removeClass('active');
+                }
+
+                clearTimeout(hoverTimeout);
+            } 
+            
+            function touchend(){
+                updateChanges();
+            
+                if (deltaY === 0 && deltaX === 0) {
+                    $el.makeActive();
+                    // New approach:
+                    // Fake the double click?
+                    // TODO: Try with all click events (no tap)
+                    // if (deltaT < 40)
+                    // {
+                    //     setTimeout(function(){
+                    //        $el.trigger('touchstart')
+                    //          .trigger('touchend');
+                    //     }, 0);
+                    // }
+                    $el.trigger('tap');
+                } else {
+                    $el.removeClass('active');
+                }
+                $el.unbind('touchmove touchend');
+                clearTimeout(hoverTimeout);
+            }
+            
+            function updateChanges(){
+                var first = event.changedTouches[0] || null;
+                deltaX = first.pageX - startX;
+                deltaY = first.pageY - startY;
+                deltaT = (new Date).getTime() - startTime;
+            }
+
+        } // End touch handler
+
+        // Public jQuery Fns
+        $.fn.unselect = function(obj) {
+            if (obj) {
+                obj.removeClass('active');
+            } else {
+                $('.active').removeClass('active');
+            }
+        }
+        $.fn.makeActive = function(){
+            return $(this).addClass('active');
+        }
+        $.fn.swipe = function(fn) {
+            if ($.isFunction(fn))
+            {
+                return this.each(function(i, el){
+                    $(el).bind('swipe', fn);  
+                });
+            }
+        }
+        $.fn.tap = function(fn){
+            if ($.isFunction(fn))
+            {
+                var tapEvent = (jQTSettings.useFastTouch && $.support.touch) ? 'tap' : 'click';
+                return $(this).live(tapEvent, fn);
+            } else {
+                $(this).trigger('tap');
+            }
+        }
+        
+        publicObj = {
+            getOrientation: getOrientation,
+            goBack: goBack,
+            goTo: goTo,
+            addAnimation: addAnimation,
+            submitForm: submitForm
+        }
+
+        return publicObj;
+    }
+    
+    // Extensions directly manipulate the jQTouch object, before it's initialized.
+    $.jQTouch.prototype.extensions = [];
+    $.jQTouch.addExtension = function(extension){
+        $.jQTouch.prototype.extensions.push(extension);
+    }
+
+})(jQuery);
Index: extensions/iPiwigo/www/jqtouch/jqtouch.min.css
===================================================================
--- extensions/iPiwigo/www/jqtouch/jqtouch.min.css	(revision 9188)
+++ extensions/iPiwigo/www/jqtouch/jqtouch.min.css	(revision 9188)
@@ -0,0 +1,1 @@
+*{margin:0;padding:0;}a{-webkit-tap-highlight-color:rgba(0,0,0,0);}body{overflow-x:hidden;-webkit-user-select:none;-webkit-text-size-adjust:none;font-family:Helvetica;-webkit-perspective:800;-webkit-transform-style:preserve-3d;}.selectable,input,textarea{-webkit-user-select:auto;}body>*{-webkit-backface-visibility:hidden;-webkit-box-sizing:border-box;display:none;position:absolute;left:0;width:100%;-webkit-transform:translate3d(0,0,0) rotate(0) scale(1);min-height:420px!important;}body.fullscreen>*{min-height:460px!important;}body.fullscreen.black-translucent>*{min-height:480px!important;}body.landscape>*{min-height:320px;}body>.current{display:block!important;}.in,.out{-webkit-animation-timing-function:ease-in-out;-webkit-animation-duration:350ms;}.slide.in{-webkit-animation-name:slideinfromright;}.slide.out{-webkit-animation-name:slideouttoleft;}.slide.in.reverse{-webkit-animation-name:slideinfromleft;}.slide.out.reverse{-webkit-animation-name:slideouttoright;}@-webkit-keyframes slideinfromright{from{-webkit-transform:translateX(100%);}to{-webkit-transform:translateX(0);}}@-webkit-keyframes slideinfromleft{from{-webkit-transform:translateX(-100%);}to{-webkit-transform:translateX(0);}}@-webkit-keyframes slideouttoleft{from{-webkit-transform:translateX(0);}to{-webkit-transform:translateX(-100%);}}@-webkit-keyframes slideouttoright{from{-webkit-transform:translateX(0);}to{-webkit-transform:translateX(100%);}}@-webkit-keyframes fadein{from{opacity:0;}to{opacity:1;}}@-webkit-keyframes fadeout{from{opacity:1;}to{opacity:0;}}.fade.in{z-index:10;-webkit-animation-name:fadein;}.fade.out{z-index:0;}.dissolve.in{-webkit-animation-name:fadein;}.dissolve.out{-webkit-animation-name:fadeout;}.flip{-webkit-animation-duration:.65s;}.flip.in{-webkit-animation-name:flipinfromleft;}.flip.out{-webkit-animation-name:flipouttoleft;}.flip.in.reverse{-webkit-animation-name:flipinfromright;}.flip.out.reverse{-webkit-animation-name:flipouttoright;}@-webkit-keyframes flipinfromright{from{-webkit-transform:rotateY(-180deg) scale(.8);}to{-webkit-transform:rotateY(0) scale(1);}}@-webkit-keyframes flipinfromleft{from{-webkit-transform:rotateY(180deg) scale(.8);}to{-webkit-transform:rotateY(0) scale(1);}}@-webkit-keyframes flipouttoleft{from{-webkit-transform:rotateY(0) scale(1);}to{-webkit-transform:rotateY(-180deg) scale(.8);}}@-webkit-keyframes flipouttoright{from{-webkit-transform:rotateY(0) scale(1);}to{-webkit-transform:rotateY(180deg) scale(.8);}}.slideup.in{-webkit-animation-name:slideup;z-index:10;}.slideup.out{-webkit-animation-name:dontmove;z-index:0;}.slideup.out.reverse{z-index:10;-webkit-animation-name:slidedown;}.slideup.in.reverse{z-index:0;-webkit-animation-name:dontmove;}@-webkit-keyframes slideup{from{-webkit-transform:translateY(100%);}to{-webkit-transform:translateY(0);}}@-webkit-keyframes slidedown{from{-webkit-transform:translateY(0);}to{-webkit-transform:translateY(100%);}}@-webkit-keyframes dontmove{from{opacity:1;}to{opacity:1;}}.swap{-webkit-transform:perspective(800);-webkit-animation-duration:.7s;}.swap.out{-webkit-animation-name:swapouttoleft;}.swap.in{-webkit-animation-name:swapinfromright;}.swap.out.reverse{-webkit-animation-name:swapouttoright;}.swap.in.reverse{-webkit-animation-name:swapinfromleft;}@-webkit-keyframes swapouttoright{0%{-webkit-transform:translate3d(0px,0px,0px) rotateY(0deg);-webkit-animation-timing-function:ease-in-out;}50%{-webkit-transform:translate3d(-180px,0px,-400px) rotateY(20deg);-webkit-animation-timing-function:ease-in;}100%{-webkit-transform:translate3d(0px,0px,-800px) rotateY(70deg);}}@-webkit-keyframes swapouttoleft{0%{-webkit-transform:translate3d(0px,0px,0px) rotateY(0deg);-webkit-animation-timing-function:ease-in-out;}50%{-webkit-transform:translate3d(180px,0px,-400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;}100%{-webkit-transform:translate3d(0px,0px,-800px) rotateY(-70deg);}}@-webkit-keyframes swapinfromright{0%{-webkit-transform:translate3d(0px,0px,-800px) rotateY(70deg);-webkit-animation-timing-function:ease-out;}50%{-webkit-transform:translate3d(-180px,0px,-400px) rotateY(20deg);-webkit-animation-timing-function:ease-in-out;}100%{-webkit-transform:translate3d(0px,0px,0px) rotateY(0deg);}}@-webkit-keyframes swapinfromleft{0%{-webkit-transform:translate3d(0px,0px,-800px) rotateY(-70deg);-webkit-animation-timing-function:ease-out;}50%{-webkit-transform:translate3d(180px,0px,-400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in-out;}100%{-webkit-transform:translate3d(0px,0px,0px) rotateY(0deg);}}.cube{-webkit-animation-duration:.55s;}.cube.in{-webkit-animation-name:cubeinfromright;-webkit-transform-origin:0 50%;}.cube.out{-webkit-animation-name:cubeouttoleft;-webkit-transform-origin:100% 50%;}.cube.in.reverse{-webkit-animation-name:cubeinfromleft;-webkit-transform-origin:100% 50%;}.cube.out.reverse{-webkit-animation-name:cubeouttoright;-webkit-transform-origin:0 50%;}@-webkit-keyframes cubeinfromleft{from{-webkit-transform:rotateY(-90deg) translateZ(320px);opacity:.5;}to{-webkit-transform:rotateY(0deg) translateZ(0);opacity:1;}}@-webkit-keyframes cubeouttoright{from{-webkit-transform:rotateY(0deg) translateX(0);opacity:1;}to{-webkit-transform:rotateY(90deg) translateZ(320px);opacity:.5;}}@-webkit-keyframes cubeinfromright{from{-webkit-transform:rotateY(90deg) translateZ(320px);opacity:.5;}to{-webkit-transform:rotateY(0deg) translateZ(0);opacity:1;}}@-webkit-keyframes cubeouttoleft{from{-webkit-transform:rotateY(0deg) translateZ(0);opacity:1;}to{-webkit-transform:rotateY(-90deg) translateZ(320px);opacity:.5;}}.pop{-webkit-transform-origin:50% 50%;}.pop.in{-webkit-animation-name:popin;z-index:10;}.pop.out.reverse{-webkit-animation-name:popout;z-index:10;}.pop.in.reverse{z-index:0;-webkit-animation-name:dontmove;}@-webkit-keyframes popin{from{-webkit-transform:scale(.2);opacity:0;}to{-webkit-transform:scale(1);opacity:1;}}@-webkit-keyframes popout{from{-webkit-transform:scale(1);opacity:1;}to{-webkit-transform:scale(.2);opacity:0;}}
Index: extensions/iPiwigo/www/jqtouch/jqtouch.min.js
===================================================================
--- extensions/iPiwigo/www/jqtouch/jqtouch.min.js	(revision 9188)
+++ extensions/iPiwigo/www/jqtouch/jqtouch.min.js	(revision 9188)
@@ -0,0 +1,1 @@
+(function($){$.jQTouch=function(_2){$.support.WebKitCSSMatrix=(typeof WebKitCSSMatrix=="object");$.support.touch=(typeof Touch=="object");$.support.WebKitAnimationEvent=(typeof WebKitTransitionEvent=="object");var _3,$head=$("head"),hist=[],newPageCount=0,jQTSettings={},hashCheck,currentPage,orientation,isMobileWebKit=RegExp(" Mobile/").test(navigator.userAgent),tapReady=true,lastAnimationTime=0,touchSelectors=[],publicObj={},extensions=$.jQTouch.prototype.extensions,defaultAnimations=["slide","flip","slideup","swap","cube","pop","dissolve","fade","back"],animations=[],hairextensions="";init(_2);function init(_4){var _5={addGlossToIcon:true,backSelector:".back, .cancel, .goback",cacheGetRequests:true,cubeSelector:".cube",dissolveSelector:".dissolve",fadeSelector:".fade",fixedViewport:true,flipSelector:".flip",formSelector:"form",fullScreen:true,fullScreenClass:"fullscreen",icon:null,touchSelector:"a, .touch",popSelector:".pop",preloadImages:false,slideSelector:"body > * > ul li a",slideupSelector:".slideup",startupScreen:null,statusBar:"default",submitSelector:".submit",swapSelector:".swap",useAnimations:true,useFastTouch:true};jQTSettings=$.extend({},_5,_4);if(jQTSettings.preloadImages){for(var i=jQTSettings.preloadImages.length-1;i>=0;i--){(new Image()).src=jQTSettings.preloadImages[i];}}if(jQTSettings.icon){var _7=(jQTSettings.addGlossToIcon)?"":"-precomposed";hairextensions+="<link rel=\"apple-touch-icon"+_7+"\" href=\""+jQTSettings.icon+"\" />";}if(jQTSettings.startupScreen){hairextensions+="<link rel=\"apple-touch-startup-image\" href=\""+jQTSettings.startupScreen+"\" />";}if(jQTSettings.fixedViewport){hairextensions+="<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;\"/>";}if(jQTSettings.fullScreen){hairextensions+="<meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />";if(jQTSettings.statusBar){hairextensions+="<meta name=\"apple-mobile-web-app-status-bar-style\" content=\""+jQTSettings.statusBar+"\" />";}}if(hairextensions){$head.append(hairextensions);}$(document).ready(function(){for(var i in extensions){var fn=extensions[i];if($.isFunction(fn)){$.extend(publicObj,fn(publicObj));}}for(var i in defaultAnimations){var _a=defaultAnimations[i];var _b=jQTSettings[_a+"Selector"];if(typeof (_b)=="string"){addAnimation({name:_a,selector:_b});}}touchSelectors.push("input");touchSelectors.push(jQTSettings.touchSelector);touchSelectors.push(jQTSettings.backSelector);touchSelectors.push(jQTSettings.submitSelector);$(touchSelectors.join(", ")).css("-webkit-touch-callout","none");$(jQTSettings.backSelector).tap(liveTap);$(jQTSettings.submitSelector).tap(submitParentForm);_3=$("body");if(jQTSettings.fullScreenClass&&window.navigator.standalone==true){_3.addClass(jQTSettings.fullScreenClass+" "+jQTSettings.statusBar);}_3.bind("touchstart",handleTouch).bind("orientationchange",updateOrientation).trigger("orientationchange").submit(submitForm);if(jQTSettings.useFastTouch&&$.support.touch){_3.click(function(e){var _d=$(e.target);if(_d.attr("target")=="_blank"||_d.attr("rel")=="external"||_d.is("input[type=\"checkbox\"]")){return true;}else{return false;}});_3.mousedown(function(e){var _f=(new Date()).getTime()-lastAnimationTime;if(_f<200){return false;}});}if($("body > .current").length==0){currentPage=$("body > *:first");}else{currentPage=$("body > .current:first");$("body > .current").removeClass("current");}$(currentPage).addClass("current");location.hash=$(currentPage).attr("id");addPageToHistory(currentPage);scrollTo(0,0);dumbLoopStart();});}function goBack(to){if(hist.length>1){var _11=Math.min(parseInt(to||1,10),hist.length-1);if(isNaN(_11)&&typeof (to)==="string"&&to!="#"){for(var i=1,length=hist.length;i<length;i++){if("#"+hist[i].id===to){_11=i;break;}}}if(isNaN(_11)||_11<1){_11=1;}var _13=hist[0].animation;var _14=hist[0].page;hist.splice(0,_11);var _15=hist[0].page;animatePages(_14,_15,_13,true);return publicObj;}else{console.error("No pages in history.");return false;}}function goTo(_16,_17){var _18=hist[0].page;if(typeof (_16)==="string"){_16=$(_16);}if(typeof (_17)==="string"){for(var i=animations.length-1;i>=0;i--){if(animations[i].name===_17){_17=animations[i];break;}}}if(animatePages(_18,_16,_17)){addPageToHistory(_16,_17);return publicObj;}else{console.error("Could not animate pages.");return false;}}function getOrientation(){return orientation;}function liveTap(e){var $el=$(e.target);if($el.attr("nodeName")!=="A"){$el=$el.parent("a");}var _1c=$el.attr("target"),hash=$el.attr("hash"),animation=null;if(tapReady==false||!$el.length){console.warn("Not able to tap element.");return false;}if($el.attr("target")=="_blank"||$el.attr("rel")=="external"){return true;}for(var i=animations.length-1;i>=0;i--){if($el.is(animations[i].selector)){animation=animations[i];break;}}if(_1c=="_webapp"){window.location=$el.attr("href");}else{if($el.is(jQTSettings.backSelector)){goBack(hash);}else{if(hash&&hash!="#"){$el.addClass("active");goTo($(hash).data("referrer",$el),animation);}else{$el.addClass("loading active");showPageByHref($el.attr("href"),{animation:animation,callback:function(){$el.removeClass("loading");setTimeout($.fn.unselect,250,$el);},$referrer:$el});}}}return false;}function addPageToHistory(_1e,_1f){var _20=_1e.attr("id");hist.unshift({page:_1e,animation:_1f,id:_20});}function animatePages(_21,_22,_23,_24){if(_22.length===0){$.fn.unselect();console.error("Target element is missing.");return false;}$(":focus").blur();scrollTo(0,0);var _25=function(_26){if(_23){_22.removeClass("in reverse "+_23.name);_21.removeClass("current out reverse "+_23.name);}else{_21.removeClass("current");}_22.trigger("pageAnimationEnd",{direction:"in"});_21.trigger("pageAnimationEnd",{direction:"out"});clearInterval(dumbLoop);currentPage=_22;location.hash=currentPage.attr("id");dumbLoopStart();var _27=_22.data("referrer");if(_27){_27.unselect();}lastAnimationTime=(new Date()).getTime();tapReady=true;};_21.trigger("pageAnimationStart",{direction:"out"});_22.trigger("pageAnimationStart",{direction:"in"});if($.support.WebKitAnimationEvent&&_23&&jQTSettings.useAnimations){_22.one("webkitAnimationEnd",_25);tapReady=false;_22.addClass(_23.name+" in current "+(_24?" reverse":""));_21.addClass(_23.name+" out"+(_24?" reverse":""));}else{_22.addClass("current");_25();}return true;}function dumbLoopStart(){dumbLoop=setInterval(function(){var _28=currentPage.attr("id");if(location.hash==""){location.hash="#"+_28;}else{if(location.hash!="#"+_28){try{goBack(location.hash);}catch(e){console.error("Unknown hash change.");}}}},100);}function insertPages(_29,_2a){var _2b=null;$(_29).each(function(_2c,_2d){var _2e=$(this);if(!_2e.attr("id")){_2e.attr("id","page-"+(++newPageCount));}_2e.appendTo(_3);if(_2e.hasClass("current")||!_2b){_2b=_2e;}});if(_2b!==null){goTo(_2b,_2a);return _2b;}else{return false;}}function showPageByHref(_2f,_30){var _31={data:null,method:"GET",animation:null,callback:null,$referrer:null};var _32=$.extend({},_31,_30);if(_2f!="#"){$.ajax({url:_2f,data:_32.data,type:_32.method,success:function(_33,_34){var _35=insertPages(_33,_32.animation);if(_35){if(_32.method=="GET"&&jQTSettings.cacheGetRequests&&_32.$referrer){_32.$referrer.attr("href","#"+_35.attr("id"));}if(_32.callback){_32.callback(true);}}},error:function(_36){if(_32.$referrer){_32.$referrer.unselect();}if(_32.callback){_32.callback(false);}}});}else{if($referrer){$referrer.unselect();}}}function submitForm(e,_38){var _39=(typeof (e)==="string")?$(e):$(e.target);if(_39.length&&_39.is(jQTSettings.formSelector)&&_39.attr("action")){showPageByHref(_39.attr("action"),{data:_39.serialize(),method:_39.attr("method")||"POST",animation:animations[0]||null,callback:_38});return false;}return true;}function submitParentForm(e){var _3b=$(this).closest("form");if(_3b.length){evt=jQuery.Event("submit");evt.preventDefault();_3b.trigger(evt);return false;}return true;}function addAnimation(_3c){if(typeof (_3c.selector)=="string"&&typeof (_3c.name)=="string"){animations.push(_3c);$(_3c.selector).tap(liveTap);touchSelectors.push(_3c.selector);}}function updateOrientation(){orientation=window.innerWidth<window.innerHeight?"profile":"landscape";_3.removeClass("profile landscape").addClass(orientation).trigger("turn",{orientation:orientation});}function handleTouch(e){var $el=$(e.target);if(!$(e.target).is(touchSelectors.join(", "))){var _3f=$(e.target).closest("a");if(_3f.length){$el=_3f;}else{return;}}if(event){var _40=null,startX=event.changedTouches[0].clientX,startY=event.changedTouches[0].clientY,startTime=(new Date).getTime(),deltaX=0,deltaY=0,deltaT=0;$el.bind("touchmove",touchmove).bind("touchend",touchend);_40=setTimeout(function(){$el.makeActive();},100);}function touchmove(e){updateChanges();var _42=Math.abs(deltaX);var _43=Math.abs(deltaY);if(_42>_43&&(_42>35)&&deltaT<1000){$el.trigger("swipe",{direction:(deltaX<0)?"left":"right"}).unbind("touchmove touchend");}else{if(_43>1){$el.removeClass("active");}}clearTimeout(_40);}function touchend(){updateChanges();if(deltaY===0&&deltaX===0){$el.makeActive();$el.trigger("tap");}else{$el.removeClass("active");}$el.unbind("touchmove touchend");clearTimeout(_40);}function updateChanges(){var _44=event.changedTouches[0]||null;deltaX=_44.pageX-startX;deltaY=_44.pageY-startY;deltaT=(new Date).getTime()-startTime;}}$.fn.unselect=function(obj){if(obj){obj.removeClass("active");}else{$(".active").removeClass("active");}};$.fn.makeActive=function(){return $(this).addClass("active");};$.fn.swipe=function(fn){if($.isFunction(fn)){return this.each(function(i,el){$(el).bind("swipe",fn);});}};$.fn.tap=function(fn){if($.isFunction(fn)){var _4a=(jQTSettings.useFastTouch&&$.support.touch)?"tap":"click";return $(this).live(_4a,fn);}else{$(this).trigger("tap");}};publicObj={getOrientation:getOrientation,goBack:goBack,goTo:goTo,addAnimation:addAnimation,submitForm:submitForm};return publicObj;};$.jQTouch.prototype.extensions=[];$.jQTouch.addExtension=function(_4b){$.jQTouch.prototype.extensions.push(_4b);};})(jQuery);
Index: extensions/iPiwigo/www/jqtouch/jqtouch.transitions.js
===================================================================
--- extensions/iPiwigo/www/jqtouch/jqtouch.transitions.js	(revision 9188)
+++ extensions/iPiwigo/www/jqtouch/jqtouch.transitions.js	(revision 9188)
@@ -0,0 +1,60 @@
+/*
+
+            _/    _/_/    _/_/_/_/_/                              _/       
+               _/    _/      _/      _/_/    _/    _/    _/_/_/  _/_/_/    
+          _/  _/  _/_/      _/    _/    _/  _/    _/  _/        _/    _/   
+         _/  _/    _/      _/    _/    _/  _/    _/  _/        _/    _/    
+        _/    _/_/  _/    _/      _/_/      _/_/_/    _/_/_/  _/    _/     
+       _/                                                                  
+    _/
+
+    Created by David Kaneda <http://www.davidkaneda.com>
+    Documentation and issue tracking on Google Code <http://code.google.com/p/jqtouch/>
+    
+    Special thanks to Jonathan Stark <http://jonathanstark.com/>
+    and pinch/zoom <http://www.pinchzoom.com/>
+    
+    (c) 2009 by jQTouch project members.
+    See LICENSE.txt for license.
+
+*/
+
+(function($) {
+    
+    $.fn.transition = function(css, options) {
+        return this.each(function(){
+            var $el = $(this);
+            var defaults = {
+                speed : '300ms',
+                callback: null,
+                ease: 'ease-in-out'
+            };
+            var settings = $.extend({}, defaults, options);
+            if(settings.speed === 0) {
+                $el.css(css);
+                window.setTimeout(settings.callback, 0);
+            } else {
+                if ($.browser.safari)
+                {
+                    var s = [];
+                    for(var i in css) {
+                        s.push(i);
+                    }
+                    $el.css({
+                        webkitTransitionProperty: s.join(", "), 
+                        webkitTransitionDuration: settings.speed, 
+                        webkitTransitionTimingFunction: settings.ease
+                    });
+                    if (settings.callback) {
+                        $el.one('webkitTransitionEnd', settings.callback);
+                    }
+                    setTimeout(function(el){ el.css(css) }, 0, $el);
+                }
+                else
+                {
+                    $el.animate(css, settings.speed, settings.callback);
+                }
+            }
+        });
+    }
+})(jQuery);
Index: extensions/iPiwigo/www/jqtouch/jquery.1.3.2.min.js
===================================================================
--- extensions/iPiwigo/www/jqtouch/jquery.1.3.2.min.js	(revision 9188)
+++ extensions/iPiwigo/www/jqtouch/jquery.1.3.2.min.js	(revision 9188)
@@ -0,0 +1,19 @@
+/*
+ * jQuery JavaScript Library v1.3.2
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
+ * Revision: 6246
+ */
+(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
+/*
+ * Sizzle CSS Selector Engine - v0.9.3
+ *  Copyright 2009, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
Index: extensions/iPiwigo/www/jquery-1.4.4.min.js
===================================================================
--- extensions/iPiwigo/www/jquery-1.4.4.min.js	(revision 9188)
+++ extensions/iPiwigo/www/jquery-1.4.4.min.js	(revision 9188)
@@ -0,0 +1,167 @@
+/*!
+ * jQuery JavaScript Library v1.4.4
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Nov 11 19:04:53 2010 -0500
+ */
+(function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h=
+h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;k<J.length;k++){h=J[k];h.origType.replace(X,"")===a.type?f.push(h.selector):J.splice(k--,1)}f=c(a.target).closest(f,a.currentTarget);o=0;for(x=f.length;o<x;o++){r=f[o];for(k=0;k<J.length;k++){h=J[k];if(r.selector===h.selector&&(!A||A.test(h.namespace))){l=r.elem;e=null;if(h.preType==="mouseenter"||
+h.preType==="mouseleave"){a.type=h.preType;e=c(a.relatedTarget).closest(h.selector)[0]}if(!e||e!==l)C.push({elem:l,handleObj:h,level:r.level})}}}o=0;for(x=C.length;o<x;o++){f=C[o];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La,
+"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,
+e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,
+"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+
+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j,
+s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,
+j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},
+toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j===
+-1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false;
+if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K<Q;K++)if((j=arguments[K])!=null)for(s in j){v=G[s];z=j[s];if(G!==z)if(ga&&z&&(b.isPlainObject(z)||(H=b.isArray(z)))){if(H){H=false;v=v&&b.isArray(v)?v:[]}else v=v&&b.isPlainObject(v)?v:{};G[s]=b.extend(ga,v,z)}else if(z!==B)G[s]=z}return G};b.extend({noConflict:function(j){E.$=e;if(j)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(j){j===true&&b.readyWait--;
+if(!b.readyWait||j!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,1);b.isReady=true;if(!(j!==true&&--b.readyWait>0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload",
+b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&&
+!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&&
+l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H<G;){if(s.apply(j[H++],v)===false)break}else if(K)for(z in j){if(s.call(j[z],
+z,j[z])===false)break}else for(v=j[0];H<G&&s.call(v,H,v)!==false;v=j[++H]);return j},trim:O?function(j){return j==null?"":O.call(j)}:function(j){return j==null?"":j.toString().replace(k,"").replace(o,"")},makeArray:function(j,s){var v=s||[];if(j!=null){var z=b.type(j);j.length==null||z==="string"||z==="function"||z==="regexp"||b.isWindow(j)?M.call(v,j):b.merge(v,j)}return v},inArray:function(j,s){if(s.indexOf)return s.indexOf(j);for(var v=0,z=s.length;v<z;v++)if(s[v]===j)return v;return-1},merge:function(j,
+s){var v=j.length,z=0;if(typeof s.length==="number")for(var H=s.length;z<H;z++)j[v++]=s[z];else for(;s[z]!==B;)j[v++]=s[z++];j.length=v;return j},grep:function(j,s,v){var z=[],H;v=!!v;for(var G=0,K=j.length;G<K;G++){H=!!s(j[G],G);v!==H&&z.push(j[G])}return z},map:function(j,s,v){for(var z=[],H,G=0,K=j.length;G<K;G++){H=s(j[G],G,v);if(H!=null)z[z.length]=H}return z.concat.apply([],z)},guid:1,proxy:function(j,s,v){if(arguments.length===2)if(typeof s==="string"){v=j;j=v[s];s=B}else if(s&&!b.isFunction(s)){v=
+s;s=B}if(!s&&j)s=function(){return j.apply(v||this,arguments)};if(j)s.guid=j.guid=j.guid||s.guid||b.guid++;return s},access:function(j,s,v,z,H,G){var K=j.length;if(typeof s==="object"){for(var Q in s)b.access(j,Q,s[Q],z,H,v);return j}if(v!==B){z=!G&&z&&b.isFunction(v);for(Q=0;Q<K;Q++)H(j[Q],s,z?v.call(j[Q],Q,H(j[Q],s)):v,G);return j}return K?H(j[0],s):B},now:function(){return(new Date).getTime()},uaMatch:function(j){j=j.toLowerCase();j=L.exec(j)||g.exec(j)||i.exec(j)||j.indexOf("compatible")<0&&n.exec(j)||
+[];return{browser:j[1]||"",version:j[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(j,s){R["[object "+s+"]"]=s.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=m.version}if(b.browser.webkit)b.browser.safari=true;if(D)b.inArray=function(j,s){return D.call(s,j)};if(!/\s/.test("\u00a0")){k=/^[\s\xA0]+/;o=/[\s\xA0]+$/}f=b(t);if(t.addEventListener)u=function(){t.removeEventListener("DOMContentLoaded",u,
+false);b.ready()};else if(t.attachEvent)u=function(){if(t.readyState==="complete"){t.detachEvent("onreadystatechange",u);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=t.documentElement,b=t.createElement("script"),d=t.createElement("div"),e="script"+c.now();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"),
+k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false,
+scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent=
+false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom=
+1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display=
+"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h=
+c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);
+else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h<l;h++){f=e[h].name;if(f.indexOf("data-")===0){f=f.substr(5);ka(this[0],f,d[f])}}}return d}else if(typeof a==="object")return this.each(function(){c.data(this,
+a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(b===B){d=this.triggerHandler("getData"+k[1]+"!",[k[0]]);if(d===B&&this.length){d=c.data(this[0],a);d=ka(this[0],a,d)}return d===B&&k[1]?this.data(k[0]):d}else return this.each(function(){var o=c(this),x=[k[0],b];o.triggerHandler("setData"+k[1]+"!",x);c.data(this,a,b);o.triggerHandler("changeData"+k[1]+"!",x)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=
+c.data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===B)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,
+a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var sa=/[\n\t]/g,ha=/\s+/,Sa=/\r/g,Ta=/^(?:href|src|style)$/,Ua=/^(?:button|input)$/i,Va=/^(?:button|input|object|select|textarea)$/i,Wa=/^a(?:rea)?$/i,ta=/^(?:radio|checkbox)$/i;c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",
+colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(x){var r=c(this);r.addClass(a.call(this,x,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===
+1)if(f.className){for(var h=" "+f.className+" ",l=f.className,k=0,o=b.length;k<o;k++)if(h.indexOf(" "+b[k]+" ")<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var x=c(this);x.removeClass(a.call(this,o,x.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(sa," "),
+l=0,k=b.length;l<k;l++)h=h.replace(" "+b[l]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,l=c(this),k=b,o=a.split(ha);f=o[h++];){k=e?k:!l.hasClass(f);l[k?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,
+"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";
+if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r=
+a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},
+attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&
+b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0};
+c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,
+arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid=
+d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+
+c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h<A.length;h++){C=A[h];if(d.guid===C.guid){if(k||x.test(C.namespace)){e==null&&A.splice(h--,1);r.remove&&r.remove.call(a,C)}if(e!=null)break}}if(A.length===0||e!=null&&A.length===1){if(!r.teardown||r.teardown.call(a,o)===false)c.removeEvent(a,f,w.handle);delete I[f]}}else for(h=0;h<A.length;h++){C=A[h];if(k||x.test(C.namespace)){c.event.remove(a,r,C.handler,h);A.splice(h--,1)}}}if(c.isEmptyObject(I)){if(b=
+w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,J);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
+8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k===
+"click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+
+d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f<l;f++){var k=d[f];if(b||e.test(k.namespace)){a.handler=k.handler;a.data=k.data;a.handleObj=k;k=k.handler.apply(this,h);if(k!==B){a.result=k;if(k===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||t;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=t.documentElement;d=t.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
+d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==B)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ka,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,
+Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=t.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=
+c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ca;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ca;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ca;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U};
+var va=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},wa=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?wa:va,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?wa:va)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!==
+"form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=B;return la("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=B;return la("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V,
+xa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired=
+B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type===
+"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]===
+0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,
+a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d=
+1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var ya={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var l,k=0,o,x,r=h||this.selector;h=h?this:c(this.context);if(typeof d===
+"object"&&!d.preventDefault){for(l in d)h[b](l,e,d[l],r);return this}if(c.isFunction(e)){f=e;e=B}for(d=(d||"").split(" ");(l=d[k++])!=null;){o=X.exec(l);x="";if(o){x=o[0];l=l.replace(X,"")}if(l==="hover")d.push("mouseenter"+x,"mouseleave"+x);else{o=l;if(l==="focus"||l==="blur"){d.push(ya[l]+x);l+=x}else l=(ya[l]||l)+x;if(b==="live"){x=0;for(var A=h.length;x<A;x++)c.event.add(h[x],"live."+Y(l,r),{data:e,selector:r,handler:f,origType:l,origHandler:f,preType:o})}else h.unbind("live."+Y(l,r),f)}}return this}});
+c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
+(function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1&&!q){y.sizcache=n;y.sizset=p}if(y.nodeName.toLowerCase()===i){F=y;break}y=y[g]}m[p]=F}}}function b(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1){if(!q){y.sizcache=n;y.sizset=p}if(typeof i!=="string"){if(y===i){F=true;break}}else if(k.filter(i,
+[y]).length>0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3];
+break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr,
+q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h=
+l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*"));
+return{set:m,expr:g}};k.filter=function(g,i,n,m){for(var p,q,u=g,y=[],F=i,M=i&&i[0]&&k.isXML(i[0]);g&&i.length;){for(var N in o.filter)if((p=o.leftMatch[N].exec(g))!=null&&p[2]){var O,D,R=o.filter[N];D=p[1];q=false;p.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(F===y)y=[];if(o.preFilter[N])if(p=o.preFilter[N](p,F,n,y,m,M)){if(p===true)continue}else q=O=true;if(p)for(var j=0;(D=F[j])!=null;j++)if(D){O=R(D,p,j,F);var s=m^!!O;if(n&&O!=null)if(s)q=true;else F[j]=false;else if(s){y.push(D);q=true}}if(O!==
+B){n||(F=y);g=g.replace(o.match[N],"");if(!q)return[];break}}}if(g===u)if(q==null)k.error(g);else break;u=g}return F};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var o=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
+POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,i){var n=typeof i==="string",m=n&&!/\W/.test(i);n=n&&!m;if(m)i=i.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=n||q&&q.nodeName.toLowerCase()===
+i?q||false:q===i}n&&k.filter(i,g,true)},">":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p<q;p++){if(n=g[p]){n=n.parentNode;g[p]=n.nodeName.toLowerCase()===i?n:false}}else{for(;p<q;p++)if(n=g[p])g[p]=m?n.parentNode:n.parentNode===i;m&&k.filter(i,g,true)}},"":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=i=i.toLowerCase();q=a}q("parentNode",i,p,g,m,n)},"~":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=
+i=i.toLowerCase();q=a}q("previousSibling",i,p,g,m,n)}},find:{ID:function(g,i,n){if(typeof i.getElementById!=="undefined"&&!n)return(g=i.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,i){if(typeof i.getElementsByName!=="undefined"){for(var n=[],m=i.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&n.push(m[p]);return n.length===0?null:n}},TAG:function(g,i){return i.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,i,n,m,p,q){g=" "+g[1].replace(/\\/g,
+"")+" ";if(q)return g;q=0;for(var u;(u=i[q])!=null;q++)if(u)if(p^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n,
+m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===
+true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===
+g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return i<n[3]-0},gt:function(g,i,n){return i>n[3]-0},nth:function(g,i,n){return n[3]-
+0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n<m;n++)if(i[n]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,i){var n=i[1],m=g;switch(n){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(n===
+"first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":n=i[2];var p=i[3];if(n===1&&p===0)return true;var q=i[0],u=g.parentNode;if(u&&(u.sizcache!==q||!g.nodeIndex)){var y=0;for(m=u.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++y;u.sizcache=q}m=g.nodeIndex-p;return n===0?m===0:m%n===0&&m/n>=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
+i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]];
+if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m,
+g);else if(typeof g.length==="number")for(var p=g.length;n<p;n++)m.push(g[n]);else for(;g[n];n++)m.push(g[n]);return m}}var w,I;if(t.documentElement.compareDocumentPosition)w=function(g,i){if(g===i){h=true;return 0}if(!g.compareDocumentPosition||!i.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(i)&4?-1:1};else{w=function(g,i){var n,m,p=[],q=[];n=g.parentNode;m=i.parentNode;var u=n;if(g===i){h=true;return 0}else if(n===m)return I(g,i);else if(n){if(!m)return 1}else return-1;
+for(;u;){p.unshift(u);u=u.parentNode}for(u=m;u;){q.unshift(u);u=u.parentNode}n=p.length;m=q.length;for(u=0;u<n&&u<m;u++)if(p[u]!==q[u])return I(p[u],q[u]);return u===n?I(g,q[u],-1):I(p[u],i,1)};I=function(g,i,n){if(g===i)return n;for(g=g.nextSibling;g;){if(g===i)return-1;g=g.nextSibling}return 1}}k.getText=function(g){for(var i="",n,m=0;g[m];m++){n=g[m];if(n.nodeType===3||n.nodeType===4)i+=n.nodeValue;else if(n.nodeType!==8)i+=k.getText(n.childNodes)}return i};(function(){var g=t.createElement("div"),
+i="script"+(new Date).getTime(),n=t.documentElement;g.innerHTML="<a name='"+i+"'/>";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g);
+n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&&
+function(){var g=k,i=t.createElement("div");i.innerHTML="<p class='TEST'></p>";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F||
+p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g=
+t.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition?
+function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n<u;n++)k(g,q[n],m);return k.filter(p,m)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=k.getText;c.isXMLDoc=k.isXML;
+c.contains=k.contains})();var Za=/Until$/,$a=/^(?:parents|prevUntil|prevAll)/,ab=/,/,Na=/^.[^:#\[\.,]*$/,bb=Array.prototype.slice,cb=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var l=0;l<d;l++)if(b[l]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},
+not:function(a){return this.pushStack(ma(this,a,false),"not",a)},filter:function(a){return this.pushStack(ma(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h=
+h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(l?l.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):
+c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,
+2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
+b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&
+e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/<tbody/i,eb=/<|&#?\w+;/,Ca=/<(?:script|object|embed|option|style)/i,Da=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/\=([^="'>\s]+\/)>/g,P={option:[1,
+"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
+c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
+wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
+prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
+this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
+return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null;
+else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=
+c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,f,h,l=a[0],k=[];if(!c.support.checkClone&&arguments.length===3&&typeof l==="string"&&Da.test(l))return this.each(function(){c(this).domManip(a,
+b,d,true)});if(c.isFunction(l))return this.each(function(x){var r=c(this);a[0]=l.call(this,x,b?r.html():B);r.domManip(a,b,d)});if(this[0]){e=l&&l.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);h=e.fragment;if(f=h.childNodes.length===1?h=h.firstChild:h.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var o=this.length;f<o;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):
+this[f]:this[f],f>0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",
+prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f<h;f++){var l=(f>0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument||
+b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1></$2>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]==="<table>"&&!x?r.childNodes:[];for(o=k.length-
+1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));
+d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i,
+jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,
+zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),
+h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b);
+if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=
+d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left;
+e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b===
+"object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("<div>").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&
+!this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})},
+getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",
+script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||
+!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache=
+false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset;
+A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type",
+b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&&
+c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d||
+c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]=
+encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",
+[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),
+e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});
+if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",
+3),a,b,d);else{d=0;for(var e=this.length;d<e;d++){a=this[d];b=a.style.display;if(!c.data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&c.css(a,"display")==="none"&&c.data(a,"olddisplay",qa(a.nodeName))}for(d=0;d<e;d++){a=this[d];b=a.style.display;if(b===""||b==="none")a.style.display=c.data(a,"olddisplay")||""}return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",
+d)}for(a=0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,
+d,e);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),l,k=this.nodeType===1,o=k&&c(this).is(":hidden"),x=this;for(l in a){var r=c.camelCase(l);if(l!==r){a[r]=a[l];delete a[l];l=r}if(a[l]==="hide"&&o||a[l]==="show"&&!o)return h.complete.call(this);if(k&&(l==="height"||l==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(qa(this.nodeName)===
+"inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[l])){(h.specialEasing=h.specialEasing||{})[l]=a[l][1];a[l]=a[l][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(A,C){var J=new c.fx(x,h,A);if(vb.test(C))J[C==="toggle"?o?"show":"hide":C](a);else{var w=wb.exec(C),I=J.cur()||0;if(w){var L=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(x,A,(L||1)+g);I=(L||
+1)/J.cur()*I;c.style(x,A,I+g)}if(w[1])L=(w[1]==="-="?-1:1)*L+I;J.custom(I,L,g)}else J.custom(I,C,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,
+d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*
+Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)}
+var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;
+this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide||
+this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=
+c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(ba);ba=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===
+b.elem}).length};var xb=/^t(?:able|d|h)$/i,Ia=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in t.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(l){c.offset.setOffset(this,a,l)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=fa(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&
+h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(x){c.offset.setOffset(this,a,x)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d,e=b.offsetParent,f=b.ownerDocument,h=f.documentElement,l=f.body;d=(f=f.defaultView)?f.getComputedStyle(b,null):b.currentStyle;
+for(var k=b.offsetTop,o=b.offsetLeft;(b=b.parentNode)&&b!==l&&b!==h;){if(c.offset.supportsFixedPosition&&d.position==="fixed")break;d=f?f.getComputedStyle(b,null):b.currentStyle;k-=b.scrollTop;o-=b.scrollLeft;if(b===e){k+=b.offsetTop;o+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&xb.test(b.nodeName))){k+=parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"){k+=
+parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}d=d}if(d.position==="relative"||d.position==="static"){k+=l.offsetTop;o+=l.offsetLeft}if(c.offset.supportsFixedPosition&&d.position==="fixed"){k+=Math.max(h.scrollTop,l.scrollTop);o+=Math.max(h.scrollLeft,l.scrollLeft)}return{top:k,left:o}};c.offset={initialize:function(){var a=t.body,b=t.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",
+height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=
+f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a,
+"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a,
+e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
+c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();
+c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+
+b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window);
Index: extensions/iPiwigo/www/jquery-1.5.js
===================================================================
--- extensions/iPiwigo/www/jquery-1.5.js	(revision 9188)
+++ extensions/iPiwigo/www/jquery-1.5.js	(revision 9188)
@@ -0,0 +1,8176 @@
+/*!
+ * jQuery JavaScript Library v1.5
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon Jan 31 08:31:29 2011 -0500
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document;
+var jQuery = (function() {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+		// The jQuery object is actually just the init constructor 'enhanced'
+		return new jQuery.fn.init( selector, context, rootjQuery );
+	},
+
+	// Map over jQuery in case of overwrite
+	_jQuery = window.jQuery,
+
+	// Map over the $ in case of overwrite
+	_$ = window.$,
+
+	// A central reference to the root jQuery(document)
+	rootjQuery,
+
+	// A simple way to check for HTML strings or ID strings
+	// (both of which we optimize for)
+	quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
+
+	// Check if a string has a non-whitespace character in it
+	rnotwhite = /\S/,
+
+	// Used for trimming whitespace
+	trimLeft = /^\s+/,
+	trimRight = /\s+$/,
+
+	// Check for digits
+	rdigit = /\d/,
+
+	// Match a standalone tag
+	rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+	// JSON RegExp
+	rvalidchars = /^[\],:{}\s]*$/,
+	rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+	rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+	rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+	// Useragent RegExp
+	rwebkit = /(webkit)[ \/]([\w.]+)/,
+	ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+	rmsie = /(msie) ([\w.]+)/,
+	rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+	// Keep a UserAgent string for use with jQuery.browser
+	userAgent = navigator.userAgent,
+
+	// For matching the engine and version of the browser
+	browserMatch,
+
+	// Has the ready events already been bound?
+	readyBound = false,
+
+	// The deferred used on DOM ready
+	readyList,
+
+	// Promise methods
+	promiseMethods = "then done fail isResolved isRejected promise".split( " " ),
+
+	// The ready event handler
+	DOMContentLoaded,
+
+	// Save a reference to some core methods
+	toString = Object.prototype.toString,
+	hasOwn = Object.prototype.hasOwnProperty,
+	push = Array.prototype.push,
+	slice = Array.prototype.slice,
+	trim = String.prototype.trim,
+	indexOf = Array.prototype.indexOf,
+
+	// [[Class]] -> type pairs
+	class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+	constructor: jQuery,
+	init: function( selector, context, rootjQuery ) {
+		var match, elem, ret, doc;
+
+		// Handle $(""), $(null), or $(undefined)
+		if ( !selector ) {
+			return this;
+		}
+
+		// Handle $(DOMElement)
+		if ( selector.nodeType ) {
+			this.context = this[0] = selector;
+			this.length = 1;
+			return this;
+		}
+
+		// The body element only exists once, optimize finding it
+		if ( selector === "body" && !context && document.body ) {
+			this.context = document;
+			this[0] = document.body;
+			this.selector = "body";
+			this.length = 1;
+			return this;
+		}
+
+		// Handle HTML strings
+		if ( typeof selector === "string" ) {
+			// Are we dealing with HTML string or an ID?
+			match = quickExpr.exec( selector );
+
+			// Verify a match, and that no context was specified for #id
+			if ( match && (match[1] || !context) ) {
+
+				// HANDLE: $(html) -> $(array)
+				if ( match[1] ) {
+					context = context instanceof jQuery ? context[0] : context;
+					doc = (context ? context.ownerDocument || context : document);
+
+					// If a single string is passed in and it's a single tag
+					// just do a createElement and skip the rest
+					ret = rsingleTag.exec( selector );
+
+					if ( ret ) {
+						if ( jQuery.isPlainObject( context ) ) {
+							selector = [ document.createElement( ret[1] ) ];
+							jQuery.fn.attr.call( selector, context, true );
+
+						} else {
+							selector = [ doc.createElement( ret[1] ) ];
+						}
+
+					} else {
+						ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
+						selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes;
+					}
+
+					return jQuery.merge( this, selector );
+
+				// HANDLE: $("#id")
+				} else {
+					elem = document.getElementById( match[2] );
+
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE and Opera return items
+						// by name instead of ID
+						if ( elem.id !== match[2] ) {
+							return rootjQuery.find( selector );
+						}
+
+						// Otherwise, we inject the element directly into the jQuery object
+						this.length = 1;
+						this[0] = elem;
+					}
+
+					this.context = document;
+					this.selector = selector;
+					return this;
+				}
+
+			// HANDLE: $(expr, $(...))
+			} else if ( !context || context.jquery ) {
+				return (context || rootjQuery).find( selector );
+
+			// HANDLE: $(expr, context)
+			// (which is just equivalent to: $(context).find(expr)
+			} else {
+				return this.constructor( context ).find( selector );
+			}
+
+		// HANDLE: $(function)
+		// Shortcut for document ready
+		} else if ( jQuery.isFunction( selector ) ) {
+			return rootjQuery.ready( selector );
+		}
+
+		if (selector.selector !== undefined) {
+			this.selector = selector.selector;
+			this.context = selector.context;
+		}
+
+		return jQuery.makeArray( selector, this );
+	},
+
+	// Start with an empty selector
+	selector: "",
+
+	// The current version of jQuery being used
+	jquery: "1.5",
+
+	// The default length of a jQuery object is 0
+	length: 0,
+
+	// The number of elements contained in the matched element set
+	size: function() {
+		return this.length;
+	},
+
+	toArray: function() {
+		return slice.call( this, 0 );
+	},
+
+	// Get the Nth element in the matched element set OR
+	// Get the whole matched element set as a clean array
+	get: function( num ) {
+		return num == null ?
+
+			// Return a 'clean' array
+			this.toArray() :
+
+			// Return just the object
+			( num < 0 ? this[ this.length + num ] : this[ num ] );
+	},
+
+	// Take an array of elements and push it onto the stack
+	// (returning the new matched element set)
+	pushStack: function( elems, name, selector ) {
+		// Build a new jQuery matched element set
+		var ret = this.constructor();
+
+		if ( jQuery.isArray( elems ) ) {
+			push.apply( ret, elems );
+
+		} else {
+			jQuery.merge( ret, elems );
+		}
+
+		// Add the old object onto the stack (as a reference)
+		ret.prevObject = this;
+
+		ret.context = this.context;
+
+		if ( name === "find" ) {
+			ret.selector = this.selector + (this.selector ? " " : "") + selector;
+		} else if ( name ) {
+			ret.selector = this.selector + "." + name + "(" + selector + ")";
+		}
+
+		// Return the newly-formed element set
+		return ret;
+	},
+
+	// Execute a callback for every element in the matched set.
+	// (You can seed the arguments with an array of args, but this is
+	// only used internally.)
+	each: function( callback, args ) {
+		return jQuery.each( this, callback, args );
+	},
+
+	ready: function( fn ) {
+		// Attach the listeners
+		jQuery.bindReady();
+
+		// Add the callback
+		readyList.done( fn );
+
+		return this;
+	},
+
+	eq: function( i ) {
+		return i === -1 ?
+			this.slice( i ) :
+			this.slice( i, +i + 1 );
+	},
+
+	first: function() {
+		return this.eq( 0 );
+	},
+
+	last: function() {
+		return this.eq( -1 );
+	},
+
+	slice: function() {
+		return this.pushStack( slice.apply( this, arguments ),
+			"slice", slice.call(arguments).join(",") );
+	},
+
+	map: function( callback ) {
+		return this.pushStack( jQuery.map(this, function( elem, i ) {
+			return callback.call( elem, i, elem );
+		}));
+	},
+
+	end: function() {
+		return this.prevObject || this.constructor(null);
+	},
+
+	// For internal use only.
+	// Behaves like an Array's method, not like a jQuery method.
+	push: push,
+	sort: [].sort,
+	splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+	 var options, name, src, copy, copyIsArray, clone,
+		target = arguments[0] || {},
+		i = 1,
+		length = arguments.length,
+		deep = false;
+
+	// Handle a deep copy situation
+	if ( typeof target === "boolean" ) {
+		deep = target;
+		target = arguments[1] || {};
+		// skip the boolean and the target
+		i = 2;
+	}
+
+	// Handle case when target is a string or something (possible in deep copy)
+	if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+		target = {};
+	}
+
+	// extend jQuery itself if only one argument is passed
+	if ( length === i ) {
+		target = this;
+		--i;
+	}
+
+	for ( ; i < length; i++ ) {
+		// Only deal with non-null/undefined values
+		if ( (options = arguments[ i ]) != null ) {
+			// Extend the base object
+			for ( name in options ) {
+				src = target[ name ];
+				copy = options[ name ];
+
+				// Prevent never-ending loop
+				if ( target === copy ) {
+					continue;
+				}
+
+				// Recurse if we're merging plain objects or arrays
+				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+					if ( copyIsArray ) {
+						copyIsArray = false;
+						clone = src && jQuery.isArray(src) ? src : [];
+
+					} else {
+						clone = src && jQuery.isPlainObject(src) ? src : {};
+					}
+
+					// Never move original objects, clone them
+					target[ name ] = jQuery.extend( deep, clone, copy );
+
+				// Don't bring in undefined values
+				} else if ( copy !== undefined ) {
+					target[ name ] = copy;
+				}
+			}
+		}
+	}
+
+	// Return the modified object
+	return target;
+};
+
+jQuery.extend({
+	noConflict: function( deep ) {
+		window.$ = _$;
+
+		if ( deep ) {
+			window.jQuery = _jQuery;
+		}
+
+		return jQuery;
+	},
+
+	// Is the DOM ready to be used? Set to true once it occurs.
+	isReady: false,
+
+	// A counter to track how many items to wait for before
+	// the ready event fires. See #6781
+	readyWait: 1,
+
+	// Handle when the DOM is ready
+	ready: function( wait ) {
+		// A third-party is pushing the ready event forwards
+		if ( wait === true ) {
+			jQuery.readyWait--;
+		}
+
+		// Make sure that the DOM is not already loaded
+		if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
+			// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+			if ( !document.body ) {
+				return setTimeout( jQuery.ready, 1 );
+			}
+
+			// Remember that the DOM is ready
+			jQuery.isReady = true;
+
+			// If a normal DOM Ready event fired, decrement, and wait if need be
+			if ( wait !== true && --jQuery.readyWait > 0 ) {
+				return;
+			}
+
+			// If there are functions bound, to execute
+			readyList.resolveWith( document, [ jQuery ] );
+
+			// Trigger any bound ready events
+			if ( jQuery.fn.trigger ) {
+				jQuery( document ).trigger( "ready" ).unbind( "ready" );
+			}
+		}
+	},
+
+	bindReady: function() {
+		if ( readyBound ) {
+			return;
+		}
+
+		readyBound = true;
+
+		// Catch cases where $(document).ready() is called after the
+		// browser event has already occurred.
+		if ( document.readyState === "complete" ) {
+			// Handle it asynchronously to allow scripts the opportunity to delay ready
+			return setTimeout( jQuery.ready, 1 );
+		}
+
+		// Mozilla, Opera and webkit nightlies currently support this event
+		if ( document.addEventListener ) {
+			// Use the handy event callback
+			document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+			// A fallback to window.onload, that will always work
+			window.addEventListener( "load", jQuery.ready, false );
+
+		// If IE event model is used
+		} else if ( document.attachEvent ) {
+			// ensure firing before onload,
+			// maybe late but safe also for iframes
+			document.attachEvent("onreadystatechange", DOMContentLoaded);
+
+			// A fallback to window.onload, that will always work
+			window.attachEvent( "onload", jQuery.ready );
+
+			// If IE and not a frame
+			// continually check to see if the document is ready
+			var toplevel = false;
+
+			try {
+				toplevel = window.frameElement == null;
+			} catch(e) {}
+
+			if ( document.documentElement.doScroll && toplevel ) {
+				doScrollCheck();
+			}
+		}
+	},
+
+	// See test/unit/core.js for details concerning isFunction.
+	// Since version 1.3, DOM methods and functions like alert
+	// aren't supported. They return false on IE (#2968).
+	isFunction: function( obj ) {
+		return jQuery.type(obj) === "function";
+	},
+
+	isArray: Array.isArray || function( obj ) {
+		return jQuery.type(obj) === "array";
+	},
+
+	// A crude way of determining if an object is a window
+	isWindow: function( obj ) {
+		return obj && typeof obj === "object" && "setInterval" in obj;
+	},
+
+	isNaN: function( obj ) {
+		return obj == null || !rdigit.test( obj ) || isNaN( obj );
+	},
+
+	type: function( obj ) {
+		return obj == null ?
+			String( obj ) :
+			class2type[ toString.call(obj) ] || "object";
+	},
+
+	isPlainObject: function( obj ) {
+		// Must be an Object.
+		// Because of IE, we also have to check the presence of the constructor property.
+		// Make sure that DOM nodes and window objects don't pass through, as well
+		if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+			return false;
+		}
+
+		// Not own constructor property must be Object
+		if ( obj.constructor &&
+			!hasOwn.call(obj, "constructor") &&
+			!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+			return false;
+		}
+
+		// Own properties are enumerated firstly, so to speed up,
+		// if last one is own, then all properties are own.
+
+		var key;
+		for ( key in obj ) {}
+
+		return key === undefined || hasOwn.call( obj, key );
+	},
+
+	isEmptyObject: function( obj ) {
+		for ( var name in obj ) {
+			return false;
+		}
+		return true;
+	},
+
+	error: function( msg ) {
+		throw msg;
+	},
+
+	parseJSON: function( data ) {
+		if ( typeof data !== "string" || !data ) {
+			return null;
+		}
+
+		// Make sure leading/trailing whitespace is removed (IE can't handle it)
+		data = jQuery.trim( data );
+
+		// Make sure the incoming data is actual JSON
+		// Logic borrowed from http://json.org/json2.js
+		if ( rvalidchars.test(data.replace(rvalidescape, "@")
+			.replace(rvalidtokens, "]")
+			.replace(rvalidbraces, "")) ) {
+
+			// Try to use the native JSON parser first
+			return window.JSON && window.JSON.parse ?
+				window.JSON.parse( data ) :
+				(new Function("return " + data))();
+
+		} else {
+			jQuery.error( "Invalid JSON: " + data );
+		}
+	},
+
+	// Cross-browser xml parsing
+	// (xml & tmp used internally)
+	parseXML: function( data , xml , tmp ) {
+
+		if ( window.DOMParser ) { // Standard
+			tmp = new DOMParser();
+			xml = tmp.parseFromString( data , "text/xml" );
+		} else { // IE
+			xml = new ActiveXObject( "Microsoft.XMLDOM" );
+			xml.async = "false";
+			xml.loadXML( data );
+		}
+
+		tmp = xml.documentElement;
+
+		if ( ! tmp || ! tmp.nodeName || tmp.nodeName === "parsererror" ) {
+			jQuery.error( "Invalid XML: " + data );
+		}
+
+		return xml;
+	},
+
+	noop: function() {},
+
+	// Evalulates a script in a global context
+	globalEval: function( data ) {
+		if ( data && rnotwhite.test(data) ) {
+			// Inspired by code by Andrea Giammarchi
+			// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
+			var head = document.getElementsByTagName("head")[0] || document.documentElement,
+				script = document.createElement("script");
+
+			script.type = "text/javascript";
+
+			if ( jQuery.support.scriptEval() ) {
+				script.appendChild( document.createTextNode( data ) );
+			} else {
+				script.text = data;
+			}
+
+			// Use insertBefore instead of appendChild to circumvent an IE6 bug.
+			// This arises when a base node is used (#2709).
+			head.insertBefore( script, head.firstChild );
+			head.removeChild( script );
+		}
+	},
+
+	nodeName: function( elem, name ) {
+		return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
+	},
+
+	// args is for internal usage only
+	each: function( object, callback, args ) {
+		var name, i = 0,
+			length = object.length,
+			isObj = length === undefined || jQuery.isFunction(object);
+
+		if ( args ) {
+			if ( isObj ) {
+				for ( name in object ) {
+					if ( callback.apply( object[ name ], args ) === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( ; i < length; ) {
+					if ( callback.apply( object[ i++ ], args ) === false ) {
+						break;
+					}
+				}
+			}
+
+		// A special, fast, case for the most common use of each
+		} else {
+			if ( isObj ) {
+				for ( name in object ) {
+					if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( var value = object[0];
+					i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {}
+			}
+		}
+
+		return object;
+	},
+
+	// Use native String.trim function wherever possible
+	trim: trim ?
+		function( text ) {
+			return text == null ?
+				"" :
+				trim.call( text );
+		} :
+
+		// Otherwise use our own trimming functionality
+		function( text ) {
+			return text == null ?
+				"" :
+				text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+		},
+
+	// results is for internal usage only
+	makeArray: function( array, results ) {
+		var ret = results || [];
+
+		if ( array != null ) {
+			// The window, strings (and functions) also have 'length'
+			// The extra typeof function check is to prevent crashes
+			// in Safari 2 (See: #3039)
+			// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+			var type = jQuery.type(array);
+
+			if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
+				push.call( ret, array );
+			} else {
+				jQuery.merge( ret, array );
+			}
+		}
+
+		return ret;
+	},
+
+	inArray: function( elem, array ) {
+		if ( array.indexOf ) {
+			return array.indexOf( elem );
+		}
+
+		for ( var i = 0, length = array.length; i < length; i++ ) {
+			if ( array[ i ] === elem ) {
+				return i;
+			}
+		}
+
+		return -1;
+	},
+
+	merge: function( first, second ) {
+		var i = first.length,
+			j = 0;
+
+		if ( typeof second.length === "number" ) {
+			for ( var l = second.length; j < l; j++ ) {
+				first[ i++ ] = second[ j ];
+			}
+
+		} else {
+			while ( second[j] !== undefined ) {
+				first[ i++ ] = second[ j++ ];
+			}
+		}
+
+		first.length = i;
+
+		return first;
+	},
+
+	grep: function( elems, callback, inv ) {
+		var ret = [], retVal;
+		inv = !!inv;
+
+		// Go through the array, only saving the items
+		// that pass the validator function
+		for ( var i = 0, length = elems.length; i < length; i++ ) {
+			retVal = !!callback( elems[ i ], i );
+			if ( inv !== retVal ) {
+				ret.push( elems[ i ] );
+			}
+		}
+
+		return ret;
+	},
+
+	// arg is for internal usage only
+	map: function( elems, callback, arg ) {
+		var ret = [], value;
+
+		// Go through the array, translating each of the items to their
+		// new value (or values).
+		for ( var i = 0, length = elems.length; i < length; i++ ) {
+			value = callback( elems[ i ], i, arg );
+
+			if ( value != null ) {
+				ret[ ret.length ] = value;
+			}
+		}
+
+		// Flatten any nested arrays
+		return ret.concat.apply( [], ret );
+	},
+
+	// A global GUID counter for objects
+	guid: 1,
+
+	proxy: function( fn, proxy, thisObject ) {
+		if ( arguments.length === 2 ) {
+			if ( typeof proxy === "string" ) {
+				thisObject = fn;
+				fn = thisObject[ proxy ];
+				proxy = undefined;
+
+			} else if ( proxy && !jQuery.isFunction( proxy ) ) {
+				thisObject = proxy;
+				proxy = undefined;
+			}
+		}
+
+		if ( !proxy && fn ) {
+			proxy = function() {
+				return fn.apply( thisObject || this, arguments );
+			};
+		}
+
+		// Set the guid of unique handler to the same of original handler, so it can be removed
+		if ( fn ) {
+			proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+		}
+
+		// So proxy can be declared as an argument
+		return proxy;
+	},
+
+	// Mutifunctional method to get and set values to a collection
+	// The value/s can be optionally by executed if its a function
+	access: function( elems, key, value, exec, fn, pass ) {
+		var length = elems.length;
+
+		// Setting many attributes
+		if ( typeof key === "object" ) {
+			for ( var k in key ) {
+				jQuery.access( elems, k, key[k], exec, fn, value );
+			}
+			return elems;
+		}
+
+		// Setting one attribute
+		if ( value !== undefined ) {
+			// Optionally, function values get executed if exec is true
+			exec = !pass && exec && jQuery.isFunction(value);
+
+			for ( var i = 0; i < length; i++ ) {
+				fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+			}
+
+			return elems;
+		}
+
+		// Getting an attribute
+		return length ? fn( elems[0], key ) : undefined;
+	},
+
+	now: function() {
+		return (new Date()).getTime();
+	},
+
+	// Create a simple deferred (one callbacks list)
+	_Deferred: function() {
+		var // callbacks list
+			callbacks = [],
+			// stored [ context , args ]
+			fired,
+			// to avoid firing when already doing so
+			firing,
+			// flag to know if the deferred has been cancelled
+			cancelled,
+			// the deferred itself
+			deferred  = {
+
+				// done( f1, f2, ...)
+				done: function() {
+					if ( !cancelled ) {
+						var args = arguments,
+							i,
+							length,
+							elem,
+							type,
+							_fired;
+						if ( fired ) {
+							_fired = fired;
+							fired = 0;
+						}
+						for ( i = 0, length = args.length; i < length; i++ ) {
+							elem = args[ i ];
+							type = jQuery.type( elem );
+							if ( type === "array" ) {
+								deferred.done.apply( deferred, elem );
+							} else if ( type === "function" ) {
+								callbacks.push( elem );
+							}
+						}
+						if ( _fired ) {
+							deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] );
+						}
+					}
+					return this;
+				},
+
+				// resolve with given context and args
+				resolveWith: function( context, args ) {
+					if ( !cancelled && !fired && !firing ) {
+						firing = 1;
+						try {
+							while( callbacks[ 0 ] ) {
+								callbacks.shift().apply( context, args );
+							}
+						}
+						finally {
+							fired = [ context, args ];
+							firing = 0;
+						}
+					}
+					return this;
+				},
+
+				// resolve with this as context and given arguments
+				resolve: function() {
+					deferred.resolveWith( jQuery.isFunction( this.promise ) ? this.promise() : this, arguments );
+					return this;
+				},
+
+				// Has this deferred been resolved?
+				isResolved: function() {
+					return !!( firing || fired );
+				},
+
+				// Cancel
+				cancel: function() {
+					cancelled = 1;
+					callbacks = [];
+					return this;
+				}
+			};
+
+		return deferred;
+	},
+
+	// Full fledged deferred (two callbacks list)
+	Deferred: function( func ) {
+		var deferred = jQuery._Deferred(),
+			failDeferred = jQuery._Deferred(),
+			promise;
+		// Add errorDeferred methods, then and promise
+		jQuery.extend( deferred, {
+			then: function( doneCallbacks, failCallbacks ) {
+				deferred.done( doneCallbacks ).fail( failCallbacks );
+				return this;
+			},
+			fail: failDeferred.done,
+			rejectWith: failDeferred.resolveWith,
+			reject: failDeferred.resolve,
+			isRejected: failDeferred.isResolved,
+			// Get a promise for this deferred
+			// If obj is provided, the promise aspect is added to the object
+			promise: function( obj , i /* internal */ ) {
+				if ( obj == null ) {
+					if ( promise ) {
+						return promise;
+					}
+					promise = obj = {};
+				}
+				i = promiseMethods.length;
+				while( i-- ) {
+					obj[ promiseMethods[ i ] ] = deferred[ promiseMethods[ i ] ];
+				}
+				return obj;
+			}
+		} );
+		// Make sure only one callback list will be used
+		deferred.then( failDeferred.cancel, deferred.cancel );
+		// Unexpose cancel
+		delete deferred.cancel;
+		// Call given func if any
+		if ( func ) {
+			func.call( deferred, deferred );
+		}
+		return deferred;
+	},
+
+	// Deferred helper
+	when: function( object ) {
+		var args = arguments,
+			length = args.length,
+			deferred = length <= 1 && object && jQuery.isFunction( object.promise ) ?
+				object :
+				jQuery.Deferred(),
+			promise = deferred.promise(),
+			resolveArray;
+
+		if ( length > 1 ) {
+			resolveArray = new Array( length );
+			jQuery.each( args, function( index, element ) {
+				jQuery.when( element ).then( function( value ) {
+					resolveArray[ index ] = arguments.length > 1 ? slice.call( arguments, 0 ) : value;
+					if( ! --length ) {
+						deferred.resolveWith( promise, resolveArray );
+					}
+				}, deferred.reject );
+			} );
+		} else if ( deferred !== object ) {
+			deferred.resolve( object );
+		}
+		return promise;
+	},
+
+	// Use of jQuery.browser is frowned upon.
+	// More details: http://docs.jquery.com/Utilities/jQuery.browser
+	uaMatch: function( ua ) {
+		ua = ua.toLowerCase();
+
+		var match = rwebkit.exec( ua ) ||
+			ropera.exec( ua ) ||
+			rmsie.exec( ua ) ||
+			ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+			[];
+
+		return { browser: match[1] || "", version: match[2] || "0" };
+	},
+
+	sub: function() {
+		function jQuerySubclass( selector, context ) {
+			return new jQuerySubclass.fn.init( selector, context );
+		}
+		jQuery.extend( true, jQuerySubclass, this );
+		jQuerySubclass.superclass = this;
+		jQuerySubclass.fn = jQuerySubclass.prototype = this();
+		jQuerySubclass.fn.constructor = jQuerySubclass;
+		jQuerySubclass.subclass = this.subclass;
+		jQuerySubclass.fn.init = function init( selector, context ) {
+			if ( context && context instanceof jQuery && !(context instanceof jQuerySubclass) ) {
+				context = jQuerySubclass(context);
+			}
+
+			return jQuery.fn.init.call( this, selector, context, rootjQuerySubclass );
+		};
+		jQuerySubclass.fn.init.prototype = jQuerySubclass.fn;
+		var rootjQuerySubclass = jQuerySubclass(document);
+		return jQuerySubclass;
+	},
+
+	browser: {}
+});
+
+// Create readyList deferred
+readyList = jQuery._Deferred();
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+	class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+	jQuery.browser[ browserMatch.browser ] = true;
+	jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+	jQuery.browser.safari = true;
+}
+
+if ( indexOf ) {
+	jQuery.inArray = function( elem, array ) {
+		return indexOf.call( array, elem );
+	};
+}
+
+// IE doesn't match non-breaking spaces with \s
+if ( rnotwhite.test( "\xA0" ) ) {
+	trimLeft = /^[\s\xA0]+/;
+	trimRight = /[\s\xA0]+$/;
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+	DOMContentLoaded = function() {
+		document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+		jQuery.ready();
+	};
+
+} else if ( document.attachEvent ) {
+	DOMContentLoaded = function() {
+		// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+		if ( document.readyState === "complete" ) {
+			document.detachEvent( "onreadystatechange", DOMContentLoaded );
+			jQuery.ready();
+		}
+	};
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+	if ( jQuery.isReady ) {
+		return;
+	}
+
+	try {
+		// If IE is used, use the trick by Diego Perini
+		// http://javascript.nwbox.com/IEContentLoaded/
+		document.documentElement.doScroll("left");
+	} catch(e) {
+		setTimeout( doScrollCheck, 1 );
+		return;
+	}
+
+	// and execute any waiting functions
+	jQuery.ready();
+}
+
+// Expose jQuery to the global object
+return (window.jQuery = window.$ = jQuery);
+
+})();
+
+
+(function() {
+
+	jQuery.support = {};
+
+	var div = document.createElement("div");
+
+	div.style.display = "none";
+	div.innerHTML = "   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+
+	var all = div.getElementsByTagName("*"),
+		a = div.getElementsByTagName("a")[0],
+		select = document.createElement("select"),
+		opt = select.appendChild( document.createElement("option") );
+
+	// Can't get basic test support
+	if ( !all || !all.length || !a ) {
+		return;
+	}
+
+	jQuery.support = {
+		// IE strips leading whitespace when .innerHTML is used
+		leadingWhitespace: div.firstChild.nodeType === 3,
+
+		// Make sure that tbody elements aren't automatically inserted
+		// IE will insert them into empty tables
+		tbody: !div.getElementsByTagName("tbody").length,
+
+		// Make sure that link elements get serialized correctly by innerHTML
+		// This requires a wrapper element in IE
+		htmlSerialize: !!div.getElementsByTagName("link").length,
+
+		// Get the style information from getAttribute
+		// (IE uses .cssText insted)
+		style: /red/.test( a.getAttribute("style") ),
+
+		// Make sure that URLs aren't manipulated
+		// (IE normalizes it by default)
+		hrefNormalized: a.getAttribute("href") === "/a",
+
+		// Make sure that element opacity exists
+		// (IE uses filter instead)
+		// Use a regex to work around a WebKit issue. See #5145
+		opacity: /^0.55$/.test( a.style.opacity ),
+
+		// Verify style float existence
+		// (IE uses styleFloat instead of cssFloat)
+		cssFloat: !!a.style.cssFloat,
+
+		// Make sure that if no value is specified for a checkbox
+		// that it defaults to "on".
+		// (WebKit defaults to "" instead)
+		checkOn: div.getElementsByTagName("input")[0].value === "on",
+
+		// Make sure that a selected-by-default option has a working selected property.
+		// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+		optSelected: opt.selected,
+
+		// Will be defined later
+		deleteExpando: true,
+		optDisabled: false,
+		checkClone: false,
+		_scriptEval: null,
+		noCloneEvent: true,
+		boxModel: null,
+		inlineBlockNeedsLayout: false,
+		shrinkWrapBlocks: false,
+		reliableHiddenOffsets: true
+	};
+
+	// Make sure that the options inside disabled selects aren't marked as disabled
+	// (WebKit marks them as diabled)
+	select.disabled = true;
+	jQuery.support.optDisabled = !opt.disabled;
+
+	jQuery.support.scriptEval = function() {
+		if ( jQuery.support._scriptEval === null ) {
+			var root = document.documentElement,
+				script = document.createElement("script"),
+				id = "script" + jQuery.now();
+
+			script.type = "text/javascript";
+			try {
+				script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
+			} catch(e) {}
+
+			root.insertBefore( script, root.firstChild );
+
+			// Make sure that the execution of code works by injecting a script
+			// tag with appendChild/createTextNode
+			// (IE doesn't support this, fails, and uses .text instead)
+			if ( window[ id ] ) {
+				jQuery.support._scriptEval = true;
+				delete window[ id ];
+			} else {
+				jQuery.support._scriptEval = false;
+			}
+
+			root.removeChild( script );
+			// release memory in IE
+			root = script = id  = null;
+		}
+
+		return jQuery.support._scriptEval;
+	};
+
+	// Test to see if it's possible to delete an expando from an element
+	// Fails in Internet Explorer
+	try {
+		delete div.test;
+
+	} catch(e) {
+		jQuery.support.deleteExpando = false;
+	}
+
+	if ( div.attachEvent && div.fireEvent ) {
+		div.attachEvent("onclick", function click() {
+			// Cloning a node shouldn't copy over any
+			// bound event handlers (IE does this)
+			jQuery.support.noCloneEvent = false;
+			div.detachEvent("onclick", click);
+		});
+		div.cloneNode(true).fireEvent("onclick");
+	}
+
+	div = document.createElement("div");
+	div.innerHTML = "<input type='radio' name='radiotest' checked='checked'/>";
+
+	var fragment = document.createDocumentFragment();
+	fragment.appendChild( div.firstChild );
+
+	// WebKit doesn't clone checked state correctly in fragments
+	jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;
+
+	// Figure out if the W3C box model works as expected
+	// document.body must exist before we can do this
+	jQuery(function() {
+		var div = document.createElement("div"),
+			body = document.getElementsByTagName("body")[0];
+
+		// Frameset documents with no body should not run this code
+		if ( !body ) {
+			return;
+		}
+
+		div.style.width = div.style.paddingLeft = "1px";
+		body.appendChild( div );
+		jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
+
+		if ( "zoom" in div.style ) {
+			// Check if natively block-level elements act like inline-block
+			// elements when setting their display to 'inline' and giving
+			// them layout
+			// (IE < 8 does this)
+			div.style.display = "inline";
+			div.style.zoom = 1;
+			jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2;
+
+			// Check if elements with layout shrink-wrap their children
+			// (IE 6 does this)
+			div.style.display = "";
+			div.innerHTML = "<div style='width:4px;'></div>";
+			jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2;
+		}
+
+		div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
+		var tds = div.getElementsByTagName("td");
+
+		// Check if table cells still have offsetWidth/Height when they are set
+		// to display:none and there are still other visible table cells in a
+		// table row; if so, offsetWidth/Height are not reliable for use when
+		// determining if an element has been hidden directly using
+		// display:none (it is still safe to use offsets if a parent element is
+		// hidden; don safety goggles and see bug #4512 for more information).
+		// (only IE 8 fails this test)
+		jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0;
+
+		tds[0].style.display = "";
+		tds[1].style.display = "none";
+
+		// Check if empty table cells still have offsetWidth/Height
+		// (IE < 8 fail this test)
+		jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0;
+		div.innerHTML = "";
+
+		body.removeChild( div ).style.display = "none";
+		div = tds = null;
+	});
+
+	// Technique from Juriy Zaytsev
+	// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
+	var eventSupported = function( eventName ) {
+		var el = document.createElement("div");
+		eventName = "on" + eventName;
+
+		// We only care about the case where non-standard event systems
+		// are used, namely in IE. Short-circuiting here helps us to
+		// avoid an eval call (in setAttribute) which can cause CSP
+		// to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+		if ( !el.attachEvent ) {
+			return true;
+		}
+
+		var isSupported = (eventName in el);
+		if ( !isSupported ) {
+			el.setAttribute(eventName, "return;");
+			isSupported = typeof el[eventName] === "function";
+		}
+		el = null;
+
+		return isSupported;
+	};
+
+	jQuery.support.submitBubbles = eventSupported("submit");
+	jQuery.support.changeBubbles = eventSupported("change");
+
+	// release memory in IE
+	div = all = a = null;
+})();
+
+
+
+var rbrace = /^(?:\{.*\}|\[.*\])$/;
+
+jQuery.extend({
+	cache: {},
+
+	// Please use with caution
+	uuid: 0,
+
+	// Unique for each copy of jQuery on the page
+	// Non-digits removed to match rinlinejQuery
+	expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
+
+	// The following elements throw uncatchable exceptions if you
+	// attempt to add expando properties to them.
+	noData: {
+		"embed": true,
+		// Ban all objects except for Flash (which handle expandos)
+		"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+		"applet": true
+	},
+
+	hasData: function( elem ) {
+		elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+
+		return !!elem && !jQuery.isEmptyObject(elem);
+	},
+
+	data: function( elem, name, data, pvt /* Internal Use Only */ ) {
+		if ( !jQuery.acceptData( elem ) ) {
+			return;
+		}
+
+		var internalKey = jQuery.expando, getByName = typeof name === "string", thisCache,
+
+			// We have to handle DOM nodes and JS objects differently because IE6-7
+			// can't GC object references properly across the DOM-JS boundary
+			isNode = elem.nodeType,
+
+			// Only DOM nodes need the global jQuery cache; JS object data is
+			// attached directly to the object so GC can occur automatically
+			cache = isNode ? jQuery.cache : elem,
+
+			// Only defining an ID for JS objects if its cache already exists allows
+			// the code to shortcut on the same path as a DOM node with no cache
+			id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando;
+
+		// Avoid doing any more work than we need to when trying to get data on an
+		// object that has no data at all
+		if ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) {
+			return;
+		}
+
+		if ( !id ) {
+			// Only DOM nodes need a new unique ID for each element since their data
+			// ends up in the global cache
+			if ( isNode ) {
+				elem[ jQuery.expando ] = id = ++jQuery.uuid;
+			} else {
+				id = jQuery.expando;
+			}
+		}
+
+		if ( !cache[ id ] ) {
+			cache[ id ] = {};
+		}
+
+		// An object can be passed to jQuery.data instead of a key/value pair; this gets
+		// shallow copied over onto the existing cache
+		if ( typeof name === "object" ) {
+			if ( pvt ) {
+				cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name);
+			} else {
+				cache[ id ] = jQuery.extend(cache[ id ], name);
+			}
+		}
+
+		thisCache = cache[ id ];
+
+		// Internal jQuery data is stored in a separate object inside the object's data
+		// cache in order to avoid key collisions between internal data and user-defined
+		// data
+		if ( pvt ) {
+			if ( !thisCache[ internalKey ] ) {
+				thisCache[ internalKey ] = {};
+			}
+
+			thisCache = thisCache[ internalKey ];
+		}
+
+		if ( data !== undefined ) {
+			thisCache[ name ] = data;
+		}
+
+		// TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should
+		// not attempt to inspect the internal events object using jQuery.data, as this
+		// internal data object is undocumented and subject to change.
+		if ( name === "events" && !thisCache[name] ) {
+			return thisCache[ internalKey ] && thisCache[ internalKey ].events;
+		}
+
+		return getByName ? thisCache[ name ] : thisCache;
+	},
+
+	removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+		if ( !jQuery.acceptData( elem ) ) {
+			return;
+		}
+
+		var internalKey = jQuery.expando, isNode = elem.nodeType,
+
+			// See jQuery.data for more information
+			cache = isNode ? jQuery.cache : elem,
+
+			// See jQuery.data for more information
+			id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+		// If there is already no cache entry for this object, there is no
+		// purpose in continuing
+		if ( !cache[ id ] ) {
+			return;
+		}
+
+		if ( name ) {
+			var thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ];
+
+			if ( thisCache ) {
+				delete thisCache[ name ];
+
+				// If there is no data left in the cache, we want to continue
+				// and let the cache object itself get destroyed
+				if ( !jQuery.isEmptyObject(thisCache) ) {
+					return;
+				}
+			}
+		}
+
+		// See jQuery.data for more information
+		if ( pvt ) {
+			delete cache[ id ][ internalKey ];
+
+			// Don't destroy the parent cache unless the internal data object
+			// had been the only thing left in it
+			if ( !jQuery.isEmptyObject(cache[ id ]) ) {
+				return;
+			}
+		}
+
+		var internalCache = cache[ id ][ internalKey ];
+
+		// Browsers that fail expando deletion also refuse to delete expandos on
+		// the window, but it will allow it on all other JS objects; other browsers
+		// don't care
+		if ( jQuery.support.deleteExpando || cache != window ) {
+			delete cache[ id ];
+		} else {
+			cache[ id ] = null;
+		}
+
+		// We destroyed the entire user cache at once because it's faster than
+		// iterating through each key, but we need to continue to persist internal
+		// data if it existed
+		if ( internalCache ) {
+			cache[ id ] = {};
+			cache[ id ][ internalKey ] = internalCache;
+
+		// Otherwise, we need to eliminate the expando on the node to avoid
+		// false lookups in the cache for entries that no longer exist
+		} else if ( isNode ) {
+			// IE does not allow us to delete expando properties from nodes,
+			// nor does it have a removeAttribute function on Document nodes;
+			// we must handle all of these cases
+			if ( jQuery.support.deleteExpando ) {
+				delete elem[ jQuery.expando ];
+			} else if ( elem.removeAttribute ) {
+				elem.removeAttribute( jQuery.expando );
+			} else {
+				elem[ jQuery.expando ] = null;
+			}
+		}
+	},
+
+	// For internal use only.
+	_data: function( elem, name, data ) {
+		return jQuery.data( elem, name, data, true );
+	},
+
+	// A method for determining if a DOM node can handle the data expando
+	acceptData: function( elem ) {
+		if ( elem.nodeName ) {
+			var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+			if ( match ) {
+				return !(match === true || elem.getAttribute("classid") !== match);
+			}
+		}
+
+		return true;
+	}
+});
+
+jQuery.fn.extend({
+	data: function( key, value ) {
+		var data = null;
+
+		if ( typeof key === "undefined" ) {
+			if ( this.length ) {
+				data = jQuery.data( this[0] );
+
+				if ( this[0].nodeType === 1 ) {
+					var attr = this[0].attributes, name;
+					for ( var i = 0, l = attr.length; i < l; i++ ) {
+						name = attr[i].name;
+
+						if ( name.indexOf( "data-" ) === 0 ) {
+							name = name.substr( 5 );
+							dataAttr( this[0], name, data[ name ] );
+						}
+					}
+				}
+			}
+
+			return data;
+
+		} else if ( typeof key === "object" ) {
+			return this.each(function() {
+				jQuery.data( this, key );
+			});
+		}
+
+		var parts = key.split(".");
+		parts[1] = parts[1] ? "." + parts[1] : "";
+
+		if ( value === undefined ) {
+			data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+
+			// Try to fetch any internally stored data first
+			if ( data === undefined && this.length ) {
+				data = jQuery.data( this[0], key );
+				data = dataAttr( this[0], key, data );
+			}
+
+			return data === undefined && parts[1] ?
+				this.data( parts[0] ) :
+				data;
+
+		} else {
+			return this.each(function() {
+				var $this = jQuery( this ),
+					args = [ parts[0], value ];
+
+				$this.triggerHandler( "setData" + parts[1] + "!", args );
+				jQuery.data( this, key, value );
+				$this.triggerHandler( "changeData" + parts[1] + "!", args );
+			});
+		}
+	},
+
+	removeData: function( key ) {
+		return this.each(function() {
+			jQuery.removeData( this, key );
+		});
+	}
+});
+
+function dataAttr( elem, key, data ) {
+	// If nothing was found internally, try to fetch any
+	// data from the HTML5 data-* attribute
+	if ( data === undefined && elem.nodeType === 1 ) {
+		data = elem.getAttribute( "data-" + key );
+
+		if ( typeof data === "string" ) {
+			try {
+				data = data === "true" ? true :
+				data === "false" ? false :
+				data === "null" ? null :
+				!jQuery.isNaN( data ) ? parseFloat( data ) :
+					rbrace.test( data ) ? jQuery.parseJSON( data ) :
+					data;
+			} catch( e ) {}
+
+			// Make sure we set the data so it isn't changed later
+			jQuery.data( elem, key, data );
+
+		} else {
+			data = undefined;
+		}
+	}
+
+	return data;
+}
+
+
+
+
+jQuery.extend({
+	queue: function( elem, type, data ) {
+		if ( !elem ) {
+			return;
+		}
+
+		type = (type || "fx") + "queue";
+		var q = jQuery._data( elem, type );
+
+		// Speed up dequeue by getting out quickly if this is just a lookup
+		if ( !data ) {
+			return q || [];
+		}
+
+		if ( !q || jQuery.isArray(data) ) {
+			q = jQuery._data( elem, type, jQuery.makeArray(data) );
+
+		} else {
+			q.push( data );
+		}
+
+		return q;
+	},
+
+	dequeue: function( elem, type ) {
+		type = type || "fx";
+
+		var queue = jQuery.queue( elem, type ),
+			fn = queue.shift();
+
+		// If the fx queue is dequeued, always remove the progress sentinel
+		if ( fn === "inprogress" ) {
+			fn = queue.shift();
+		}
+
+		if ( fn ) {
+			// Add a progress sentinel to prevent the fx queue from being
+			// automatically dequeued
+			if ( type === "fx" ) {
+				queue.unshift("inprogress");
+			}
+
+			fn.call(elem, function() {
+				jQuery.dequeue(elem, type);
+			});
+		}
+
+		if ( !queue.length ) {
+			jQuery.removeData( elem, type + "queue", true );
+		}
+	}
+});
+
+jQuery.fn.extend({
+	queue: function( type, data ) {
+		if ( typeof type !== "string" ) {
+			data = type;
+			type = "fx";
+		}
+
+		if ( data === undefined ) {
+			return jQuery.queue( this[0], type );
+		}
+		return this.each(function( i ) {
+			var queue = jQuery.queue( this, type, data );
+
+			if ( type === "fx" && queue[0] !== "inprogress" ) {
+				jQuery.dequeue( this, type );
+			}
+		});
+	},
+	dequeue: function( type ) {
+		return this.each(function() {
+			jQuery.dequeue( this, type );
+		});
+	},
+
+	// Based off of the plugin by Clint Helfers, with permission.
+	// http://blindsignals.com/index.php/2009/07/jquery-delay/
+	delay: function( time, type ) {
+		time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
+		type = type || "fx";
+
+		return this.queue( type, function() {
+			var elem = this;
+			setTimeout(function() {
+				jQuery.dequeue( elem, type );
+			}, time );
+		});
+	},
+
+	clearQueue: function( type ) {
+		return this.queue( type || "fx", [] );
+	}
+});
+
+
+
+
+var rclass = /[\n\t\r]/g,
+	rspaces = /\s+/,
+	rreturn = /\r/g,
+	rspecialurl = /^(?:href|src|style)$/,
+	rtype = /^(?:button|input)$/i,
+	rfocusable = /^(?:button|input|object|select|textarea)$/i,
+	rclickable = /^a(?:rea)?$/i,
+	rradiocheck = /^(?:radio|checkbox)$/i;
+
+jQuery.props = {
+	"for": "htmlFor",
+	"class": "className",
+	readonly: "readOnly",
+	maxlength: "maxLength",
+	cellspacing: "cellSpacing",
+	rowspan: "rowSpan",
+	colspan: "colSpan",
+	tabindex: "tabIndex",
+	usemap: "useMap",
+	frameborder: "frameBorder"
+};
+
+jQuery.fn.extend({
+	attr: function( name, value ) {
+		return jQuery.access( this, name, value, true, jQuery.attr );
+	},
+
+	removeAttr: function( name, fn ) {
+		return this.each(function(){
+			jQuery.attr( this, name, "" );
+			if ( this.nodeType === 1 ) {
+				this.removeAttribute( name );
+			}
+		});
+	},
+
+	addClass: function( value ) {
+		if ( jQuery.isFunction(value) ) {
+			return this.each(function(i) {
+				var self = jQuery(this);
+				self.addClass( value.call(this, i, self.attr("class")) );
+			});
+		}
+
+		if ( value && typeof value === "string" ) {
+			var classNames = (value || "").split( rspaces );
+
+			for ( var i = 0, l = this.length; i < l; i++ ) {
+				var elem = this[i];
+
+				if ( elem.nodeType === 1 ) {
+					if ( !elem.className ) {
+						elem.className = value;
+
+					} else {
+						var className = " " + elem.className + " ",
+							setClass = elem.className;
+
+						for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
+							if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
+								setClass += " " + classNames[c];
+							}
+						}
+						elem.className = jQuery.trim( setClass );
+					}
+				}
+			}
+		}
+
+		return this;
+	},
+
+	removeClass: function( value ) {
+		if ( jQuery.isFunction(value) ) {
+			return this.each(function(i) {
+				var self = jQuery(this);
+				self.removeClass( value.call(this, i, self.attr("class")) );
+			});
+		}
+
+		if ( (value && typeof value === "string") || value === undefined ) {
+			var classNames = (value || "").split( rspaces );
+
+			for ( var i = 0, l = this.length; i < l; i++ ) {
+				var elem = this[i];
+
+				if ( elem.nodeType === 1 && elem.className ) {
+					if ( value ) {
+						var className = (" " + elem.className + " ").replace(rclass, " ");
+						for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
+							className = className.replace(" " + classNames[c] + " ", " ");
+						}
+						elem.className = jQuery.trim( className );
+
+					} else {
+						elem.className = "";
+					}
+				}
+			}
+		}
+
+		return this;
+	},
+
+	toggleClass: function( value, stateVal ) {
+		var type = typeof value,
+			isBool = typeof stateVal === "boolean";
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function(i) {
+				var self = jQuery(this);
+				self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal );
+			});
+		}
+
+		return this.each(function() {
+			if ( type === "string" ) {
+				// toggle individual class names
+				var className,
+					i = 0,
+					self = jQuery( this ),
+					state = stateVal,
+					classNames = value.split( rspaces );
+
+				while ( (className = classNames[ i++ ]) ) {
+					// check each className given, space seperated list
+					state = isBool ? state : !self.hasClass( className );
+					self[ state ? "addClass" : "removeClass" ]( className );
+				}
+
+			} else if ( type === "undefined" || type === "boolean" ) {
+				if ( this.className ) {
+					// store className if set
+					jQuery._data( this, "__className__", this.className );
+				}
+
+				// toggle whole className
+				this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+			}
+		});
+	},
+
+	hasClass: function( selector ) {
+		var className = " " + selector + " ";
+		for ( var i = 0, l = this.length; i < l; i++ ) {
+			if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
+				return true;
+			}
+		}
+
+		return false;
+	},
+
+	val: function( value ) {
+		if ( !arguments.length ) {
+			var elem = this[0];
+
+			if ( elem ) {
+				if ( jQuery.nodeName( elem, "option" ) ) {
+					// attributes.value is undefined in Blackberry 4.7 but
+					// uses .value. See #6932
+					var val = elem.attributes.value;
+					return !val || val.specified ? elem.value : elem.text;
+				}
+
+				// We need to handle select boxes special
+				if ( jQuery.nodeName( elem, "select" ) ) {
+					var index = elem.selectedIndex,
+						values = [],
+						options = elem.options,
+						one = elem.type === "select-one";
+
+					// Nothing was selected
+					if ( index < 0 ) {
+						return null;
+					}
+
+					// Loop through all the selected options
+					for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
+						var option = options[ i ];
+
+						// Don't return options that are disabled or in a disabled optgroup
+						if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
+								(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+							// Get the specific value for the option
+							value = jQuery(option).val();
+
+							// We don't need an array for one selects
+							if ( one ) {
+								return value;
+							}
+
+							// Multi-Selects return an array
+							values.push( value );
+						}
+					}
+
+					return values;
+				}
+
+				// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+				if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) {
+					return elem.getAttribute("value") === null ? "on" : elem.value;
+				}
+
+				// Everything else, we just grab the value
+				return (elem.value || "").replace(rreturn, "");
+
+			}
+
+			return undefined;
+		}
+
+		var isFunction = jQuery.isFunction(value);
+
+		return this.each(function(i) {
+			var self = jQuery(this), val = value;
+
+			if ( this.nodeType !== 1 ) {
+				return;
+			}
+
+			if ( isFunction ) {
+				val = value.call(this, i, self.val());
+			}
+
+			// Treat null/undefined as ""; convert numbers to string
+			if ( val == null ) {
+				val = "";
+			} else if ( typeof val === "number" ) {
+				val += "";
+			} else if ( jQuery.isArray(val) ) {
+				val = jQuery.map(val, function (value) {
+					return value == null ? "" : value + "";
+				});
+			}
+
+			if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {
+				this.checked = jQuery.inArray( self.val(), val ) >= 0;
+
+			} else if ( jQuery.nodeName( this, "select" ) ) {
+				var values = jQuery.makeArray(val);
+
+				jQuery( "option", this ).each(function() {
+					this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+				});
+
+				if ( !values.length ) {
+					this.selectedIndex = -1;
+				}
+
+			} else {
+				this.value = val;
+			}
+		});
+	}
+});
+
+jQuery.extend({
+	attrFn: {
+		val: true,
+		css: true,
+		html: true,
+		text: true,
+		data: true,
+		width: true,
+		height: true,
+		offset: true
+	},
+
+	attr: function( elem, name, value, pass ) {
+		// don't get/set attributes on text, comment and attribute nodes
+		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || elem.nodeType === 2 ) {
+			return undefined;
+		}
+
+		if ( pass && name in jQuery.attrFn ) {
+			return jQuery(elem)[name](value);
+		}
+
+		var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ),
+			// Whether we are setting (or getting)
+			set = value !== undefined;
+
+		// Try to normalize/fix the name
+		name = notxml && jQuery.props[ name ] || name;
+
+		// Only do all the following if this is a node (faster for style)
+		if ( elem.nodeType === 1 ) {
+			// These attributes require special treatment
+			var special = rspecialurl.test( name );
+
+			// Safari mis-reports the default selected property of an option
+			// Accessing the parent's selectedIndex property fixes it
+			if ( name === "selected" && !jQuery.support.optSelected ) {
+				var parent = elem.parentNode;
+				if ( parent ) {
+					parent.selectedIndex;
+
+					// Make sure that it also works with optgroups, see #5701
+					if ( parent.parentNode ) {
+						parent.parentNode.selectedIndex;
+					}
+				}
+			}
+
+			// If applicable, access the attribute via the DOM 0 way
+			// 'in' checks fail in Blackberry 4.7 #6931
+			if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) {
+				if ( set ) {
+					// We can't allow the type property to be changed (since it causes problems in IE)
+					if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
+						jQuery.error( "type property can't be changed" );
+					}
+
+					if ( value === null ) {
+						if ( elem.nodeType === 1 ) {
+							elem.removeAttribute( name );
+						}
+
+					} else {
+						elem[ name ] = value;
+					}
+				}
+
+				// browsers index elements by id/name on forms, give priority to attributes.
+				if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) {
+					return elem.getAttributeNode( name ).nodeValue;
+				}
+
+				// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+				// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+				if ( name === "tabIndex" ) {
+					var attributeNode = elem.getAttributeNode( "tabIndex" );
+
+					return attributeNode && attributeNode.specified ?
+						attributeNode.value :
+						rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+							0 :
+							undefined;
+				}
+
+				return elem[ name ];
+			}
+
+			if ( !jQuery.support.style && notxml && name === "style" ) {
+				if ( set ) {
+					elem.style.cssText = "" + value;
+				}
+
+				return elem.style.cssText;
+			}
+
+			if ( set ) {
+				// convert the value to a string (all browsers do this but IE) see #1070
+				elem.setAttribute( name, "" + value );
+			}
+
+			// Ensure that missing attributes return undefined
+			// Blackberry 4.7 returns "" from getAttribute #6938
+			if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) {
+				return undefined;
+			}
+
+			var attr = !jQuery.support.hrefNormalized && notxml && special ?
+					// Some attributes require a special call on IE
+					elem.getAttribute( name, 2 ) :
+					elem.getAttribute( name );
+
+			// Non-existent attributes return null, we normalize to undefined
+			return attr === null ? undefined : attr;
+		}
+		// Handle everything which isn't a DOM element node
+		if ( set ) {
+			elem[ name ] = value;
+		}
+		return elem[ name ];
+	}
+});
+
+
+
+
+var rnamespaces = /\.(.*)$/,
+	rformElems = /^(?:textarea|input|select)$/i,
+	rperiod = /\./g,
+	rspace = / /g,
+	rescape = /[^\w\s.|`]/g,
+	fcleanup = function( nm ) {
+		return nm.replace(rescape, "\\$&");
+	},
+	eventKey = "events";
+
+/*
+ * A number of helper functions used for managing events.
+ * Many of the ideas behind this code originated from
+ * Dean Edwards' addEvent library.
+ */
+jQuery.event = {
+
+	// Bind an event to an element
+	// Original by Dean Edwards
+	add: function( elem, types, handler, data ) {
+		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+			return;
+		}
+
+		// For whatever reason, IE has trouble passing the window object
+		// around, causing it to be cloned in the process
+		if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) {
+			elem = window;
+		}
+
+		if ( handler === false ) {
+			handler = returnFalse;
+		} else if ( !handler ) {
+			// Fixes bug #7229. Fix recommended by jdalton
+		  return;
+		}
+
+		var handleObjIn, handleObj;
+
+		if ( handler.handler ) {
+			handleObjIn = handler;
+			handler = handleObjIn.handler;
+		}
+
+		// Make sure that the function being executed has a unique ID
+		if ( !handler.guid ) {
+			handler.guid = jQuery.guid++;
+		}
+
+		// Init the element's event structure
+		var elemData = jQuery._data( elem );
+
+		// If no elemData is found then we must be trying to bind to one of the
+		// banned noData elements
+		if ( !elemData ) {
+			return;
+		}
+
+		var events = elemData[ eventKey ],
+			eventHandle = elemData.handle;
+
+		if ( typeof events === "function" ) {
+			// On plain objects events is a fn that holds the the data
+			// which prevents this data from being JSON serialized
+			// the function does not need to be called, it just contains the data
+			eventHandle = events.handle;
+			events = events.events;
+
+		} else if ( !events ) {
+			if ( !elem.nodeType ) {
+				// On plain objects, create a fn that acts as the holder
+				// of the values to avoid JSON serialization of event data
+				elemData[ eventKey ] = elemData = function(){};
+			}
+
+			elemData.events = events = {};
+		}
+
+		if ( !eventHandle ) {
+			elemData.handle = eventHandle = function() {
+				// Handle the second event of a trigger and when
+				// an event is called after a page has unloaded
+				return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
+					jQuery.event.handle.apply( eventHandle.elem, arguments ) :
+					undefined;
+			};
+		}
+
+		// Add elem as a property of the handle function
+		// This is to prevent a memory leak with non-native events in IE.
+		eventHandle.elem = elem;
+
+		// Handle multiple events separated by a space
+		// jQuery(...).bind("mouseover mouseout", fn);
+		types = types.split(" ");
+
+		var type, i = 0, namespaces;
+
+		while ( (type = types[ i++ ]) ) {
+			handleObj = handleObjIn ?
+				jQuery.extend({}, handleObjIn) :
+				{ handler: handler, data: data };
+
+			// Namespaced event handlers
+			if ( type.indexOf(".") > -1 ) {
+				namespaces = type.split(".");
+				type = namespaces.shift();
+				handleObj.namespace = namespaces.slice(0).sort().join(".");
+
+			} else {
+				namespaces = [];
+				handleObj.namespace = "";
+			}
+
+			handleObj.type = type;
+			if ( !handleObj.guid ) {
+				handleObj.guid = handler.guid;
+			}
+
+			// Get the current list of functions bound to this event
+			var handlers = events[ type ],
+				special = jQuery.event.special[ type ] || {};
+
+			// Init the event handler queue
+			if ( !handlers ) {
+				handlers = events[ type ] = [];
+
+				// Check for a special event handler
+				// Only use addEventListener/attachEvent if the special
+				// events handler returns false
+				if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+					// Bind the global event handler to the element
+					if ( elem.addEventListener ) {
+						elem.addEventListener( type, eventHandle, false );
+
+					} else if ( elem.attachEvent ) {
+						elem.attachEvent( "on" + type, eventHandle );
+					}
+				}
+			}
+
+			if ( special.add ) {
+				special.add.call( elem, handleObj );
+
+				if ( !handleObj.handler.guid ) {
+					handleObj.handler.guid = handler.guid;
+				}
+			}
+
+			// Add the function to the element's handler list
+			handlers.push( handleObj );
+
+			// Keep track of which events have been used, for global triggering
+			jQuery.event.global[ type ] = true;
+		}
+
+		// Nullify elem to prevent memory leaks in IE
+		elem = null;
+	},
+
+	global: {},
+
+	// Detach an event or set of events from an element
+	remove: function( elem, types, handler, pos ) {
+		// don't do events on text and comment nodes
+		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+			return;
+		}
+
+		if ( handler === false ) {
+			handler = returnFalse;
+		}
+
+		var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
+			elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
+			events = elemData && elemData[ eventKey ];
+
+		if ( !elemData || !events ) {
+			return;
+		}
+
+		if ( typeof events === "function" ) {
+			elemData = events;
+			events = events.events;
+		}
+
+		// types is actually an event object here
+		if ( types && types.type ) {
+			handler = types.handler;
+			types = types.type;
+		}
+
+		// Unbind all events for the element
+		if ( !types || typeof types === "string" && types.charAt(0) === "." ) {
+			types = types || "";
+
+			for ( type in events ) {
+				jQuery.event.remove( elem, type + types );
+			}
+
+			return;
+		}
+
+		// Handle multiple events separated by a space
+		// jQuery(...).unbind("mouseover mouseout", fn);
+		types = types.split(" ");
+
+		while ( (type = types[ i++ ]) ) {
+			origType = type;
+			handleObj = null;
+			all = type.indexOf(".") < 0;
+			namespaces = [];
+
+			if ( !all ) {
+				// Namespaced event handlers
+				namespaces = type.split(".");
+				type = namespaces.shift();
+
+				namespace = new RegExp("(^|\\.)" +
+					jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
+			}
+
+			eventType = events[ type ];
+
+			if ( !eventType ) {
+				continue;
+			}
+
+			if ( !handler ) {
+				for ( j = 0; j < eventType.length; j++ ) {
+					handleObj = eventType[ j ];
+
+					if ( all || namespace.test( handleObj.namespace ) ) {
+						jQuery.event.remove( elem, origType, handleObj.handler, j );
+						eventType.splice( j--, 1 );
+					}
+				}
+
+				continue;
+			}
+
+			special = jQuery.event.special[ type ] || {};
+
+			for ( j = pos || 0; j < eventType.length; j++ ) {
+				handleObj = eventType[ j ];
+
+				if ( handler.guid === handleObj.guid ) {
+					// remove the given handler for the given type
+					if ( all || namespace.test( handleObj.namespace ) ) {
+						if ( pos == null ) {
+							eventType.splice( j--, 1 );
+						}
+
+						if ( special.remove ) {
+							special.remove.call( elem, handleObj );
+						}
+					}
+
+					if ( pos != null ) {
+						break;
+					}
+				}
+			}
+
+			// remove generic event handler if no more handlers exist
+			if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
+				if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+					jQuery.removeEvent( elem, type, elemData.handle );
+				}
+
+				ret = null;
+				delete events[ type ];
+			}
+		}
+
+		// Remove the expando if it's no longer used
+		if ( jQuery.isEmptyObject( events ) ) {
+			var handle = elemData.handle;
+			if ( handle ) {
+				handle.elem = null;
+			}
+
+			delete elemData.events;
+			delete elemData.handle;
+
+			if ( typeof elemData === "function" ) {
+				jQuery.removeData( elem, eventKey, true );
+
+			} else if ( jQuery.isEmptyObject( elemData ) ) {
+				jQuery.removeData( elem, undefined, true );
+			}
+		}
+	},
+
+	// bubbling is internal
+	trigger: function( event, data, elem /*, bubbling */ ) {
+		// Event object or event type
+		var type = event.type || event,
+			bubbling = arguments[3];
+
+		if ( !bubbling ) {
+			event = typeof event === "object" ?
+				// jQuery.Event object
+				event[ jQuery.expando ] ? event :
+				// Object literal
+				jQuery.extend( jQuery.Event(type), event ) :
+				// Just the event type (string)
+				jQuery.Event(type);
+
+			if ( type.indexOf("!") >= 0 ) {
+				event.type = type = type.slice(0, -1);
+				event.exclusive = true;
+			}
+
+			// Handle a global trigger
+			if ( !elem ) {
+				// Don't bubble custom events when global (to avoid too much overhead)
+				event.stopPropagation();
+
+				// Only trigger if we've ever bound an event for it
+				if ( jQuery.event.global[ type ] ) {
+					// XXX This code smells terrible. event.js should not be directly
+					// inspecting the data cache
+					jQuery.each( jQuery.cache, function() {
+						// internalKey variable is just used to make it easier to find
+						// and potentially change this stuff later; currently it just
+						// points to jQuery.expando
+						var internalKey = jQuery.expando,
+							internalCache = this[ internalKey ];
+						if ( internalCache && internalCache.events && internalCache.events[type] ) {
+							jQuery.event.trigger( event, data, internalCache.handle.elem );
+						}
+					});
+				}
+			}
+
+			// Handle triggering a single element
+
+			// don't do events on text and comment nodes
+			if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
+				return undefined;
+			}
+
+			// Clean up in case it is reused
+			event.result = undefined;
+			event.target = elem;
+
+			// Clone the incoming data, if any
+			data = jQuery.makeArray( data );
+			data.unshift( event );
+		}
+
+		event.currentTarget = elem;
+
+		// Trigger the event, it is assumed that "handle" is a function
+		var handle = elem.nodeType ?
+			jQuery._data( elem, "handle" ) :
+			(jQuery._data( elem, eventKey ) || {}).handle;
+
+		if ( handle ) {
+			handle.apply( elem, data );
+		}
+
+		var parent = elem.parentNode || elem.ownerDocument;
+
+		// Trigger an inline bound script
+		try {
+			if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {
+				if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) {
+					event.result = false;
+					event.preventDefault();
+				}
+			}
+
+		// prevent IE from throwing an error for some elements with some event types, see #3533
+		} catch (inlineError) {}
+
+		if ( !event.isPropagationStopped() && parent ) {
+			jQuery.event.trigger( event, data, parent, true );
+
+		} else if ( !event.isDefaultPrevented() ) {
+			var old,
+				target = event.target,
+				targetType = type.replace( rnamespaces, "" ),
+				isClick = jQuery.nodeName( target, "a" ) && targetType === "click",
+				special = jQuery.event.special[ targetType ] || {};
+
+			if ( (!special._default || special._default.call( elem, event ) === false) &&
+				!isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
+
+				try {
+					if ( target[ targetType ] ) {
+						// Make sure that we don't accidentally re-trigger the onFOO events
+						old = target[ "on" + targetType ];
+
+						if ( old ) {
+							target[ "on" + targetType ] = null;
+						}
+
+						jQuery.event.triggered = true;
+						target[ targetType ]();
+					}
+
+				// prevent IE from throwing an error for some elements with some event types, see #3533
+				} catch (triggerError) {}
+
+				if ( old ) {
+					target[ "on" + targetType ] = old;
+				}
+
+				jQuery.event.triggered = false;
+			}
+		}
+	},
+
+	handle: function( event ) {
+		var all, handlers, namespaces, namespace_re, events,
+			namespace_sort = [],
+			args = jQuery.makeArray( arguments );
+
+		event = args[0] = jQuery.event.fix( event || window.event );
+		event.currentTarget = this;
+
+		// Namespaced event handlers
+		all = event.type.indexOf(".") < 0 && !event.exclusive;
+
+		if ( !all ) {
+			namespaces = event.type.split(".");
+			event.type = namespaces.shift();
+			namespace_sort = namespaces.slice(0).sort();
+			namespace_re = new RegExp("(^|\\.)" + namespace_sort.join("\\.(?:.*\\.)?") + "(\\.|$)");
+		}
+
+		event.namespace = event.namespace || namespace_sort.join(".");
+
+		events = jQuery._data(this, eventKey);
+
+		if ( typeof events === "function" ) {
+			events = events.events;
+		}
+
+		handlers = (events || {})[ event.type ];
+
+		if ( events && handlers ) {
+			// Clone the handlers to prevent manipulation
+			handlers = handlers.slice(0);
+
+			for ( var j = 0, l = handlers.length; j < l; j++ ) {
+				var handleObj = handlers[ j ];
+
+				// Filter the functions by class
+				if ( all || namespace_re.test( handleObj.namespace ) ) {
+					// Pass in a reference to the handler function itself
+					// So that we can later remove it
+					event.handler = handleObj.handler;
+					event.data = handleObj.data;
+					event.handleObj = handleObj;
+
+					var ret = handleObj.handler.apply( this, args );
+
+					if ( ret !== undefined ) {
+						event.result = ret;
+						if ( ret === false ) {
+							event.preventDefault();
+							event.stopPropagation();
+						}
+					}
+
+					if ( event.isImmediatePropagationStopped() ) {
+						break;
+					}
+				}
+			}
+		}
+
+		return event.result;
+	},
+
+	props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+
+	fix: function( event ) {
+		if ( event[ jQuery.expando ] ) {
+			return event;
+		}
+
+		// store a copy of the original event object
+		// and "clone" to set read-only properties
+		var originalEvent = event;
+		event = jQuery.Event( originalEvent );
+
+		for ( var i = this.props.length, prop; i; ) {
+			prop = this.props[ --i ];
+			event[ prop ] = originalEvent[ prop ];
+		}
+
+		// Fix target property, if necessary
+		if ( !event.target ) {
+			// Fixes #1925 where srcElement might not be defined either
+			event.target = event.srcElement || document;
+		}
+
+		// check if target is a textnode (safari)
+		if ( event.target.nodeType === 3 ) {
+			event.target = event.target.parentNode;
+		}
+
+		// Add relatedTarget, if necessary
+		if ( !event.relatedTarget && event.fromElement ) {
+			event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
+		}
+
+		// Calculate pageX/Y if missing and clientX/Y available
+		if ( event.pageX == null && event.clientX != null ) {
+			var doc = document.documentElement,
+				body = document.body;
+
+			event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
+			event.pageY = event.clientY + (doc && doc.scrollTop  || body && body.scrollTop  || 0) - (doc && doc.clientTop  || body && body.clientTop  || 0);
+		}
+
+		// Add which for key events
+		if ( event.which == null && (event.charCode != null || event.keyCode != null) ) {
+			event.which = event.charCode != null ? event.charCode : event.keyCode;
+		}
+
+		// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
+		if ( !event.metaKey && event.ctrlKey ) {
+			event.metaKey = event.ctrlKey;
+		}
+
+		// Add which for click: 1 === left; 2 === middle; 3 === right
+		// Note: button is not normalized, so don't use it
+		if ( !event.which && event.button !== undefined ) {
+			event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
+		}
+
+		return event;
+	},
+
+	// Deprecated, use jQuery.guid instead
+	guid: 1E8,
+
+	// Deprecated, use jQuery.proxy instead
+	proxy: jQuery.proxy,
+
+	special: {
+		ready: {
+			// Make sure the ready event is setup
+			setup: jQuery.bindReady,
+			teardown: jQuery.noop
+		},
+
+		live: {
+			add: function( handleObj ) {
+				jQuery.event.add( this,
+					liveConvert( handleObj.origType, handleObj.selector ),
+					jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
+			},
+
+			remove: function( handleObj ) {
+				jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
+			}
+		},
+
+		beforeunload: {
+			setup: function( data, namespaces, eventHandle ) {
+				// We only want to do this special case on windows
+				if ( jQuery.isWindow( this ) ) {
+					this.onbeforeunload = eventHandle;
+				}
+			},
+
+			teardown: function( namespaces, eventHandle ) {
+				if ( this.onbeforeunload === eventHandle ) {
+					this.onbeforeunload = null;
+				}
+			}
+		}
+	}
+};
+
+jQuery.removeEvent = document.removeEventListener ?
+	function( elem, type, handle ) {
+		if ( elem.removeEventListener ) {
+			elem.removeEventListener( type, handle, false );
+		}
+	} :
+	function( elem, type, handle ) {
+		if ( elem.detachEvent ) {
+			elem.detachEvent( "on" + type, handle );
+		}
+	};
+
+jQuery.Event = function( src ) {
+	// Allow instantiation without the 'new' keyword
+	if ( !this.preventDefault ) {
+		return new jQuery.Event( src );
+	}
+
+	// Event object
+	if ( src && src.type ) {
+		this.originalEvent = src;
+		this.type = src.type;
+
+		// Events bubbling up the document may have been marked as prevented
+		// by a handler lower down the tree; reflect the correct value.
+		this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false || 
+			src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
+
+	// Event type
+	} else {
+		this.type = src;
+	}
+
+	// timeStamp is buggy for some events on Firefox(#3843)
+	// So we won't rely on the native value
+	this.timeStamp = jQuery.now();
+
+	// Mark it as fixed
+	this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+	return false;
+}
+function returnTrue() {
+	return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+	preventDefault: function() {
+		this.isDefaultPrevented = returnTrue;
+
+		var e = this.originalEvent;
+		if ( !e ) {
+			return;
+		}
+
+		// if preventDefault exists run it on the original event
+		if ( e.preventDefault ) {
+			e.preventDefault();
+
+		// otherwise set the returnValue property of the original event to false (IE)
+		} else {
+			e.returnValue = false;
+		}
+	},
+	stopPropagation: function() {
+		this.isPropagationStopped = returnTrue;
+
+		var e = this.originalEvent;
+		if ( !e ) {
+			return;
+		}
+		// if stopPropagation exists run it on the original event
+		if ( e.stopPropagation ) {
+			e.stopPropagation();
+		}
+		// otherwise set the cancelBubble property of the original event to true (IE)
+		e.cancelBubble = true;
+	},
+	stopImmediatePropagation: function() {
+		this.isImmediatePropagationStopped = returnTrue;
+		this.stopPropagation();
+	},
+	isDefaultPrevented: returnFalse,
+	isPropagationStopped: returnFalse,
+	isImmediatePropagationStopped: returnFalse
+};
+
+// Checks if an event happened on an element within another element
+// Used in jQuery.event.special.mouseenter and mouseleave handlers
+var withinElement = function( event ) {
+	// Check if mouse(over|out) are still within the same parent element
+	var parent = event.relatedTarget;
+
+	// Firefox sometimes assigns relatedTarget a XUL element
+	// which we cannot access the parentNode property of
+	try {
+		// Traverse up the tree
+		while ( parent && parent !== this ) {
+			parent = parent.parentNode;
+		}
+
+		if ( parent !== this ) {
+			// set the correct event type
+			event.type = event.data;
+
+			// handle event if we actually just moused on to a non sub-element
+			jQuery.event.handle.apply( this, arguments );
+		}
+
+	// assuming we've left the element since we most likely mousedover a xul element
+	} catch(e) { }
+},
+
+// In case of event delegation, we only need to rename the event.type,
+// liveHandler will take care of the rest.
+delegate = function( event ) {
+	event.type = event.data;
+	jQuery.event.handle.apply( this, arguments );
+};
+
+// Create mouseenter and mouseleave events
+jQuery.each({
+	mouseenter: "mouseover",
+	mouseleave: "mouseout"
+}, function( orig, fix ) {
+	jQuery.event.special[ orig ] = {
+		setup: function( data ) {
+			jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );
+		},
+		teardown: function( data ) {
+			jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );
+		}
+	};
+});
+
+// submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+	jQuery.event.special.submit = {
+		setup: function( data, namespaces ) {
+			if ( this.nodeName && this.nodeName.toLowerCase() !== "form" ) {
+				jQuery.event.add(this, "click.specialSubmit", function( e ) {
+					var elem = e.target,
+						type = elem.type;
+
+					if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
+						e.liveFired = undefined;
+						return trigger( "submit", this, arguments );
+					}
+				});
+
+				jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
+					var elem = e.target,
+						type = elem.type;
+
+					if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
+						e.liveFired = undefined;
+						return trigger( "submit", this, arguments );
+					}
+				});
+
+			} else {
+				return false;
+			}
+		},
+
+		teardown: function( namespaces ) {
+			jQuery.event.remove( this, ".specialSubmit" );
+		}
+	};
+
+}
+
+// change delegation, happens here so we have bind.
+if ( !jQuery.support.changeBubbles ) {
+
+	var changeFilters,
+
+	getVal = function( elem ) {
+		var type = elem.type, val = elem.value;
+
+		if ( type === "radio" || type === "checkbox" ) {
+			val = elem.checked;
+
+		} else if ( type === "select-multiple" ) {
+			val = elem.selectedIndex > -1 ?
+				jQuery.map( elem.options, function( elem ) {
+					return elem.selected;
+				}).join("-") :
+				"";
+
+		} else if ( elem.nodeName.toLowerCase() === "select" ) {
+			val = elem.selectedIndex;
+		}
+
+		return val;
+	},
+
+	testChange = function testChange( e ) {
+		var elem = e.target, data, val;
+
+		if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
+			return;
+		}
+
+		data = jQuery._data( elem, "_change_data" );
+		val = getVal(elem);
+
+		// the current data will be also retrieved by beforeactivate
+		if ( e.type !== "focusout" || elem.type !== "radio" ) {
+			jQuery._data( elem, "_change_data", val );
+		}
+
+		if ( data === undefined || val === data ) {
+			return;
+		}
+
+		if ( data != null || val ) {
+			e.type = "change";
+			e.liveFired = undefined;
+			return jQuery.event.trigger( e, arguments[1], elem );
+		}
+	};
+
+	jQuery.event.special.change = {
+		filters: {
+			focusout: testChange,
+
+			beforedeactivate: testChange,
+
+			click: function( e ) {
+				var elem = e.target, type = elem.type;
+
+				if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) {
+					return testChange.call( this, e );
+				}
+			},
+
+			// Change has to be called before submit
+			// Keydown will be called before keypress, which is used in submit-event delegation
+			keydown: function( e ) {
+				var elem = e.target, type = elem.type;
+
+				if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") ||
+					(e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
+					type === "select-multiple" ) {
+					return testChange.call( this, e );
+				}
+			},
+
+			// Beforeactivate happens also before the previous element is blurred
+			// with this event you can't trigger a change event, but you can store
+			// information
+			beforeactivate: function( e ) {
+				var elem = e.target;
+				jQuery._data( elem, "_change_data", getVal(elem) );
+			}
+		},
+
+		setup: function( data, namespaces ) {
+			if ( this.type === "file" ) {
+				return false;
+			}
+
+			for ( var type in changeFilters ) {
+				jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
+			}
+
+			return rformElems.test( this.nodeName );
+		},
+
+		teardown: function( namespaces ) {
+			jQuery.event.remove( this, ".specialChange" );
+
+			return rformElems.test( this.nodeName );
+		}
+	};
+
+	changeFilters = jQuery.event.special.change.filters;
+
+	// Handle when the input is .focus()'d
+	changeFilters.focus = changeFilters.beforeactivate;
+}
+
+function trigger( type, elem, args ) {
+	args[0].type = type;
+	return jQuery.event.handle.apply( elem, args );
+}
+
+// Create "bubbling" focus and blur events
+if ( document.addEventListener ) {
+	jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+		jQuery.event.special[ fix ] = {
+			setup: function() {
+				this.addEventListener( orig, handler, true );
+			}, 
+			teardown: function() { 
+				this.removeEventListener( orig, handler, true );
+			}
+		};
+
+		function handler( e ) {
+			e = jQuery.event.fix( e );
+			e.type = fix;
+			return jQuery.event.handle.call( this, e );
+		}
+	});
+}
+
+jQuery.each(["bind", "one"], function( i, name ) {
+	jQuery.fn[ name ] = function( type, data, fn ) {
+		// Handle object literals
+		if ( typeof type === "object" ) {
+			for ( var key in type ) {
+				this[ name ](key, data, type[key], fn);
+			}
+			return this;
+		}
+
+		if ( jQuery.isFunction( data ) || data === false ) {
+			fn = data;
+			data = undefined;
+		}
+
+		var handler = name === "one" ? jQuery.proxy( fn, function( event ) {
+			jQuery( this ).unbind( event, handler );
+			return fn.apply( this, arguments );
+		}) : fn;
+
+		if ( type === "unload" && name !== "one" ) {
+			this.one( type, data, fn );
+
+		} else {
+			for ( var i = 0, l = this.length; i < l; i++ ) {
+				jQuery.event.add( this[i], type, handler, data );
+			}
+		}
+
+		return this;
+	};
+});
+
+jQuery.fn.extend({
+	unbind: function( type, fn ) {
+		// Handle object literals
+		if ( typeof type === "object" && !type.preventDefault ) {
+			for ( var key in type ) {
+				this.unbind(key, type[key]);
+			}
+
+		} else {
+			for ( var i = 0, l = this.length; i < l; i++ ) {
+				jQuery.event.remove( this[i], type, fn );
+			}
+		}
+
+		return this;
+	},
+
+	delegate: function( selector, types, data, fn ) {
+		return this.live( types, data, fn, selector );
+	},
+
+	undelegate: function( selector, types, fn ) {
+		if ( arguments.length === 0 ) {
+				return this.unbind( "live" );
+
+		} else {
+			return this.die( types, null, fn, selector );
+		}
+	},
+
+	trigger: function( type, data ) {
+		return this.each(function() {
+			jQuery.event.trigger( type, data, this );
+		});
+	},
+
+	triggerHandler: function( type, data ) {
+		if ( this[0] ) {
+			var event = jQuery.Event( type );
+			event.preventDefault();
+			event.stopPropagation();
+			jQuery.event.trigger( event, data, this[0] );
+			return event.result;
+		}
+	},
+
+	toggle: function( fn ) {
+		// Save reference to arguments for access in closure
+		var args = arguments,
+			i = 1;
+
+		// link all the functions, so any of them can unbind this click handler
+		while ( i < args.length ) {
+			jQuery.proxy( fn, args[ i++ ] );
+		}
+
+		return this.click( jQuery.proxy( fn, function( event ) {
+			// Figure out which function to execute
+			var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+			jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+			// Make sure that clicks stop
+			event.preventDefault();
+
+			// and execute the function
+			return args[ lastToggle ].apply( this, arguments ) || false;
+		}));
+	},
+
+	hover: function( fnOver, fnOut ) {
+		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+	}
+});
+
+var liveMap = {
+	focus: "focusin",
+	blur: "focusout",
+	mouseenter: "mouseover",
+	mouseleave: "mouseout"
+};
+
+jQuery.each(["live", "die"], function( i, name ) {
+	jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
+		var type, i = 0, match, namespaces, preType,
+			selector = origSelector || this.selector,
+			context = origSelector ? this : jQuery( this.context );
+
+		if ( typeof types === "object" && !types.preventDefault ) {
+			for ( var key in types ) {
+				context[ name ]( key, data, types[key], selector );
+			}
+
+			return this;
+		}
+
+		if ( jQuery.isFunction( data ) ) {
+			fn = data;
+			data = undefined;
+		}
+
+		types = (types || "").split(" ");
+
+		while ( (type = types[ i++ ]) != null ) {
+			match = rnamespaces.exec( type );
+			namespaces = "";
+
+			if ( match )  {
+				namespaces = match[0];
+				type = type.replace( rnamespaces, "" );
+			}
+
+			if ( type === "hover" ) {
+				types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
+				continue;
+			}
+
+			preType = type;
+
+			if ( type === "focus" || type === "blur" ) {
+				types.push( liveMap[ type ] + namespaces );
+				type = type + namespaces;
+
+			} else {
+				type = (liveMap[ type ] || type) + namespaces;
+			}
+
+			if ( name === "live" ) {
+				// bind live handler
+				for ( var j = 0, l = context.length; j < l; j++ ) {
+					jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
+						{ data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
+				}
+
+			} else {
+				// unbind live handler
+				context.unbind( "live." + liveConvert( type, selector ), fn );
+			}
+		}
+
+		return this;
+	};
+});
+
+function liveHandler( event ) {
+	var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
+		elems = [],
+		selectors = [],
+		events = jQuery._data( this, eventKey );
+
+	if ( typeof events === "function" ) {
+		events = events.events;
+	}
+
+	// Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911)
+	if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) {
+		return;
+	}
+
+	if ( event.namespace ) {
+		namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
+	}
+
+	event.liveFired = this;
+
+	var live = events.live.slice(0);
+
+	for ( j = 0; j < live.length; j++ ) {
+		handleObj = live[j];
+
+		if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) {
+			selectors.push( handleObj.selector );
+
+		} else {
+			live.splice( j--, 1 );
+		}
+	}
+
+	match = jQuery( event.target ).closest( selectors, event.currentTarget );
+
+	for ( i = 0, l = match.length; i < l; i++ ) {
+		close = match[i];
+
+		for ( j = 0; j < live.length; j++ ) {
+			handleObj = live[j];
+
+			if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) ) {
+				elem = close.elem;
+				related = null;
+
+				// Those two events require additional checking
+				if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
+					event.type = handleObj.preType;
+					related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
+				}
+
+				if ( !related || related !== elem ) {
+					elems.push({ elem: elem, handleObj: handleObj, level: close.level });
+				}
+			}
+		}
+	}
+
+	for ( i = 0, l = elems.length; i < l; i++ ) {
+		match = elems[i];
+
+		if ( maxLevel && match.level > maxLevel ) {
+			break;
+		}
+
+		event.currentTarget = match.elem;
+		event.data = match.handleObj.data;
+		event.handleObj = match.handleObj;
+
+		ret = match.handleObj.origHandler.apply( match.elem, arguments );
+
+		if ( ret === false || event.isPropagationStopped() ) {
+			maxLevel = match.level;
+
+			if ( ret === false ) {
+				stop = false;
+			}
+			if ( event.isImmediatePropagationStopped() ) {
+				break;
+			}
+		}
+	}
+
+	return stop;
+}
+
+function liveConvert( type, selector ) {
+	return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspace, "&");
+}
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+	"change select submit keydown keypress keyup error").split(" "), function( i, name ) {
+
+	// Handle event binding
+	jQuery.fn[ name ] = function( data, fn ) {
+		if ( fn == null ) {
+			fn = data;
+			data = null;
+		}
+
+		return arguments.length > 0 ?
+			this.bind( name, data, fn ) :
+			this.trigger( name );
+	};
+
+	if ( jQuery.attrFn ) {
+		jQuery.attrFn[ name ] = true;
+	}
+});
+
+
+/*!
+ * Sizzle CSS Selector Engine
+ *  Copyright 2011, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){
+
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+	done = 0,
+	toString = Object.prototype.toString,
+	hasDuplicate = false,
+	baseHasDuplicate = true;
+
+// Here we check if the JavaScript engine is using some sort of
+// optimization where it does not always call our comparision
+// function. If that is the case, discard the hasDuplicate value.
+//   Thus far that includes Google Chrome.
+[0, 0].sort(function() {
+	baseHasDuplicate = false;
+	return 0;
+});
+
+var Sizzle = function( selector, context, results, seed ) {
+	results = results || [];
+	context = context || document;
+
+	var origContext = context;
+
+	if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+		return [];
+	}
+	
+	if ( !selector || typeof selector !== "string" ) {
+		return results;
+	}
+
+	var m, set, checkSet, extra, ret, cur, pop, i,
+		prune = true,
+		contextXML = Sizzle.isXML( context ),
+		parts = [],
+		soFar = selector;
+	
+	// Reset the position of the chunker regexp (start from head)
+	do {
+		chunker.exec( "" );
+		m = chunker.exec( soFar );
+
+		if ( m ) {
+			soFar = m[3];
+		
+			parts.push( m[1] );
+		
+			if ( m[2] ) {
+				extra = m[3];
+				break;
+			}
+		}
+	} while ( m );
+
+	if ( parts.length > 1 && origPOS.exec( selector ) ) {
+
+		if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
+			set = posProcess( parts[0] + parts[1], context );
+
+		} else {
+			set = Expr.relative[ parts[0] ] ?
+				[ context ] :
+				Sizzle( parts.shift(), context );
+
+			while ( parts.length ) {
+				selector = parts.shift();
+
+				if ( Expr.relative[ selector ] ) {
+					selector += parts.shift();
+				}
+				
+				set = posProcess( selector, set );
+			}
+		}
+
+	} else {
+		// Take a shortcut and set the context if the root selector is an ID
+		// (but not if it'll be faster if the inner selector is an ID)
+		if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
+				Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
+
+			ret = Sizzle.find( parts.shift(), context, contextXML );
+			context = ret.expr ?
+				Sizzle.filter( ret.expr, ret.set )[0] :
+				ret.set[0];
+		}
+
+		if ( context ) {
+			ret = seed ?
+				{ expr: parts.pop(), set: makeArray(seed) } :
+				Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
+
+			set = ret.expr ?
+				Sizzle.filter( ret.expr, ret.set ) :
+				ret.set;
+
+			if ( parts.length > 0 ) {
+				checkSet = makeArray( set );
+
+			} else {
+				prune = false;
+			}
+
+			while ( parts.length ) {
+				cur = parts.pop();
+				pop = cur;
+
+				if ( !Expr.relative[ cur ] ) {
+					cur = "";
+				} else {
+					pop = parts.pop();
+				}
+
+				if ( pop == null ) {
+					pop = context;
+				}
+
+				Expr.relative[ cur ]( checkSet, pop, contextXML );
+			}
+
+		} else {
+			checkSet = parts = [];
+		}
+	}
+
+	if ( !checkSet ) {
+		checkSet = set;
+	}
+
+	if ( !checkSet ) {
+		Sizzle.error( cur || selector );
+	}
+
+	if ( toString.call(checkSet) === "[object Array]" ) {
+		if ( !prune ) {
+			results.push.apply( results, checkSet );
+
+		} else if ( context && context.nodeType === 1 ) {
+			for ( i = 0; checkSet[i] != null; i++ ) {
+				if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
+					results.push( set[i] );
+				}
+			}
+
+		} else {
+			for ( i = 0; checkSet[i] != null; i++ ) {
+				if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
+					results.push( set[i] );
+				}
+			}
+		}
+
+	} else {
+		makeArray( checkSet, results );
+	}
+
+	if ( extra ) {
+		Sizzle( extra, origContext, results, seed );
+		Sizzle.uniqueSort( results );
+	}
+
+	return results;
+};
+
+Sizzle.uniqueSort = function( results ) {
+	if ( sortOrder ) {
+		hasDuplicate = baseHasDuplicate;
+		results.sort( sortOrder );
+
+		if ( hasDuplicate ) {
+			for ( var i = 1; i < results.length; i++ ) {
+				if ( results[i] === results[ i - 1 ] ) {
+					results.splice( i--, 1 );
+				}
+			}
+		}
+	}
+
+	return results;
+};
+
+Sizzle.matches = function( expr, set ) {
+	return Sizzle( expr, null, null, set );
+};
+
+Sizzle.matchesSelector = function( node, expr ) {
+	return Sizzle( expr, null, null, [node] ).length > 0;
+};
+
+Sizzle.find = function( expr, context, isXML ) {
+	var set;
+
+	if ( !expr ) {
+		return [];
+	}
+
+	for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
+		var match,
+			type = Expr.order[i];
+		
+		if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
+			var left = match[1];
+			match.splice( 1, 1 );
+
+			if ( left.substr( left.length - 1 ) !== "\\" ) {
+				match[1] = (match[1] || "").replace(/\\/g, "");
+				set = Expr.find[ type ]( match, context, isXML );
+
+				if ( set != null ) {
+					expr = expr.replace( Expr.match[ type ], "" );
+					break;
+				}
+			}
+		}
+	}
+
+	if ( !set ) {
+		set = typeof context.getElementsByTagName !== "undefined" ?
+			context.getElementsByTagName( "*" ) :
+			[];
+	}
+
+	return { set: set, expr: expr };
+};
+
+Sizzle.filter = function( expr, set, inplace, not ) {
+	var match, anyFound,
+		old = expr,
+		result = [],
+		curLoop = set,
+		isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
+
+	while ( expr && set.length ) {
+		for ( var type in Expr.filter ) {
+			if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+				var found, item,
+					filter = Expr.filter[ type ],
+					left = match[1];
+
+				anyFound = false;
+
+				match.splice(1,1);
+
+				if ( left.substr( left.length - 1 ) === "\\" ) {
+					continue;
+				}
+
+				if ( curLoop === result ) {
+					result = [];
+				}
+
+				if ( Expr.preFilter[ type ] ) {
+					match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
+
+					if ( !match ) {
+						anyFound = found = true;
+
+					} else if ( match === true ) {
+						continue;
+					}
+				}
+
+				if ( match ) {
+					for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
+						if ( item ) {
+							found = filter( item, match, i, curLoop );
+							var pass = not ^ !!found;
+
+							if ( inplace && found != null ) {
+								if ( pass ) {
+									anyFound = true;
+
+								} else {
+									curLoop[i] = false;
+								}
+
+							} else if ( pass ) {
+								result.push( item );
+								anyFound = true;
+							}
+						}
+					}
+				}
+
+				if ( found !== undefined ) {
+					if ( !inplace ) {
+						curLoop = result;
+					}
+
+					expr = expr.replace( Expr.match[ type ], "" );
+
+					if ( !anyFound ) {
+						return [];
+					}
+
+					break;
+				}
+			}
+		}
+
+		// Improper expression
+		if ( expr === old ) {
+			if ( anyFound == null ) {
+				Sizzle.error( expr );
+
+			} else {
+				break;
+			}
+		}
+
+		old = expr;
+	}
+
+	return curLoop;
+};
+
+Sizzle.error = function( msg ) {
+	throw "Syntax error, unrecognized expression: " + msg;
+};
+
+var Expr = Sizzle.selectors = {
+	order: [ "ID", "NAME", "TAG" ],
+
+	match: {
+		ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+		CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+		NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
+		ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
+		TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+		CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
+		POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
+		PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
+	},
+
+	leftMatch: {},
+
+	attrMap: {
+		"class": "className",
+		"for": "htmlFor"
+	},
+
+	attrHandle: {
+		href: function( elem ) {
+			return elem.getAttribute( "href" );
+		}
+	},
+
+	relative: {
+		"+": function(checkSet, part){
+			var isPartStr = typeof part === "string",
+				isTag = isPartStr && !/\W/.test( part ),
+				isPartStrNotTag = isPartStr && !isTag;
+
+			if ( isTag ) {
+				part = part.toLowerCase();
+			}
+
+			for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
+				if ( (elem = checkSet[i]) ) {
+					while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
+
+					checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
+						elem || false :
+						elem === part;
+				}
+			}
+
+			if ( isPartStrNotTag ) {
+				Sizzle.filter( part, checkSet, true );
+			}
+		},
+
+		">": function( checkSet, part ) {
+			var elem,
+				isPartStr = typeof part === "string",
+				i = 0,
+				l = checkSet.length;
+
+			if ( isPartStr && !/\W/.test( part ) ) {
+				part = part.toLowerCase();
+
+				for ( ; i < l; i++ ) {
+					elem = checkSet[i];
+
+					if ( elem ) {
+						var parent = elem.parentNode;
+						checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+					}
+				}
+
+			} else {
+				for ( ; i < l; i++ ) {
+					elem = checkSet[i];
+
+					if ( elem ) {
+						checkSet[i] = isPartStr ?
+							elem.parentNode :
+							elem.parentNode === part;
+					}
+				}
+
+				if ( isPartStr ) {
+					Sizzle.filter( part, checkSet, true );
+				}
+			}
+		},
+
+		"": function(checkSet, part, isXML){
+			var nodeCheck,
+				doneName = done++,
+				checkFn = dirCheck;
+
+			if ( typeof part === "string" && !/\W/.test(part) ) {
+				part = part.toLowerCase();
+				nodeCheck = part;
+				checkFn = dirNodeCheck;
+			}
+
+			checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
+		},
+
+		"~": function( checkSet, part, isXML ) {
+			var nodeCheck,
+				doneName = done++,
+				checkFn = dirCheck;
+
+			if ( typeof part === "string" && !/\W/.test( part ) ) {
+				part = part.toLowerCase();
+				nodeCheck = part;
+				checkFn = dirNodeCheck;
+			}
+
+			checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
+		}
+	},
+
+	find: {
+		ID: function( match, context, isXML ) {
+			if ( typeof context.getElementById !== "undefined" && !isXML ) {
+				var m = context.getElementById(match[1]);
+				// Check parentNode to catch when Blackberry 4.6 returns
+				// nodes that are no longer in the document #6963
+				return m && m.parentNode ? [m] : [];
+			}
+		},
+
+		NAME: function( match, context ) {
+			if ( typeof context.getElementsByName !== "undefined" ) {
+				var ret = [],
+					results = context.getElementsByName( match[1] );
+
+				for ( var i = 0, l = results.length; i < l; i++ ) {
+					if ( results[i].getAttribute("name") === match[1] ) {
+						ret.push( results[i] );
+					}
+				}
+
+				return ret.length === 0 ? null : ret;
+			}
+		},
+
+		TAG: function( match, context ) {
+			if ( typeof context.getElementsByTagName !== "undefined" ) {
+				return context.getElementsByTagName( match[1] );
+			}
+		}
+	},
+	preFilter: {
+		CLASS: function( match, curLoop, inplace, result, not, isXML ) {
+			match = " " + match[1].replace(/\\/g, "") + " ";
+
+			if ( isXML ) {
+				return match;
+			}
+
+			for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
+				if ( elem ) {
+					if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
+						if ( !inplace ) {
+							result.push( elem );
+						}
+
+					} else if ( inplace ) {
+						curLoop[i] = false;
+					}
+				}
+			}
+
+			return false;
+		},
+
+		ID: function( match ) {
+			return match[1].replace(/\\/g, "");
+		},
+
+		TAG: function( match, curLoop ) {
+			return match[1].toLowerCase();
+		},
+
+		CHILD: function( match ) {
+			if ( match[1] === "nth" ) {
+				if ( !match[2] ) {
+					Sizzle.error( match[0] );
+				}
+
+				match[2] = match[2].replace(/^\+|\s*/g, '');
+
+				// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+				var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
+					match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
+					!/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
+
+				// calculate the numbers (first)n+(last) including if they are negative
+				match[2] = (test[1] + (test[2] || 1)) - 0;
+				match[3] = test[3] - 0;
+			}
+			else if ( match[2] ) {
+				Sizzle.error( match[0] );
+			}
+
+			// TODO: Move to normal caching system
+			match[0] = done++;
+
+			return match;
+		},
+
+		ATTR: function( match, curLoop, inplace, result, not, isXML ) {
+			var name = match[1] = match[1].replace(/\\/g, "");
+			
+			if ( !isXML && Expr.attrMap[name] ) {
+				match[1] = Expr.attrMap[name];
+			}
+
+			// Handle if an un-quoted value was used
+			match[4] = ( match[4] || match[5] || "" ).replace(/\\/g, "");
+
+			if ( match[2] === "~=" ) {
+				match[4] = " " + match[4] + " ";
+			}
+
+			return match;
+		},
+
+		PSEUDO: function( match, curLoop, inplace, result, not ) {
+			if ( match[1] === "not" ) {
+				// If we're dealing with a complex expression, or a simple one
+				if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
+					match[3] = Sizzle(match[3], null, null, curLoop);
+
+				} else {
+					var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+
+					if ( !inplace ) {
+						result.push.apply( result, ret );
+					}
+
+					return false;
+				}
+
+			} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
+				return true;
+			}
+			
+			return match;
+		},
+
+		POS: function( match ) {
+			match.unshift( true );
+
+			return match;
+		}
+	},
+	
+	filters: {
+		enabled: function( elem ) {
+			return elem.disabled === false && elem.type !== "hidden";
+		},
+
+		disabled: function( elem ) {
+			return elem.disabled === true;
+		},
+
+		checked: function( elem ) {
+			return elem.checked === true;
+		},
+		
+		selected: function( elem ) {
+			// Accessing this property makes selected-by-default
+			// options in Safari work properly
+			elem.parentNode.selectedIndex;
+			
+			return elem.selected === true;
+		},
+
+		parent: function( elem ) {
+			return !!elem.firstChild;
+		},
+
+		empty: function( elem ) {
+			return !elem.firstChild;
+		},
+
+		has: function( elem, i, match ) {
+			return !!Sizzle( match[3], elem ).length;
+		},
+
+		header: function( elem ) {
+			return (/h\d/i).test( elem.nodeName );
+		},
+
+		text: function( elem ) {
+			return "text" === elem.type;
+		},
+		radio: function( elem ) {
+			return "radio" === elem.type;
+		},
+
+		checkbox: function( elem ) {
+			return "checkbox" === elem.type;
+		},
+
+		file: function( elem ) {
+			return "file" === elem.type;
+		},
+		password: function( elem ) {
+			return "password" === elem.type;
+		},
+
+		submit: function( elem ) {
+			return "submit" === elem.type;
+		},
+
+		image: function( elem ) {
+			return "image" === elem.type;
+		},
+
+		reset: function( elem ) {
+			return "reset" === elem.type;
+		},
+
+		button: function( elem ) {
+			return "button" === elem.type || elem.nodeName.toLowerCase() === "button";
+		},
+
+		input: function( elem ) {
+			return (/input|select|textarea|button/i).test( elem.nodeName );
+		}
+	},
+	setFilters: {
+		first: function( elem, i ) {
+			return i === 0;
+		},
+
+		last: function( elem, i, match, array ) {
+			return i === array.length - 1;
+		},
+
+		even: function( elem, i ) {
+			return i % 2 === 0;
+		},
+
+		odd: function( elem, i ) {
+			return i % 2 === 1;
+		},
+
+		lt: function( elem, i, match ) {
+			return i < match[3] - 0;
+		},
+
+		gt: function( elem, i, match ) {
+			return i > match[3] - 0;
+		},
+
+		nth: function( elem, i, match ) {
+			return match[3] - 0 === i;
+		},
+
+		eq: function( elem, i, match ) {
+			return match[3] - 0 === i;
+		}
+	},
+	filter: {
+		PSEUDO: function( elem, match, i, array ) {
+			var name = match[1],
+				filter = Expr.filters[ name ];
+
+			if ( filter ) {
+				return filter( elem, i, match, array );
+
+			} else if ( name === "contains" ) {
+				return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
+
+			} else if ( name === "not" ) {
+				var not = match[3];
+
+				for ( var j = 0, l = not.length; j < l; j++ ) {
+					if ( not[j] === elem ) {
+						return false;
+					}
+				}
+
+				return true;
+
+			} else {
+				Sizzle.error( name );
+			}
+		},
+
+		CHILD: function( elem, match ) {
+			var type = match[1],
+				node = elem;
+
+			switch ( type ) {
+				case "only":
+				case "first":
+					while ( (node = node.previousSibling) )	 {
+						if ( node.nodeType === 1 ) { 
+							return false; 
+						}
+					}
+
+					if ( type === "first" ) { 
+						return true; 
+					}
+
+					node = elem;
+
+				case "last":
+					while ( (node = node.nextSibling) )	 {
+						if ( node.nodeType === 1 ) { 
+							return false; 
+						}
+					}
+
+					return true;
+
+				case "nth":
+					var first = match[2],
+						last = match[3];
+
+					if ( first === 1 && last === 0 ) {
+						return true;
+					}
+					
+					var doneName = match[0],
+						parent = elem.parentNode;
+	
+					if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
+						var count = 0;
+						
+						for ( node = parent.firstChild; node; node = node.nextSibling ) {
+							if ( node.nodeType === 1 ) {
+								node.nodeIndex = ++count;
+							}
+						} 
+
+						parent.sizcache = doneName;
+					}
+					
+					var diff = elem.nodeIndex - last;
+
+					if ( first === 0 ) {
+						return diff === 0;
+
+					} else {
+						return ( diff % first === 0 && diff / first >= 0 );
+					}
+			}
+		},
+
+		ID: function( elem, match ) {
+			return elem.nodeType === 1 && elem.getAttribute("id") === match;
+		},
+
+		TAG: function( elem, match ) {
+			return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
+		},
+		
+		CLASS: function( elem, match ) {
+			return (" " + (elem.className || elem.getAttribute("class")) + " ")
+				.indexOf( match ) > -1;
+		},
+
+		ATTR: function( elem, match ) {
+			var name = match[1],
+				result = Expr.attrHandle[ name ] ?
+					Expr.attrHandle[ name ]( elem ) :
+					elem[ name ] != null ?
+						elem[ name ] :
+						elem.getAttribute( name ),
+				value = result + "",
+				type = match[2],
+				check = match[4];
+
+			return result == null ?
+				type === "!=" :
+				type === "=" ?
+				value === check :
+				type === "*=" ?
+				value.indexOf(check) >= 0 :
+				type === "~=" ?
+				(" " + value + " ").indexOf(check) >= 0 :
+				!check ?
+				value && result !== false :
+				type === "!=" ?
+				value !== check :
+				type === "^=" ?
+				value.indexOf(check) === 0 :
+				type === "$=" ?
+				value.substr(value.length - check.length) === check :
+				type === "|=" ?
+				value === check || value.substr(0, check.length + 1) === check + "-" :
+				false;
+		},
+
+		POS: function( elem, match, i, array ) {
+			var name = match[2],
+				filter = Expr.setFilters[ name ];
+
+			if ( filter ) {
+				return filter( elem, i, match, array );
+			}
+		}
+	}
+};
+
+var origPOS = Expr.match.POS,
+	fescape = function(all, num){
+		return "\\" + (num - 0 + 1);
+	};
+
+for ( var type in Expr.match ) {
+	Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
+	Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
+}
+
+var makeArray = function( array, results ) {
+	array = Array.prototype.slice.call( array, 0 );
+
+	if ( results ) {
+		results.push.apply( results, array );
+		return results;
+	}
+	
+	return array;
+};
+
+// Perform a simple check to determine if the browser is capable of
+// converting a NodeList to an array using builtin methods.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
+try {
+	Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
+
+// Provide a fallback method if it does not work
+} catch( e ) {
+	makeArray = function( array, results ) {
+		var i = 0,
+			ret = results || [];
+
+		if ( toString.call(array) === "[object Array]" ) {
+			Array.prototype.push.apply( ret, array );
+
+		} else {
+			if ( typeof array.length === "number" ) {
+				for ( var l = array.length; i < l; i++ ) {
+					ret.push( array[i] );
+				}
+
+			} else {
+				for ( ; array[i]; i++ ) {
+					ret.push( array[i] );
+				}
+			}
+		}
+
+		return ret;
+	};
+}
+
+var sortOrder, siblingCheck;
+
+if ( document.documentElement.compareDocumentPosition ) {
+	sortOrder = function( a, b ) {
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+			return a.compareDocumentPosition ? -1 : 1;
+		}
+
+		return a.compareDocumentPosition(b) & 4 ? -1 : 1;
+	};
+
+} else {
+	sortOrder = function( a, b ) {
+		var al, bl,
+			ap = [],
+			bp = [],
+			aup = a.parentNode,
+			bup = b.parentNode,
+			cur = aup;
+
+		// The nodes are identical, we can exit early
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+
+		// If the nodes are siblings (or identical) we can do a quick check
+		} else if ( aup === bup ) {
+			return siblingCheck( a, b );
+
+		// If no parents were found then the nodes are disconnected
+		} else if ( !aup ) {
+			return -1;
+
+		} else if ( !bup ) {
+			return 1;
+		}
+
+		// Otherwise they're somewhere else in the tree so we need
+		// to build up a full list of the parentNodes for comparison
+		while ( cur ) {
+			ap.unshift( cur );
+			cur = cur.parentNode;
+		}
+
+		cur = bup;
+
+		while ( cur ) {
+			bp.unshift( cur );
+			cur = cur.parentNode;
+		}
+
+		al = ap.length;
+		bl = bp.length;
+
+		// Start walking down the tree looking for a discrepancy
+		for ( var i = 0; i < al && i < bl; i++ ) {
+			if ( ap[i] !== bp[i] ) {
+				return siblingCheck( ap[i], bp[i] );
+			}
+		}
+
+		// We ended someplace up the tree so do a sibling check
+		return i === al ?
+			siblingCheck( a, bp[i], -1 ) :
+			siblingCheck( ap[i], b, 1 );
+	};
+
+	siblingCheck = function( a, b, ret ) {
+		if ( a === b ) {
+			return ret;
+		}
+
+		var cur = a.nextSibling;
+
+		while ( cur ) {
+			if ( cur === b ) {
+				return -1;
+			}
+
+			cur = cur.nextSibling;
+		}
+
+		return 1;
+	};
+}
+
+// Utility function for retreiving the text value of an array of DOM nodes
+Sizzle.getText = function( elems ) {
+	var ret = "", elem;
+
+	for ( var i = 0; elems[i]; i++ ) {
+		elem = elems[i];
+
+		// Get the text from text nodes and CDATA nodes
+		if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
+			ret += elem.nodeValue;
+
+		// Traverse everything else, except comment nodes
+		} else if ( elem.nodeType !== 8 ) {
+			ret += Sizzle.getText( elem.childNodes );
+		}
+	}
+
+	return ret;
+};
+
+// Check to see if the browser returns elements by name when
+// querying by getElementById (and provide a workaround)
+(function(){
+	// We're going to inject a fake input element with a specified name
+	var form = document.createElement("div"),
+		id = "script" + (new Date()).getTime(),
+		root = document.documentElement;
+
+	form.innerHTML = "<a name='" + id + "'/>";
+
+	// Inject it into the root element, check its status, and remove it quickly
+	root.insertBefore( form, root.firstChild );
+
+	// The workaround has to do additional checks after a getElementById
+	// Which slows things down for other browsers (hence the branching)
+	if ( document.getElementById( id ) ) {
+		Expr.find.ID = function( match, context, isXML ) {
+			if ( typeof context.getElementById !== "undefined" && !isXML ) {
+				var m = context.getElementById(match[1]);
+
+				return m ?
+					m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
+						[m] :
+						undefined :
+					[];
+			}
+		};
+
+		Expr.filter.ID = function( elem, match ) {
+			var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+
+			return elem.nodeType === 1 && node && node.nodeValue === match;
+		};
+	}
+
+	root.removeChild( form );
+
+	// release memory in IE
+	root = form = null;
+})();
+
+(function(){
+	// Check to see if the browser returns only elements
+	// when doing getElementsByTagName("*")
+
+	// Create a fake element
+	var div = document.createElement("div");
+	div.appendChild( document.createComment("") );
+
+	// Make sure no comments are found
+	if ( div.getElementsByTagName("*").length > 0 ) {
+		Expr.find.TAG = function( match, context ) {
+			var results = context.getElementsByTagName( match[1] );
+
+			// Filter out possible comments
+			if ( match[1] === "*" ) {
+				var tmp = [];
+
+				for ( var i = 0; results[i]; i++ ) {
+					if ( results[i].nodeType === 1 ) {
+						tmp.push( results[i] );
+					}
+				}
+
+				results = tmp;
+			}
+
+			return results;
+		};
+	}
+
+	// Check to see if an attribute returns normalized href attributes
+	div.innerHTML = "<a href='#'></a>";
+
+	if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+			div.firstChild.getAttribute("href") !== "#" ) {
+
+		Expr.attrHandle.href = function( elem ) {
+			return elem.getAttribute( "href", 2 );
+		};
+	}
+
+	// release memory in IE
+	div = null;
+})();
+
+if ( document.querySelectorAll ) {
+	(function(){
+		var oldSizzle = Sizzle,
+			div = document.createElement("div"),
+			id = "__sizzle__";
+
+		div.innerHTML = "<p class='TEST'></p>";
+
+		// Safari can't handle uppercase or unicode characters when
+		// in quirks mode.
+		if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
+			return;
+		}
+	
+		Sizzle = function( query, context, extra, seed ) {
+			context = context || document;
+
+			// Only use querySelectorAll on non-XML documents
+			// (ID selectors don't work in non-HTML documents)
+			if ( !seed && !Sizzle.isXML(context) ) {
+				// See if we find a selector to speed up
+				var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
+				
+				if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
+					// Speed-up: Sizzle("TAG")
+					if ( match[1] ) {
+						return makeArray( context.getElementsByTagName( query ), extra );
+					
+					// Speed-up: Sizzle(".CLASS")
+					} else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
+						return makeArray( context.getElementsByClassName( match[2] ), extra );
+					}
+				}
+				
+				if ( context.nodeType === 9 ) {
+					// Speed-up: Sizzle("body")
+					// The body element only exists once, optimize finding it
+					if ( query === "body" && context.body ) {
+						return makeArray( [ context.body ], extra );
+						
+					// Speed-up: Sizzle("#ID")
+					} else if ( match && match[3] ) {
+						var elem = context.getElementById( match[3] );
+
+						// Check parentNode to catch when Blackberry 4.6 returns
+						// nodes that are no longer in the document #6963
+						if ( elem && elem.parentNode ) {
+							// Handle the case where IE and Opera return items
+							// by name instead of ID
+							if ( elem.id === match[3] ) {
+								return makeArray( [ elem ], extra );
+							}
+							
+						} else {
+							return makeArray( [], extra );
+						}
+					}
+					
+					try {
+						return makeArray( context.querySelectorAll(query), extra );
+					} catch(qsaError) {}
+
+				// qSA works strangely on Element-rooted queries
+				// We can work around this by specifying an extra ID on the root
+				// and working up from there (Thanks to Andrew Dupont for the technique)
+				// IE 8 doesn't work on object elements
+				} else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+					var old = context.getAttribute( "id" ),
+						nid = old || id,
+						hasParent = context.parentNode,
+						relativeHierarchySelector = /^\s*[+~]/.test( query );
+
+					if ( !old ) {
+						context.setAttribute( "id", nid );
+					} else {
+						nid = nid.replace( /'/g, "\\$&" );
+					}
+					if ( relativeHierarchySelector && hasParent ) {
+						context = context.parentNode;
+					}
+
+					try {
+						if ( !relativeHierarchySelector || hasParent ) {
+							return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
+						}
+
+					} catch(pseudoError) {
+					} finally {
+						if ( !old ) {
+							context.removeAttribute( "id" );
+						}
+					}
+				}
+			}
+		
+			return oldSizzle(query, context, extra, seed);
+		};
+
+		for ( var prop in oldSizzle ) {
+			Sizzle[ prop ] = oldSizzle[ prop ];
+		}
+
+		// release memory in IE
+		div = null;
+	})();
+}
+
+(function(){
+	var html = document.documentElement,
+		matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector,
+		pseudoWorks = false;
+
+	try {
+		// This should fail with an exception
+		// Gecko does not error, returns false instead
+		matches.call( document.documentElement, "[test!='']:sizzle" );
+	
+	} catch( pseudoError ) {
+		pseudoWorks = true;
+	}
+
+	if ( matches ) {
+		Sizzle.matchesSelector = function( node, expr ) {
+			// Make sure that attribute selectors are quoted
+			expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+			if ( !Sizzle.isXML( node ) ) {
+				try { 
+					if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
+						return matches.call( node, expr );
+					}
+				} catch(e) {}
+			}
+
+			return Sizzle(expr, null, null, [node]).length > 0;
+		};
+	}
+})();
+
+(function(){
+	var div = document.createElement("div");
+
+	div.innerHTML = "<div class='test e'></div><div class='test'></div>";
+
+	// Opera can't find a second classname (in 9.6)
+	// Also, make sure that getElementsByClassName actually exists
+	if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
+		return;
+	}
+
+	// Safari caches class attributes, doesn't catch changes (in 3.2)
+	div.lastChild.className = "e";
+
+	if ( div.getElementsByClassName("e").length === 1 ) {
+		return;
+	}
+	
+	Expr.order.splice(1, 0, "CLASS");
+	Expr.find.CLASS = function( match, context, isXML ) {
+		if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
+			return context.getElementsByClassName(match[1]);
+		}
+	};
+
+	// release memory in IE
+	div = null;
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+		var elem = checkSet[i];
+
+		if ( elem ) {
+			var match = false;
+
+			elem = elem[dir];
+
+			while ( elem ) {
+				if ( elem.sizcache === doneName ) {
+					match = checkSet[elem.sizset];
+					break;
+				}
+
+				if ( elem.nodeType === 1 && !isXML ){
+					elem.sizcache = doneName;
+					elem.sizset = i;
+				}
+
+				if ( elem.nodeName.toLowerCase() === cur ) {
+					match = elem;
+					break;
+				}
+
+				elem = elem[dir];
+			}
+
+			checkSet[i] = match;
+		}
+	}
+}
+
+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+		var elem = checkSet[i];
+
+		if ( elem ) {
+			var match = false;
+			
+			elem = elem[dir];
+
+			while ( elem ) {
+				if ( elem.sizcache === doneName ) {
+					match = checkSet[elem.sizset];
+					break;
+				}
+
+				if ( elem.nodeType === 1 ) {
+					if ( !isXML ) {
+						elem.sizcache = doneName;
+						elem.sizset = i;
+					}
+
+					if ( typeof cur !== "string" ) {
+						if ( elem === cur ) {
+							match = true;
+							break;
+						}
+
+					} else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
+						match = elem;
+						break;
+					}
+				}
+
+				elem = elem[dir];
+			}
+
+			checkSet[i] = match;
+		}
+	}
+}
+
+if ( document.documentElement.contains ) {
+	Sizzle.contains = function( a, b ) {
+		return a !== b && (a.contains ? a.contains(b) : true);
+	};
+
+} else if ( document.documentElement.compareDocumentPosition ) {
+	Sizzle.contains = function( a, b ) {
+		return !!(a.compareDocumentPosition(b) & 16);
+	};
+
+} else {
+	Sizzle.contains = function() {
+		return false;
+	};
+}
+
+Sizzle.isXML = function( elem ) {
+	// documentElement is verified for cases where it doesn't yet exist
+	// (such as loading iframes in IE - #4833) 
+	var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+
+	return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+var posProcess = function( selector, context ) {
+	var match,
+		tmpSet = [],
+		later = "",
+		root = context.nodeType ? [context] : context;
+
+	// Position selectors must be done after the filter
+	// And so must :not(positional) so we move all PSEUDOs to the end
+	while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
+		later += match[0];
+		selector = selector.replace( Expr.match.PSEUDO, "" );
+	}
+
+	selector = Expr.relative[selector] ? selector + "*" : selector;
+
+	for ( var i = 0, l = root.length; i < l; i++ ) {
+		Sizzle( selector, root[i], tmpSet );
+	}
+
+	return Sizzle.filter( later, tmpSet );
+};
+
+// EXPOSE
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.filters;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})();
+
+
+var runtil = /Until$/,
+	rparentsprev = /^(?:parents|prevUntil|prevAll)/,
+	// Note: This RegExp should be improved, or likely pulled from Sizzle
+	rmultiselector = /,/,
+	isSimple = /^.[^:#\[\.,]*$/,
+	slice = Array.prototype.slice,
+	POS = jQuery.expr.match.POS,
+	// methods guaranteed to produce a unique set when starting from a unique set
+	guaranteedUnique = {
+		children: true,
+		contents: true,
+		next: true,
+		prev: true
+	};
+
+jQuery.fn.extend({
+	find: function( selector ) {
+		var ret = this.pushStack( "", "find", selector ),
+			length = 0;
+
+		for ( var i = 0, l = this.length; i < l; i++ ) {
+			length = ret.length;
+			jQuery.find( selector, this[i], ret );
+
+			if ( i > 0 ) {
+				// Make sure that the results are unique
+				for ( var n = length; n < ret.length; n++ ) {
+					for ( var r = 0; r < length; r++ ) {
+						if ( ret[r] === ret[n] ) {
+							ret.splice(n--, 1);
+							break;
+						}
+					}
+				}
+			}
+		}
+
+		return ret;
+	},
+
+	has: function( target ) {
+		var targets = jQuery( target );
+		return this.filter(function() {
+			for ( var i = 0, l = targets.length; i < l; i++ ) {
+				if ( jQuery.contains( this, targets[i] ) ) {
+					return true;
+				}
+			}
+		});
+	},
+
+	not: function( selector ) {
+		return this.pushStack( winnow(this, selector, false), "not", selector);
+	},
+
+	filter: function( selector ) {
+		return this.pushStack( winnow(this, selector, true), "filter", selector );
+	},
+
+	is: function( selector ) {
+		return !!selector && jQuery.filter( selector, this ).length > 0;
+	},
+
+	closest: function( selectors, context ) {
+		var ret = [], i, l, cur = this[0];
+
+		if ( jQuery.isArray( selectors ) ) {
+			var match, selector,
+				matches = {},
+				level = 1;
+
+			if ( cur && selectors.length ) {
+				for ( i = 0, l = selectors.length; i < l; i++ ) {
+					selector = selectors[i];
+
+					if ( !matches[selector] ) {
+						matches[selector] = jQuery.expr.match.POS.test( selector ) ?
+							jQuery( selector, context || this.context ) :
+							selector;
+					}
+				}
+
+				while ( cur && cur.ownerDocument && cur !== context ) {
+					for ( selector in matches ) {
+						match = matches[selector];
+
+						if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) {
+							ret.push({ selector: selector, elem: cur, level: level });
+						}
+					}
+
+					cur = cur.parentNode;
+					level++;
+				}
+			}
+
+			return ret;
+		}
+
+		var pos = POS.test( selectors ) ?
+			jQuery( selectors, context || this.context ) : null;
+
+		for ( i = 0, l = this.length; i < l; i++ ) {
+			cur = this[i];
+
+			while ( cur ) {
+				if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+					ret.push( cur );
+					break;
+
+				} else {
+					cur = cur.parentNode;
+					if ( !cur || !cur.ownerDocument || cur === context ) {
+						break;
+					}
+				}
+			}
+		}
+
+		ret = ret.length > 1 ? jQuery.unique(ret) : ret;
+
+		return this.pushStack( ret, "closest", selectors );
+	},
+
+	// Determine the position of an element within
+	// the matched set of elements
+	index: function( elem ) {
+		if ( !elem || typeof elem === "string" ) {
+			return jQuery.inArray( this[0],
+				// If it receives a string, the selector is used
+				// If it receives nothing, the siblings are used
+				elem ? jQuery( elem ) : this.parent().children() );
+		}
+		// Locate the position of the desired element
+		return jQuery.inArray(
+			// If it receives a jQuery object, the first element is used
+			elem.jquery ? elem[0] : elem, this );
+	},
+
+	add: function( selector, context ) {
+		var set = typeof selector === "string" ?
+				jQuery( selector, context ) :
+				jQuery.makeArray( selector ),
+			all = jQuery.merge( this.get(), set );
+
+		return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+			all :
+			jQuery.unique( all ) );
+	},
+
+	andSelf: function() {
+		return this.add( this.prevObject );
+	}
+});
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+	return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+jQuery.each({
+	parent: function( elem ) {
+		var parent = elem.parentNode;
+		return parent && parent.nodeType !== 11 ? parent : null;
+	},
+	parents: function( elem ) {
+		return jQuery.dir( elem, "parentNode" );
+	},
+	parentsUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "parentNode", until );
+	},
+	next: function( elem ) {
+		return jQuery.nth( elem, 2, "nextSibling" );
+	},
+	prev: function( elem ) {
+		return jQuery.nth( elem, 2, "previousSibling" );
+	},
+	nextAll: function( elem ) {
+		return jQuery.dir( elem, "nextSibling" );
+	},
+	prevAll: function( elem ) {
+		return jQuery.dir( elem, "previousSibling" );
+	},
+	nextUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "nextSibling", until );
+	},
+	prevUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "previousSibling", until );
+	},
+	siblings: function( elem ) {
+		return jQuery.sibling( elem.parentNode.firstChild, elem );
+	},
+	children: function( elem ) {
+		return jQuery.sibling( elem.firstChild );
+	},
+	contents: function( elem ) {
+		return jQuery.nodeName( elem, "iframe" ) ?
+			elem.contentDocument || elem.contentWindow.document :
+			jQuery.makeArray( elem.childNodes );
+	}
+}, function( name, fn ) {
+	jQuery.fn[ name ] = function( until, selector ) {
+		var ret = jQuery.map( this, fn, until ),
+                // The variable 'args' was introduced in
+                // https://github.com/jquery/jquery/commit/52a0238
+                // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
+                // http://code.google.com/p/v8/issues/detail?id=1050
+                    args = slice.call(arguments);
+
+		if ( !runtil.test( name ) ) {
+			selector = until;
+		}
+
+		if ( selector && typeof selector === "string" ) {
+			ret = jQuery.filter( selector, ret );
+		}
+
+		ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+		if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
+			ret = ret.reverse();
+		}
+
+		return this.pushStack( ret, name, args.join(",") );
+	};
+});
+
+jQuery.extend({
+	filter: function( expr, elems, not ) {
+		if ( not ) {
+			expr = ":not(" + expr + ")";
+		}
+
+		return elems.length === 1 ?
+			jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+			jQuery.find.matches(expr, elems);
+	},
+
+	dir: function( elem, dir, until ) {
+		var matched = [],
+			cur = elem[ dir ];
+
+		while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+			if ( cur.nodeType === 1 ) {
+				matched.push( cur );
+			}
+			cur = cur[dir];
+		}
+		return matched;
+	},
+
+	nth: function( cur, result, dir, elem ) {
+		result = result || 1;
+		var num = 0;
+
+		for ( ; cur; cur = cur[dir] ) {
+			if ( cur.nodeType === 1 && ++num === result ) {
+				break;
+			}
+		}
+
+		return cur;
+	},
+
+	sibling: function( n, elem ) {
+		var r = [];
+
+		for ( ; n; n = n.nextSibling ) {
+			if ( n.nodeType === 1 && n !== elem ) {
+				r.push( n );
+			}
+		}
+
+		return r;
+	}
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+	if ( jQuery.isFunction( qualifier ) ) {
+		return jQuery.grep(elements, function( elem, i ) {
+			var retVal = !!qualifier.call( elem, i, elem );
+			return retVal === keep;
+		});
+
+	} else if ( qualifier.nodeType ) {
+		return jQuery.grep(elements, function( elem, i ) {
+			return (elem === qualifier) === keep;
+		});
+
+	} else if ( typeof qualifier === "string" ) {
+		var filtered = jQuery.grep(elements, function( elem ) {
+			return elem.nodeType === 1;
+		});
+
+		if ( isSimple.test( qualifier ) ) {
+			return jQuery.filter(qualifier, filtered, !keep);
+		} else {
+			qualifier = jQuery.filter( qualifier, filtered );
+		}
+	}
+
+	return jQuery.grep(elements, function( elem, i ) {
+		return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
+	});
+}
+
+
+
+
+var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
+	rleadingWhitespace = /^\s+/,
+	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
+	rtagName = /<([\w:]+)/,
+	rtbody = /<tbody/i,
+	rhtml = /<|&#?\w+;/,
+	rnocache = /<(?:script|object|embed|option|style)/i,
+	// checked="checked" or checked (html5)
+	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+	wrapMap = {
+		option: [ 1, "<select multiple='multiple'>", "</select>" ],
+		legend: [ 1, "<fieldset>", "</fieldset>" ],
+		thead: [ 1, "<table>", "</table>" ],
+		tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+		td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+		col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+		area: [ 1, "<map>", "</map>" ],
+		_default: [ 0, "", "" ]
+	};
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE can't serialize <link> and <script> tags normally
+if ( !jQuery.support.htmlSerialize ) {
+	wrapMap._default = [ 1, "div<div>", "</div>" ];
+}
+
+jQuery.fn.extend({
+	text: function( text ) {
+		if ( jQuery.isFunction(text) ) {
+			return this.each(function(i) {
+				var self = jQuery( this );
+
+				self.text( text.call(this, i, self.text()) );
+			});
+		}
+
+		if ( typeof text !== "object" && text !== undefined ) {
+			return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
+		}
+
+		return jQuery.text( this );
+	},
+
+	wrapAll: function( html ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapAll( html.call(this, i) );
+			});
+		}
+
+		if ( this[0] ) {
+			// The elements to wrap the target around
+			var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+			if ( this[0].parentNode ) {
+				wrap.insertBefore( this[0] );
+			}
+
+			wrap.map(function() {
+				var elem = this;
+
+				while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+					elem = elem.firstChild;
+				}
+
+				return elem;
+			}).append(this);
+		}
+
+		return this;
+	},
+
+	wrapInner: function( html ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapInner( html.call(this, i) );
+			});
+		}
+
+		return this.each(function() {
+			var self = jQuery( this ),
+				contents = self.contents();
+
+			if ( contents.length ) {
+				contents.wrapAll( html );
+
+			} else {
+				self.append( html );
+			}
+		});
+	},
+
+	wrap: function( html ) {
+		return this.each(function() {
+			jQuery( this ).wrapAll( html );
+		});
+	},
+
+	unwrap: function() {
+		return this.parent().each(function() {
+			if ( !jQuery.nodeName( this, "body" ) ) {
+				jQuery( this ).replaceWith( this.childNodes );
+			}
+		}).end();
+	},
+
+	append: function() {
+		return this.domManip(arguments, true, function( elem ) {
+			if ( this.nodeType === 1 ) {
+				this.appendChild( elem );
+			}
+		});
+	},
+
+	prepend: function() {
+		return this.domManip(arguments, true, function( elem ) {
+			if ( this.nodeType === 1 ) {
+				this.insertBefore( elem, this.firstChild );
+			}
+		});
+	},
+
+	before: function() {
+		if ( this[0] && this[0].parentNode ) {
+			return this.domManip(arguments, false, function( elem ) {
+				this.parentNode.insertBefore( elem, this );
+			});
+		} else if ( arguments.length ) {
+			var set = jQuery(arguments[0]);
+			set.push.apply( set, this.toArray() );
+			return this.pushStack( set, "before", arguments );
+		}
+	},
+
+	after: function() {
+		if ( this[0] && this[0].parentNode ) {
+			return this.domManip(arguments, false, function( elem ) {
+				this.parentNode.insertBefore( elem, this.nextSibling );
+			});
+		} else if ( arguments.length ) {
+			var set = this.pushStack( this, "after", arguments );
+			set.push.apply( set, jQuery(arguments[0]).toArray() );
+			return set;
+		}
+	},
+
+	// keepData is for internal use only--do not document
+	remove: function( selector, keepData ) {
+		for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+			if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+				if ( !keepData && elem.nodeType === 1 ) {
+					jQuery.cleanData( elem.getElementsByTagName("*") );
+					jQuery.cleanData( [ elem ] );
+				}
+
+				if ( elem.parentNode ) {
+					 elem.parentNode.removeChild( elem );
+				}
+			}
+		}
+
+		return this;
+	},
+
+	empty: function() {
+		for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+			// Remove element nodes and prevent memory leaks
+			if ( elem.nodeType === 1 ) {
+				jQuery.cleanData( elem.getElementsByTagName("*") );
+			}
+
+			// Remove any remaining nodes
+			while ( elem.firstChild ) {
+				elem.removeChild( elem.firstChild );
+			}
+		}
+
+		return this;
+	},
+
+	clone: function( dataAndEvents, deepDataAndEvents ) {
+		dataAndEvents = dataAndEvents == null ? true : dataAndEvents;
+		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+		return this.map( function () {
+			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+		});
+	},
+
+	html: function( value ) {
+		if ( value === undefined ) {
+			return this[0] && this[0].nodeType === 1 ?
+				this[0].innerHTML.replace(rinlinejQuery, "") :
+				null;
+
+		// See if we can take a shortcut and just use innerHTML
+		} else if ( typeof value === "string" && !rnocache.test( value ) &&
+			(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
+			!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
+
+			value = value.replace(rxhtmlTag, "<$1></$2>");
+
+			try {
+				for ( var i = 0, l = this.length; i < l; i++ ) {
+					// Remove element nodes and prevent memory leaks
+					if ( this[i].nodeType === 1 ) {
+						jQuery.cleanData( this[i].getElementsByTagName("*") );
+						this[i].innerHTML = value;
+					}
+				}
+
+			// If using innerHTML throws an exception, use the fallback method
+			} catch(e) {
+				this.empty().append( value );
+			}
+
+		} else if ( jQuery.isFunction( value ) ) {
+			this.each(function(i){
+				var self = jQuery( this );
+
+				self.html( value.call(this, i, self.html()) );
+			});
+
+		} else {
+			this.empty().append( value );
+		}
+
+		return this;
+	},
+
+	replaceWith: function( value ) {
+		if ( this[0] && this[0].parentNode ) {
+			// Make sure that the elements are removed from the DOM before they are inserted
+			// this can help fix replacing a parent with child elements
+			if ( jQuery.isFunction( value ) ) {
+				return this.each(function(i) {
+					var self = jQuery(this), old = self.html();
+					self.replaceWith( value.call( this, i, old ) );
+				});
+			}
+
+			if ( typeof value !== "string" ) {
+				value = jQuery( value ).detach();
+			}
+
+			return this.each(function() {
+				var next = this.nextSibling,
+					parent = this.parentNode;
+
+				jQuery( this ).remove();
+
+				if ( next ) {
+					jQuery(next).before( value );
+				} else {
+					jQuery(parent).append( value );
+				}
+			});
+		} else {
+			return this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value );
+		}
+	},
+
+	detach: function( selector ) {
+		return this.remove( selector, true );
+	},
+
+	domManip: function( args, table, callback ) {
+		var results, first, fragment, parent,
+			value = args[0],
+			scripts = [];
+
+		// We can't cloneNode fragments that contain checked, in WebKit
+		if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
+			return this.each(function() {
+				jQuery(this).domManip( args, table, callback, true );
+			});
+		}
+
+		if ( jQuery.isFunction(value) ) {
+			return this.each(function(i) {
+				var self = jQuery(this);
+				args[0] = value.call(this, i, table ? self.html() : undefined);
+				self.domManip( args, table, callback );
+			});
+		}
+
+		if ( this[0] ) {
+			parent = value && value.parentNode;
+
+			// If we're in a fragment, just use that instead of building a new one
+			if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
+				results = { fragment: parent };
+
+			} else {
+				results = jQuery.buildFragment( args, this, scripts );
+			}
+
+			fragment = results.fragment;
+
+			if ( fragment.childNodes.length === 1 ) {
+				first = fragment = fragment.firstChild;
+			} else {
+				first = fragment.firstChild;
+			}
+
+			if ( first ) {
+				table = table && jQuery.nodeName( first, "tr" );
+
+				for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
+					callback.call(
+						table ?
+							root(this[i], first) :
+							this[i],
+						// Make sure that we do not leak memory by inadvertently discarding
+						// the original fragment (which might have attached data) instead of
+						// using it; in addition, use the original fragment object for the last
+						// item instead of first because it can end up being emptied incorrectly
+						// in certain situations (Bug #8070).
+						// Fragments from the fragment cache must always be cloned and never used
+						// in place.
+						results.cacheable || (l > 1 && i < lastIndex) ?
+							jQuery.clone( fragment, true, true ) :
+							fragment
+					);
+				}
+			}
+
+			if ( scripts.length ) {
+				jQuery.each( scripts, evalScript );
+			}
+		}
+
+		return this;
+	}
+});
+
+function root( elem, cur ) {
+	return jQuery.nodeName(elem, "table") ?
+		(elem.getElementsByTagName("tbody")[0] ||
+		elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
+		elem;
+}
+
+function cloneCopyEvent( src, dest ) {
+
+	if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+		return;
+	}
+
+	var internalKey = jQuery.expando,
+			oldData = jQuery.data( src ),
+			curData = jQuery.data( dest, oldData );
+
+	// Switch to use the internal data object, if it exists, for the next
+	// stage of data copying
+	if ( (oldData = oldData[ internalKey ]) ) {
+		var events = oldData.events;
+				curData = curData[ internalKey ] = jQuery.extend({}, oldData);
+
+		if ( events ) {
+			delete curData.handle;
+			curData.events = {};
+
+			for ( var type in events ) {
+				for ( var i = 0, l = events[ type ].length; i < l; i++ ) {
+					jQuery.event.add( dest, type, events[ type ][ i ], events[ type ][ i ].data );
+				}
+			}
+		}
+	}
+}
+
+function cloneFixAttributes(src, dest) {
+	// We do not need to do anything for non-Elements
+	if ( dest.nodeType !== 1 ) {
+		return;
+	}
+
+	var nodeName = dest.nodeName.toLowerCase();
+
+	// clearAttributes removes the attributes, which we don't want,
+	// but also removes the attachEvent events, which we *do* want
+	dest.clearAttributes();
+
+	// mergeAttributes, in contrast, only merges back on the
+	// original attributes, not the events
+	dest.mergeAttributes(src);
+
+	// IE6-8 fail to clone children inside object elements that use
+	// the proprietary classid attribute value (rather than the type
+	// attribute) to identify the type of content to display
+	if ( nodeName === "object" ) {
+		dest.outerHTML = src.outerHTML;
+
+	} else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
+		// IE6-8 fails to persist the checked state of a cloned checkbox
+		// or radio button. Worse, IE6-7 fail to give the cloned element
+		// a checked appearance if the defaultChecked value isn't also set
+		if ( src.checked ) {
+			dest.defaultChecked = dest.checked = src.checked;
+		}
+
+		// IE6-7 get confused and end up setting the value of a cloned
+		// checkbox/radio button to an empty string instead of "on"
+		if ( dest.value !== src.value ) {
+			dest.value = src.value;
+		}
+
+	// IE6-8 fails to return the selected option to the default selected
+	// state when cloning options
+	} else if ( nodeName === "option" ) {
+		dest.selected = src.defaultSelected;
+
+	// IE6-8 fails to set the defaultValue to the correct value when
+	// cloning other types of input fields
+	} else if ( nodeName === "input" || nodeName === "textarea" ) {
+		dest.defaultValue = src.defaultValue;
+	}
+
+	// Event data gets referenced instead of copied if the expando
+	// gets copied too
+	dest.removeAttribute( jQuery.expando );
+}
+
+jQuery.buildFragment = function( args, nodes, scripts ) {
+	var fragment, cacheable, cacheresults,
+		doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
+
+	// Only cache "small" (1/2 KB) HTML strings that are associated with the main document
+	// Cloning options loses the selected state, so don't cache them
+	// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
+	// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+	if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
+		args[0].charAt(0) === "<" && !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
+
+		cacheable = true;
+		cacheresults = jQuery.fragments[ args[0] ];
+		if ( cacheresults ) {
+			if ( cacheresults !== 1 ) {
+				fragment = cacheresults;
+			}
+		}
+	}
+
+	if ( !fragment ) {
+		fragment = doc.createDocumentFragment();
+		jQuery.clean( args, doc, fragment, scripts );
+	}
+
+	if ( cacheable ) {
+		jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;
+	}
+
+	return { fragment: fragment, cacheable: cacheable };
+};
+
+jQuery.fragments = {};
+
+jQuery.each({
+	appendTo: "append",
+	prependTo: "prepend",
+	insertBefore: "before",
+	insertAfter: "after",
+	replaceAll: "replaceWith"
+}, function( name, original ) {
+	jQuery.fn[ name ] = function( selector ) {
+		var ret = [],
+			insert = jQuery( selector ),
+			parent = this.length === 1 && this[0].parentNode;
+
+		if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
+			insert[ original ]( this[0] );
+			return this;
+
+		} else {
+			for ( var i = 0, l = insert.length; i < l; i++ ) {
+				var elems = (i > 0 ? this.clone(true) : this).get();
+				jQuery( insert[i] )[ original ]( elems );
+				ret = ret.concat( elems );
+			}
+
+			return this.pushStack( ret, name, insert.selector );
+		}
+	};
+});
+
+jQuery.extend({
+	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+		var clone = elem.cloneNode(true),
+				srcElements,
+				destElements,
+				i;
+
+		if ( !jQuery.support.noCloneEvent && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+			// IE copies events bound via attachEvent when using cloneNode.
+			// Calling detachEvent on the clone will also remove the events
+			// from the original. In order to get around this, we use some
+			// proprietary methods to clear the events. Thanks to MooTools
+			// guys for this hotness.
+
+			// Using Sizzle here is crazy slow, so we use getElementsByTagName
+			// instead
+			srcElements = elem.getElementsByTagName("*");
+			destElements = clone.getElementsByTagName("*");
+
+			// Weird iteration because IE will replace the length property
+			// with an element if you are cloning the body and one of the
+			// elements on the page has a name or id of "length"
+			for ( i = 0; srcElements[i]; ++i ) {
+				cloneFixAttributes( srcElements[i], destElements[i] );
+			}
+
+			cloneFixAttributes( elem, clone );
+		}
+
+		// Copy the events from the original to the clone
+		if ( dataAndEvents ) {
+
+			cloneCopyEvent( elem, clone );
+
+			if ( deepDataAndEvents && "getElementsByTagName" in elem ) {
+
+				srcElements = elem.getElementsByTagName("*");
+				destElements = clone.getElementsByTagName("*");
+
+				if ( srcElements.length ) {
+					for ( i = 0; srcElements[i]; ++i ) {
+						cloneCopyEvent( srcElements[i], destElements[i] );
+					}
+				}
+			}
+		}
+		// Return the cloned set
+		return clone;
+  },
+	clean: function( elems, context, fragment, scripts ) {
+		context = context || document;
+
+		// !context.createElement fails in IE with an error but returns typeof 'object'
+		if ( typeof context.createElement === "undefined" ) {
+			context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
+		}
+
+		var ret = [];
+
+		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+			if ( typeof elem === "number" ) {
+				elem += "";
+			}
+
+			if ( !elem ) {
+				continue;
+			}
+
+			// Convert html string into DOM nodes
+			if ( typeof elem === "string" && !rhtml.test( elem ) ) {
+				elem = context.createTextNode( elem );
+
+			} else if ( typeof elem === "string" ) {
+				// Fix "XHTML"-style tags in all browsers
+				elem = elem.replace(rxhtmlTag, "<$1></$2>");
+
+				// Trim whitespace, otherwise indexOf won't work as expected
+				var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
+					wrap = wrapMap[ tag ] || wrapMap._default,
+					depth = wrap[0],
+					div = context.createElement("div");
+
+				// Go to html and back, then peel off extra wrappers
+				div.innerHTML = wrap[1] + elem + wrap[2];
+
+				// Move to the right depth
+				while ( depth-- ) {
+					div = div.lastChild;
+				}
+
+				// Remove IE's autoinserted <tbody> from table fragments
+				if ( !jQuery.support.tbody ) {
+
+					// String was a <table>, *may* have spurious <tbody>
+					var hasBody = rtbody.test(elem),
+						tbody = tag === "table" && !hasBody ?
+							div.firstChild && div.firstChild.childNodes :
+
+							// String was a bare <thead> or <tfoot>
+							wrap[1] === "<table>" && !hasBody ?
+								div.childNodes :
+								[];
+
+					for ( var j = tbody.length - 1; j >= 0 ; --j ) {
+						if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
+							tbody[ j ].parentNode.removeChild( tbody[ j ] );
+						}
+					}
+
+				}
+
+				// IE completely kills leading whitespace when innerHTML is used
+				if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+					div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
+				}
+
+				elem = div.childNodes;
+			}
+
+			if ( elem.nodeType ) {
+				ret.push( elem );
+			} else {
+				ret = jQuery.merge( ret, elem );
+			}
+		}
+
+		if ( fragment ) {
+			for ( i = 0; ret[i]; i++ ) {
+				if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
+					scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
+
+				} else {
+					if ( ret[i].nodeType === 1 ) {
+						ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
+					}
+					fragment.appendChild( ret[i] );
+				}
+			}
+		}
+
+		return ret;
+	},
+
+	cleanData: function( elems ) {
+		var data, id, cache = jQuery.cache, internalKey = jQuery.expando, special = jQuery.event.special,
+			deleteExpando = jQuery.support.deleteExpando;
+
+		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+			if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+				continue;
+			}
+
+			id = elem[ jQuery.expando ];
+
+			if ( id ) {
+				data = cache[ id ] && cache[ id ][ internalKey ];
+
+				if ( data && data.events ) {
+					for ( var type in data.events ) {
+						if ( special[ type ] ) {
+							jQuery.event.remove( elem, type );
+
+						// This is a shortcut to avoid jQuery.event.remove's overhead
+						} else {
+							jQuery.removeEvent( elem, type, data.handle );
+						}
+					}
+
+					// Null the DOM reference to avoid IE6/7/8 leak (#7054)
+					if ( data.handle ) {
+						data.handle.elem = null;
+					}
+				}
+
+				if ( deleteExpando ) {
+					delete elem[ jQuery.expando ];
+
+				} else if ( elem.removeAttribute ) {
+					elem.removeAttribute( jQuery.expando );
+				}
+
+				delete cache[ id ];
+			}
+		}
+	}
+});
+
+function evalScript( i, elem ) {
+	if ( elem.src ) {
+		jQuery.ajax({
+			url: elem.src,
+			async: false,
+			dataType: "script"
+		});
+	} else {
+		jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
+	}
+
+	if ( elem.parentNode ) {
+		elem.parentNode.removeChild( elem );
+	}
+}
+
+
+
+
+var ralpha = /alpha\([^)]*\)/i,
+	ropacity = /opacity=([^)]*)/,
+	rdashAlpha = /-([a-z])/ig,
+	rupper = /([A-Z])/g,
+	rnumpx = /^-?\d+(?:px)?$/i,
+	rnum = /^-?\d/,
+
+	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+	cssWidth = [ "Left", "Right" ],
+	cssHeight = [ "Top", "Bottom" ],
+	curCSS,
+
+	getComputedStyle,
+	currentStyle,
+
+	fcamelCase = function( all, letter ) {
+		return letter.toUpperCase();
+	};
+
+jQuery.fn.css = function( name, value ) {
+	// Setting 'undefined' is a no-op
+	if ( arguments.length === 2 && value === undefined ) {
+		return this;
+	}
+
+	return jQuery.access( this, name, value, true, function( elem, name, value ) {
+		return value !== undefined ?
+			jQuery.style( elem, name, value ) :
+			jQuery.css( elem, name );
+	});
+};
+
+jQuery.extend({
+	// Add in style property hooks for overriding the default
+	// behavior of getting and setting a style property
+	cssHooks: {
+		opacity: {
+			get: function( elem, computed ) {
+				if ( computed ) {
+					// We should always get a number back from opacity
+					var ret = curCSS( elem, "opacity", "opacity" );
+					return ret === "" ? "1" : ret;
+
+				} else {
+					return elem.style.opacity;
+				}
+			}
+		}
+	},
+
+	// Exclude the following css properties to add px
+	cssNumber: {
+		"zIndex": true,
+		"fontWeight": true,
+		"opacity": true,
+		"zoom": true,
+		"lineHeight": true
+	},
+
+	// Add in properties whose names you wish to fix before
+	// setting or getting the value
+	cssProps: {
+		// normalize float css property
+		"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+	},
+
+	// Get and set the style property on a DOM Node
+	style: function( elem, name, value, extra ) {
+		// Don't set styles on text and comment nodes
+		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+			return;
+		}
+
+		// Make sure that we're working with the right name
+		var ret, origName = jQuery.camelCase( name ),
+			style = elem.style, hooks = jQuery.cssHooks[ origName ];
+
+		name = jQuery.cssProps[ origName ] || origName;
+
+		// Check if we're setting a value
+		if ( value !== undefined ) {
+			// Make sure that NaN and null values aren't set. See: #7116
+			if ( typeof value === "number" && isNaN( value ) || value == null ) {
+				return;
+			}
+
+			// If a number was passed in, add 'px' to the (except for certain CSS properties)
+			if ( typeof value === "number" && !jQuery.cssNumber[ origName ] ) {
+				value += "px";
+			}
+
+			// If a hook was provided, use that value, otherwise just set the specified value
+			if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
+				// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+				// Fixes bug #5509
+				try {
+					style[ name ] = value;
+				} catch(e) {}
+			}
+
+		} else {
+			// If a hook was provided get the non-computed value from there
+			if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+				return ret;
+			}
+
+			// Otherwise just get the value from the style object
+			return style[ name ];
+		}
+	},
+
+	css: function( elem, name, extra ) {
+		// Make sure that we're working with the right name
+		var ret, origName = jQuery.camelCase( name ),
+			hooks = jQuery.cssHooks[ origName ];
+
+		name = jQuery.cssProps[ origName ] || origName;
+
+		// If a hook was provided get the computed value from there
+		if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
+			return ret;
+
+		// Otherwise, if a way to get the computed value exists, use that
+		} else if ( curCSS ) {
+			return curCSS( elem, name, origName );
+		}
+	},
+
+	// A method for quickly swapping in/out CSS properties to get correct calculations
+	swap: function( elem, options, callback ) {
+		var old = {};
+
+		// Remember the old values, and insert the new ones
+		for ( var name in options ) {
+			old[ name ] = elem.style[ name ];
+			elem.style[ name ] = options[ name ];
+		}
+
+		callback.call( elem );
+
+		// Revert the old values
+		for ( name in options ) {
+			elem.style[ name ] = old[ name ];
+		}
+	},
+
+	camelCase: function( string ) {
+		return string.replace( rdashAlpha, fcamelCase );
+	}
+});
+
+// DEPRECATED, Use jQuery.css() instead
+jQuery.curCSS = jQuery.css;
+
+jQuery.each(["height", "width"], function( i, name ) {
+	jQuery.cssHooks[ name ] = {
+		get: function( elem, computed, extra ) {
+			var val;
+
+			if ( computed ) {
+				if ( elem.offsetWidth !== 0 ) {
+					val = getWH( elem, name, extra );
+
+				} else {
+					jQuery.swap( elem, cssShow, function() {
+						val = getWH( elem, name, extra );
+					});
+				}
+
+				if ( val <= 0 ) {
+					val = curCSS( elem, name, name );
+
+					if ( val === "0px" && currentStyle ) {
+						val = currentStyle( elem, name, name );
+					}
+
+					if ( val != null ) {
+						// Should return "auto" instead of 0, use 0 for
+						// temporary backwards-compat
+						return val === "" || val === "auto" ? "0px" : val;
+					}
+				}
+
+				if ( val < 0 || val == null ) {
+					val = elem.style[ name ];
+
+					// Should return "auto" instead of 0, use 0 for
+					// temporary backwards-compat
+					return val === "" || val === "auto" ? "0px" : val;
+				}
+
+				return typeof val === "string" ? val : val + "px";
+			}
+		},
+
+		set: function( elem, value ) {
+			if ( rnumpx.test( value ) ) {
+				// ignore negative width and height values #1599
+				value = parseFloat(value);
+
+				if ( value >= 0 ) {
+					return value + "px";
+				}
+
+			} else {
+				return value;
+			}
+		}
+	};
+});
+
+if ( !jQuery.support.opacity ) {
+	jQuery.cssHooks.opacity = {
+		get: function( elem, computed ) {
+			// IE uses filters for opacity
+			return ropacity.test((computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "") ?
+				(parseFloat(RegExp.$1) / 100) + "" :
+				computed ? "1" : "";
+		},
+
+		set: function( elem, value ) {
+			var style = elem.style;
+
+			// IE has trouble with opacity if it does not have layout
+			// Force it by setting the zoom level
+			style.zoom = 1;
+
+			// Set the alpha filter to set the opacity
+			var opacity = jQuery.isNaN(value) ?
+				"" :
+				"alpha(opacity=" + value * 100 + ")",
+				filter = style.filter || "";
+
+			style.filter = ralpha.test(filter) ?
+				filter.replace(ralpha, opacity) :
+				style.filter + ' ' + opacity;
+		}
+	};
+}
+
+if ( document.defaultView && document.defaultView.getComputedStyle ) {
+	getComputedStyle = function( elem, newName, name ) {
+		var ret, defaultView, computedStyle;
+
+		name = name.replace( rupper, "-$1" ).toLowerCase();
+
+		if ( !(defaultView = elem.ownerDocument.defaultView) ) {
+			return undefined;
+		}
+
+		if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
+			ret = computedStyle.getPropertyValue( name );
+			if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+				ret = jQuery.style( elem, name );
+			}
+		}
+
+		return ret;
+	};
+}
+
+if ( document.documentElement.currentStyle ) {
+	currentStyle = function( elem, name ) {
+		var left, 
+			ret = elem.currentStyle && elem.currentStyle[ name ],
+			rsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ],
+			style = elem.style;
+
+		// From the awesome hack by Dean Edwards
+		// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+		// If we're not dealing with a regular pixel number
+		// but a number that has a weird ending, we need to convert it to pixels
+		if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
+			// Remember the original values
+			left = style.left;
+
+			// Put in the new values to get a computed value out
+			if ( rsLeft ) {
+				elem.runtimeStyle.left = elem.currentStyle.left;
+			}
+			style.left = name === "fontSize" ? "1em" : (ret || 0);
+			ret = style.pixelLeft + "px";
+
+			// Revert the changed values
+			style.left = left;
+			if ( rsLeft ) {
+				elem.runtimeStyle.left = rsLeft;
+			}
+		}
+
+		return ret === "" ? "auto" : ret;
+	};
+}
+
+curCSS = getComputedStyle || currentStyle;
+
+function getWH( elem, name, extra ) {
+	var which = name === "width" ? cssWidth : cssHeight,
+		val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
+
+	if ( extra === "border" ) {
+		return val;
+	}
+
+	jQuery.each( which, function() {
+		if ( !extra ) {
+			val -= parseFloat(jQuery.css( elem, "padding" + this )) || 0;
+		}
+
+		if ( extra === "margin" ) {
+			val += parseFloat(jQuery.css( elem, "margin" + this )) || 0;
+
+		} else {
+			val -= parseFloat(jQuery.css( elem, "border" + this + "Width" )) || 0;
+		}
+	});
+
+	return val;
+}
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.hidden = function( elem ) {
+		var width = elem.offsetWidth,
+			height = elem.offsetHeight;
+
+		return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
+	};
+
+	jQuery.expr.filters.visible = function( elem ) {
+		return !jQuery.expr.filters.hidden( elem );
+	};
+}
+
+
+
+
+var r20 = /%20/g,
+	rbracket = /\[\]$/,
+	rCRLF = /\r?\n/g,
+	rhash = /#.*$/,
+	rheaders = /^(.*?):\s*(.*?)\r?$/mg, // IE leaves an \r character at EOL
+	rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+	rnoContent = /^(?:GET|HEAD)$/,
+	rprotocol = /^\/\//,
+	rquery = /\?/,
+	rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+	rselectTextarea = /^(?:select|textarea)/i,
+	rspacesAjax = /\s+/,
+	rts = /([?&])_=[^&]*/,
+	rurl = /^(\w+:)\/\/([^\/?#:]+)(?::(\d+))?/,
+
+	// Keep a copy of the old load method
+	_load = jQuery.fn.load,
+
+	/* Prefilters
+	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+	 * 2) These are called:
+	 *    - BEFORE asking for a transport
+	 *    - AFTER param serialization (s.data is a string if s.processData is true)
+	 * 3) key is the dataType
+	 * 4) the catchall symbol "*" can be used
+	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+	 */
+	prefilters = {},
+
+	/* Transports bindings
+	 * 1) key is the dataType
+	 * 2) the catchall symbol "*" can be used
+	 * 3) selection will start with transport dataType and THEN go to "*" if needed
+	 */
+	transports = {};
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+	// dataTypeExpression is optional and defaults to "*"
+	return function( dataTypeExpression, func ) {
+
+		if ( typeof dataTypeExpression !== "string" ) {
+			func = dataTypeExpression;
+			dataTypeExpression = "*";
+		}
+
+		if ( jQuery.isFunction( func ) ) {
+			var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
+				i = 0,
+				length = dataTypes.length,
+				dataType,
+				list,
+				placeBefore;
+
+			// For each dataType in the dataTypeExpression
+			for(; i < length; i++ ) {
+				dataType = dataTypes[ i ];
+				// We control if we're asked to add before
+				// any existing element
+				placeBefore = /^\+/.test( dataType );
+				if ( placeBefore ) {
+					dataType = dataType.substr( 1 ) || "*";
+				}
+				list = structure[ dataType ] = structure[ dataType ] || [];
+				// then we add to the structure accordingly
+				list[ placeBefore ? "unshift" : "push" ]( func );
+			}
+		}
+	};
+}
+
+//Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jXHR,
+		dataType /* internal */, inspected /* internal */ ) {
+
+	dataType = dataType || options.dataTypes[ 0 ];
+	inspected = inspected || {};
+
+	inspected[ dataType ] = true;
+
+	var list = structure[ dataType ],
+		i = 0,
+		length = list ? list.length : 0,
+		executeOnly = ( structure === prefilters ),
+		selection;
+
+	for(; i < length && ( executeOnly || !selection ); i++ ) {
+		selection = list[ i ]( options, originalOptions, jXHR );
+		// If we got redirected to another dataType
+		// we try there if not done already
+		if ( typeof selection === "string" ) {
+			if ( inspected[ selection ] ) {
+				selection = undefined;
+			} else {
+				options.dataTypes.unshift( selection );
+				selection = inspectPrefiltersOrTransports(
+						structure, options, originalOptions, jXHR, selection, inspected );
+			}
+		}
+	}
+	// If we're only executing or nothing was selected
+	// we try the catchall dataType if not done already
+	if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
+		selection = inspectPrefiltersOrTransports(
+				structure, options, originalOptions, jXHR, "*", inspected );
+	}
+	// unnecessary when only executing (prefilters)
+	// but it'll be ignored by the caller in that case
+	return selection;
+}
+
+jQuery.fn.extend({
+	load: function( url, params, callback ) {
+		if ( typeof url !== "string" && _load ) {
+			return _load.apply( this, arguments );
+
+		// Don't do a request if no elements are being requested
+		} else if ( !this.length ) {
+			return this;
+		}
+
+		var off = url.indexOf( " " );
+		if ( off >= 0 ) {
+			var selector = url.slice( off, url.length );
+			url = url.slice( 0, off );
+		}
+
+		// Default to a GET request
+		var type = "GET";
+
+		// If the second parameter was provided
+		if ( params ) {
+			// If it's a function
+			if ( jQuery.isFunction( params ) ) {
+				// We assume that it's the callback
+				callback = params;
+				params = null;
+
+			// Otherwise, build a param string
+			} else if ( typeof params === "object" ) {
+				params = jQuery.param( params, jQuery.ajaxSettings.traditional );
+				type = "POST";
+			}
+		}
+
+		var self = this;
+
+		// Request the remote document
+		jQuery.ajax({
+			url: url,
+			type: type,
+			dataType: "html",
+			data: params,
+			// Complete callback (responseText is used internally)
+			complete: function( jXHR, status, responseText ) {
+				// Store the response as specified by the jXHR object
+				responseText = jXHR.responseText;
+				// If successful, inject the HTML into all the matched elements
+				if ( jXHR.isResolved() ) {
+					// #4825: Get the actual response in case
+					// a dataFilter is present in ajaxSettings
+					jXHR.done(function( r ) {
+						responseText = r;
+					});
+					// See if a selector was specified
+					self.html( selector ?
+						// Create a dummy div to hold the results
+						jQuery("<div>")
+							// inject the contents of the document in, removing the scripts
+							// to avoid any 'Permission Denied' errors in IE
+							.append(responseText.replace(rscript, ""))
+
+							// Locate the specified elements
+							.find(selector) :
+
+						// If not, just inject the full result
+						responseText );
+				}
+
+				if ( callback ) {
+					self.each( callback, [ responseText, status, jXHR ] );
+				}
+			}
+		});
+
+		return this;
+	},
+
+	serialize: function() {
+		return jQuery.param( this.serializeArray() );
+	},
+
+	serializeArray: function() {
+		return this.map(function(){
+			return this.elements ? jQuery.makeArray( this.elements ) : this;
+		})
+		.filter(function(){
+			return this.name && !this.disabled &&
+				( this.checked || rselectTextarea.test( this.nodeName ) ||
+					rinput.test( this.type ) );
+		})
+		.map(function( i, elem ){
+			var val = jQuery( this ).val();
+
+			return val == null ?
+				null :
+				jQuery.isArray( val ) ?
+					jQuery.map( val, function( val, i ){
+						return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+					}) :
+					{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+		}).get();
+	}
+});
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
+	jQuery.fn[ o ] = function( f ){
+		return this.bind( o, f );
+	};
+} );
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+	jQuery[ method ] = function( url, data, callback, type ) {
+		// shift arguments if data argument was omitted
+		if ( jQuery.isFunction( data ) ) {
+			type = type || callback;
+			callback = data;
+			data = null;
+		}
+
+		return jQuery.ajax({
+			type: method,
+			url: url,
+			data: data,
+			success: callback,
+			dataType: type
+		});
+	};
+} );
+
+jQuery.extend({
+
+	getScript: function( url, callback ) {
+		return jQuery.get( url, null, callback, "script" );
+	},
+
+	getJSON: function( url, data, callback ) {
+		return jQuery.get( url, data, callback, "json" );
+	},
+
+	ajaxSetup: function( settings ) {
+		jQuery.extend( true, jQuery.ajaxSettings, settings );
+		if ( settings.context ) {
+			jQuery.ajaxSettings.context = settings.context;
+		}
+	},
+
+	ajaxSettings: {
+		url: location.href,
+		global: true,
+		type: "GET",
+		contentType: "application/x-www-form-urlencoded",
+		processData: true,
+		async: true,
+		/*
+		timeout: 0,
+		data: null,
+		dataType: null,
+		username: null,
+		password: null,
+		cache: null,
+		traditional: false,
+		headers: {},
+		crossDomain: null,
+		*/
+
+		accepts: {
+			xml: "application/xml, text/xml",
+			html: "text/html",
+			text: "text/plain",
+			json: "application/json, text/javascript",
+			"*": "*/*"
+		},
+
+		contents: {
+			xml: /xml/,
+			html: /html/,
+			json: /json/
+		},
+
+		responseFields: {
+			xml: "responseXML",
+			text: "responseText"
+		},
+
+		// List of data converters
+		// 1) key format is "source_type destination_type" (a single space in-between)
+		// 2) the catchall symbol "*" can be used for source_type
+		converters: {
+
+			// Convert anything to text
+			"* text": window.String,
+
+			// Text to html (true = no transformation)
+			"text html": true,
+
+			// Evaluate text as a json expression
+			"text json": jQuery.parseJSON,
+
+			// Parse text as xml
+			"text xml": jQuery.parseXML
+		}
+	},
+
+	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+	ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+	// Main method
+	ajax: function( url, options ) {
+
+		// If options is not an object,
+		// we simulate pre-1.5 signature
+		if ( typeof options !== "object" ) {
+			options = url;
+			url = undefined;
+		}
+
+		// Force options to be an object
+		options = options || {};
+
+		var // Create the final options object
+			s = jQuery.extend( true, {}, jQuery.ajaxSettings, options ),
+			// Callbacks contexts
+			// We force the original context if it exists
+			// or take it from jQuery.ajaxSettings otherwise
+			// (plain objects used as context get extended)
+			callbackContext =
+				( s.context = ( "context" in options ? options : jQuery.ajaxSettings ).context ) || s,
+			globalEventContext = callbackContext === s ? jQuery.event : jQuery( callbackContext ),
+			// Deferreds
+			deferred = jQuery.Deferred(),
+			completeDeferred = jQuery._Deferred(),
+			// Status-dependent callbacks
+			statusCode = s.statusCode || {},
+			// Headers (they are sent all at once)
+			requestHeaders = {},
+			// Response headers
+			responseHeadersString,
+			responseHeaders,
+			// transport
+			transport,
+			// timeout handle
+			timeoutTimer,
+			// Cross-domain detection vars
+			loc = document.location,
+			protocol = loc.protocol || "http:",
+			parts,
+			// The jXHR state
+			state = 0,
+			// Loop variable
+			i,
+			// Fake xhr
+			jXHR = {
+
+				readyState: 0,
+
+				// Caches the header
+				setRequestHeader: function( name, value ) {
+					if ( state === 0 ) {
+						requestHeaders[ name.toLowerCase() ] = value;
+					}
+					return this;
+				},
+
+				// Raw string
+				getAllResponseHeaders: function() {
+					return state === 2 ? responseHeadersString : null;
+				},
+
+				// Builds headers hashtable if needed
+				getResponseHeader: function( key ) {
+					var match;
+					if ( state === 2 ) {
+						if ( !responseHeaders ) {
+							responseHeaders = {};
+							while( ( match = rheaders.exec( responseHeadersString ) ) ) {
+								responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+							}
+						}
+						match = responseHeaders[ key.toLowerCase() ];
+					}
+					return match || null;
+				},
+
+				// Cancel the request
+				abort: function( statusText ) {
+					statusText = statusText || "abort";
+					if ( transport ) {
+						transport.abort( statusText );
+					}
+					done( 0, statusText );
+					return this;
+				}
+			};
+
+		// Callback for when everything is done
+		// It is defined here because jslint complains if it is declared
+		// at the end of the function (which would be more logical and readable)
+		function done( status, statusText, responses, headers) {
+
+			// Called once
+			if ( state === 2 ) {
+				return;
+			}
+
+			// State is "done" now
+			state = 2;
+
+			// Clear timeout if it exists
+			if ( timeoutTimer ) {
+				clearTimeout( timeoutTimer );
+			}
+
+			// Dereference transport for early garbage collection
+			// (no matter how long the jXHR object will be used)
+			transport = undefined;
+
+			// Cache response headers
+			responseHeadersString = headers || "";
+
+			// Set readyState
+			jXHR.readyState = status ? 4 : 0;
+
+			var isSuccess,
+				success,
+				error,
+				response = responses ? ajaxHandleResponses( s, jXHR, responses ) : undefined,
+				lastModified,
+				etag;
+
+			// If successful, handle type chaining
+			if ( status >= 200 && status < 300 || status === 304 ) {
+
+				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+				if ( s.ifModified ) {
+
+					if ( ( lastModified = jXHR.getResponseHeader( "Last-Modified" ) ) ) {
+						jQuery.lastModified[ s.url ] = lastModified;
+					}
+					if ( ( etag = jXHR.getResponseHeader( "Etag" ) ) ) {
+						jQuery.etag[ s.url ] = etag;
+					}
+				}
+
+				// If not modified
+				if ( status === 304 ) {
+
+					statusText = "notmodified";
+					isSuccess = true;
+
+				// If we have data
+				} else {
+
+					try {
+						success = ajaxConvert( s, response );
+						statusText = "success";
+						isSuccess = true;
+					} catch(e) {
+						// We have a parsererror
+						statusText = "parsererror";
+						error = e;
+					}
+				}
+			} else {
+				// We extract error from statusText
+				// then normalize statusText and status for non-aborts
+				error = statusText;
+				if( status ) {
+					statusText = "error";
+					if ( status < 0 ) {
+						status = 0;
+					}
+				}
+			}
+
+			// Set data for the fake xhr object
+			jXHR.status = status;
+			jXHR.statusText = statusText;
+
+			// Success/Error
+			if ( isSuccess ) {
+				deferred.resolveWith( callbackContext, [ success, statusText, jXHR ] );
+			} else {
+				deferred.rejectWith( callbackContext, [ jXHR, statusText, error ] );
+			}
+
+			// Status-dependent callbacks
+			jXHR.statusCode( statusCode );
+			statusCode = undefined;
+
+			if ( s.global ) {
+				globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
+						[ jXHR, s, isSuccess ? success : error ] );
+			}
+
+			// Complete
+			completeDeferred.resolveWith( callbackContext, [ jXHR, statusText ] );
+
+			if ( s.global ) {
+				globalEventContext.trigger( "ajaxComplete", [ jXHR, s] );
+				// Handle the global AJAX counter
+				if ( !( --jQuery.active ) ) {
+					jQuery.event.trigger( "ajaxStop" );
+				}
+			}
+		}
+
+		// Attach deferreds
+		deferred.promise( jXHR );
+		jXHR.success = jXHR.done;
+		jXHR.error = jXHR.fail;
+		jXHR.complete = completeDeferred.done;
+
+		// Status-dependent callbacks
+		jXHR.statusCode = function( map ) {
+			if ( map ) {
+				var tmp;
+				if ( state < 2 ) {
+					for( tmp in map ) {
+						statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
+					}
+				} else {
+					tmp = map[ jXHR.status ];
+					jXHR.then( tmp, tmp );
+				}
+			}
+			return this;
+		};
+
+		// Remove hash character (#7531: and string promotion)
+		// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+		// We also use the url parameter if available
+		s.url = ( "" + ( url || s.url ) ).replace( rhash, "" ).replace( rprotocol, protocol + "//" );
+
+		// Extract dataTypes list
+		s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
+
+		// Determine if a cross-domain request is in order
+		if ( !s.crossDomain ) {
+			parts = rurl.exec( s.url.toLowerCase() );
+			s.crossDomain = !!( parts &&
+				( parts[ 1 ] != protocol || parts[ 2 ] != loc.hostname ||
+					( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
+						( loc.port || ( protocol === "http:" ? 80 : 443 ) ) )
+			);
+		}
+
+		// Convert data if not already a string
+		if ( s.data && s.processData && typeof s.data !== "string" ) {
+			s.data = jQuery.param( s.data, s.traditional );
+		}
+
+		// Apply prefilters
+		inspectPrefiltersOrTransports( prefilters, s, options, jXHR );
+
+		// Uppercase the type
+		s.type = s.type.toUpperCase();
+
+		// Determine if request has content
+		s.hasContent = !rnoContent.test( s.type );
+
+		// Watch for a new set of requests
+		if ( s.global && jQuery.active++ === 0 ) {
+			jQuery.event.trigger( "ajaxStart" );
+		}
+
+		// More options handling for requests with no content
+		if ( !s.hasContent ) {
+
+			// If data is available, append data to url
+			if ( s.data ) {
+				s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
+			}
+
+			// Add anti-cache in url if needed
+			if ( s.cache === false ) {
+
+				var ts = jQuery.now(),
+					// try replacing _= if it is there
+					ret = s.url.replace( rts, "$1_=" + ts );
+
+				// if nothing was replaced, add timestamp to the end
+				s.url = ret + ( (ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
+			}
+		}
+
+		// Set the correct header, if data is being sent
+		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+			requestHeaders[ "content-type" ] = s.contentType;
+		}
+
+		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+		if ( s.ifModified ) {
+			if ( jQuery.lastModified[ s.url ] ) {
+				requestHeaders[ "if-modified-since" ] = jQuery.lastModified[ s.url ];
+			}
+			if ( jQuery.etag[ s.url ] ) {
+				requestHeaders[ "if-none-match" ] = jQuery.etag[ s.url ];
+			}
+		}
+
+		// Set the Accepts header for the server, depending on the dataType
+		requestHeaders.accept = s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+			s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", */*; q=0.01" : "" ) :
+			s.accepts[ "*" ];
+
+		// Check for headers option
+		for ( i in s.headers ) {
+			requestHeaders[ i.toLowerCase() ] = s.headers[ i ];
+		}
+
+		// Allow custom headers/mimetypes and early abort
+		if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jXHR, s ) === false || state === 2 ) ) {
+				// Abort if not done already
+				done( 0, "abort" );
+				// Return false
+				jXHR = false;
+
+		} else {
+
+			// Install callbacks on deferreds
+			for ( i in { success: 1, error: 1, complete: 1 } ) {
+				jXHR[ i ]( s[ i ] );
+			}
+
+			// Get transport
+			transport = inspectPrefiltersOrTransports( transports, s, options, jXHR );
+
+			// If no transport, we auto-abort
+			if ( !transport ) {
+				done( -1, "No Transport" );
+			} else {
+				// Set state as sending
+				state = jXHR.readyState = 1;
+				// Send global event
+				if ( s.global ) {
+					globalEventContext.trigger( "ajaxSend", [ jXHR, s ] );
+				}
+				// Timeout
+				if ( s.async && s.timeout > 0 ) {
+					timeoutTimer = setTimeout( function(){
+						jXHR.abort( "timeout" );
+					}, s.timeout );
+				}
+
+				try {
+					transport.send( requestHeaders, done );
+				} catch (e) {
+					// Propagate exception as error if not done
+					if ( status < 2 ) {
+						done( -1, e );
+					// Simply rethrow otherwise
+					} else {
+						jQuery.error( e );
+					}
+				}
+			}
+		}
+		return jXHR;
+	},
+
+	// Serialize an array of form elements or a set of
+	// key/values into a query string
+	param: function( a, traditional ) {
+		var s = [],
+			add = function( key, value ) {
+				// If value is a function, invoke it and return its value
+				value = jQuery.isFunction( value ) ? value() : value;
+				s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+			};
+
+		// Set traditional to true for jQuery <= 1.3.2 behavior.
+		if ( traditional === undefined ) {
+			traditional = jQuery.ajaxSettings.traditional;
+		}
+
+		// If an array was passed in, assume that it is an array of form elements.
+		if ( jQuery.isArray( a ) || a.jquery ) {
+			// Serialize the form elements
+			jQuery.each( a, function() {
+				add( this.name, this.value );
+			} );
+
+		} else {
+			// If traditional, encode the "old" way (the way 1.3.2 or older
+			// did it), otherwise encode params recursively.
+			for ( var prefix in a ) {
+				buildParams( prefix, a[ prefix ], traditional, add );
+			}
+		}
+
+		// Return the resulting serialization
+		return s.join( "&" ).replace( r20, "+" );
+	}
+});
+
+function buildParams( prefix, obj, traditional, add ) {
+	if ( jQuery.isArray( obj ) && obj.length ) {
+		// Serialize array item.
+		jQuery.each( obj, function( i, v ) {
+			if ( traditional || rbracket.test( prefix ) ) {
+				// Treat each array item as a scalar.
+				add( prefix, v );
+
+			} else {
+				// If array item is non-scalar (array or object), encode its
+				// numeric index to resolve deserialization ambiguity issues.
+				// Note that rack (as of 1.0.0) can't currently deserialize
+				// nested arrays properly, and attempting to do so may cause
+				// a server error. Possible fixes are to modify rack's
+				// deserialization algorithm or to provide an option or flag
+				// to force array serialization to be shallow.
+				buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
+			}
+		});
+
+	} else if ( !traditional && obj != null && typeof obj === "object" ) {
+		// If we see an array here, it is empty and should be treated as an empty
+		// object
+		if ( jQuery.isArray( obj ) || jQuery.isEmptyObject( obj ) ) {
+			add( prefix, "" );
+
+		// Serialize object item.
+		} else {
+			jQuery.each( obj, function( k, v ) {
+				buildParams( prefix + "[" + k + "]", v, traditional, add );
+			});
+		}
+
+	} else {
+		// Serialize scalar item.
+		add( prefix, obj );
+	}
+}
+
+// This is still on the jQuery object... for now
+// Want to move this to jQuery.ajax some day
+jQuery.extend({
+
+	// Counter for holding the number of active queries
+	active: 0,
+
+	// Last-Modified header cache for next request
+	lastModified: {},
+	etag: {}
+
+});
+
+/* Handles responses to an ajax request:
+ * - sets all responseXXX fields accordingly
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jXHR, responses ) {
+
+	var contents = s.contents,
+		dataTypes = s.dataTypes,
+		responseFields = s.responseFields,
+		ct,
+		type,
+		finalDataType,
+		firstDataType;
+
+	// Fill responseXXX fields
+	for( type in responseFields ) {
+		if ( type in responses ) {
+			jXHR[ responseFields[type] ] = responses[ type ];
+		}
+	}
+
+	// Remove auto dataType and get content-type in the process
+	while( dataTypes[ 0 ] === "*" ) {
+		dataTypes.shift();
+		if ( ct === undefined ) {
+			ct = jXHR.getResponseHeader( "content-type" );
+		}
+	}
+
+	// Check if we're dealing with a known content-type
+	if ( ct ) {
+		for ( type in contents ) {
+			if ( contents[ type ] && contents[ type ].test( ct ) ) {
+				dataTypes.unshift( type );
+				break;
+			}
+		}
+	}
+
+	// Check to see if we have a response for the expected dataType
+	if ( dataTypes[ 0 ] in responses ) {
+		finalDataType = dataTypes[ 0 ];
+	} else {
+		// Try convertible dataTypes
+		for ( type in responses ) {
+			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+				finalDataType = type;
+				break;
+			}
+			if ( !firstDataType ) {
+				firstDataType = type;
+			}
+		}
+		// Or just use first one
+		finalDataType = finalDataType || firstDataType;
+	}
+
+	// If we found a dataType
+	// We add the dataType to the list if needed
+	// and return the corresponding response
+	if ( finalDataType ) {
+		if ( finalDataType !== dataTypes[ 0 ] ) {
+			dataTypes.unshift( finalDataType );
+		}
+		return responses[ finalDataType ];
+	}
+}
+
+// Chain conversions given the request and the original response
+function ajaxConvert( s, response ) {
+
+	// Apply the dataFilter if provided
+	if ( s.dataFilter ) {
+		response = s.dataFilter( response, s.dataType );
+	}
+
+	var dataTypes = s.dataTypes,
+		converters = s.converters,
+		i,
+		length = dataTypes.length,
+		tmp,
+		// Current and previous dataTypes
+		current = dataTypes[ 0 ],
+		prev,
+		// Conversion expression
+		conversion,
+		// Conversion function
+		conv,
+		// Conversion functions (transitive conversion)
+		conv1,
+		conv2;
+
+	// For each dataType in the chain
+	for( i = 1; i < length; i++ ) {
+
+		// Get the dataTypes
+		prev = current;
+		current = dataTypes[ i ];
+
+		// If current is auto dataType, update it to prev
+		if( current === "*" ) {
+			current = prev;
+		// If no auto and dataTypes are actually different
+		} else if ( prev !== "*" && prev !== current ) {
+
+			// Get the converter
+			conversion = prev + " " + current;
+			conv = converters[ conversion ] || converters[ "* " + current ];
+
+			// If there is no direct converter, search transitively
+			if ( !conv ) {
+				conv2 = undefined;
+				for( conv1 in converters ) {
+					tmp = conv1.split( " " );
+					if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
+						conv2 = converters[ tmp[1] + " " + current ];
+						if ( conv2 ) {
+							conv1 = converters[ conv1 ];
+							if ( conv1 === true ) {
+								conv = conv2;
+							} else if ( conv2 === true ) {
+								conv = conv1;
+							}
+							break;
+						}
+					}
+				}
+			}
+			// If we found no converter, dispatch an error
+			if ( !( conv || conv2 ) ) {
+				jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
+			}
+			// If found converter is not an equivalence
+			if ( conv !== true ) {
+				// Convert with 1 or 2 converters accordingly
+				response = conv ? conv( response ) : conv2( conv1(response) );
+			}
+		}
+	}
+	return response;
+}
+
+
+
+
+var jsc = jQuery.now(),
+	jsre = /(\=)\?(&|$)|()\?\?()/i;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+	jsonp: "callback",
+	jsonpCallback: function() {
+		return jQuery.expando + "_" + ( jsc++ );
+	}
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, dataIsString /* internal */ ) {
+
+	dataIsString = ( typeof s.data === "string" );
+
+	if ( s.dataTypes[ 0 ] === "jsonp" ||
+		originalSettings.jsonpCallback ||
+		originalSettings.jsonp != null ||
+		s.jsonp !== false && ( jsre.test( s.url ) ||
+				dataIsString && jsre.test( s.data ) ) ) {
+
+		var responseContainer,
+			jsonpCallback = s.jsonpCallback =
+				jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
+			previous = window[ jsonpCallback ],
+			url = s.url,
+			data = s.data,
+			replace = "$1" + jsonpCallback + "$2";
+
+		if ( s.jsonp !== false ) {
+			url = url.replace( jsre, replace );
+			if ( s.url === url ) {
+				if ( dataIsString ) {
+					data = data.replace( jsre, replace );
+				}
+				if ( s.data === data ) {
+					// Add callback manually
+					url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
+				}
+			}
+		}
+
+		s.url = url;
+		s.data = data;
+
+		window[ jsonpCallback ] = function( response ) {
+			responseContainer = [ response ];
+		};
+
+		s.complete = [ function() {
+
+			// Set callback back to previous value
+			window[ jsonpCallback ] = previous;
+
+			// Call if it was a function and we have a response
+			if ( previous) {
+				if ( responseContainer && jQuery.isFunction( previous ) ) {
+					window[ jsonpCallback ] ( responseContainer[ 0 ] );
+				}
+			} else {
+				// else, more memory leak avoidance
+				try{
+					delete window[ jsonpCallback ];
+				} catch( e ) {}
+			}
+
+		}, s.complete ];
+
+		// Use data converter to retrieve json after script execution
+		s.converters["script json"] = function() {
+			if ( ! responseContainer ) {
+				jQuery.error( jsonpCallback + " was not called" );
+			}
+			return responseContainer[ 0 ];
+		};
+
+		// force json dataType
+		s.dataTypes[ 0 ] = "json";
+
+		// Delegate to script
+		return "script";
+	}
+} );
+
+
+
+
+// Install script dataType
+jQuery.ajaxSetup({
+	accepts: {
+		script: "text/javascript, application/javascript"
+	},
+	contents: {
+		script: /javascript/
+	},
+	converters: {
+		"text script": function( text ) {
+			jQuery.globalEval( text );
+			return text;
+		}
+	}
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+	if ( s.cache === undefined ) {
+		s.cache = false;
+	}
+	if ( s.crossDomain ) {
+		s.type = "GET";
+		s.global = false;
+	}
+} );
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+	// This transport only deals with cross domain requests
+	if ( s.crossDomain ) {
+
+		var script,
+			head = document.getElementsByTagName( "head" )[ 0 ] || document.documentElement;
+
+		return {
+
+			send: function( _, callback ) {
+
+				script = document.createElement( "script" );
+
+				script.async = "async";
+
+				if ( s.scriptCharset ) {
+					script.charset = s.scriptCharset;
+				}
+
+				script.src = s.url;
+
+				// Attach handlers for all browsers
+				script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+					if ( !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+						// Handle memory leak in IE
+						script.onload = script.onreadystatechange = null;
+
+						// Remove the script
+						if ( head && script.parentNode ) {
+							head.removeChild( script );
+						}
+
+						// Dereference the script
+						script = undefined;
+
+						// Callback if not abort
+						if ( !isAbort ) {
+							callback( 200, "success" );
+						}
+					}
+				};
+				// Use insertBefore instead of appendChild  to circumvent an IE6 bug.
+				// This arises when a base node is used (#2709 and #4378).
+				head.insertBefore( script, head.firstChild );
+			},
+
+			abort: function() {
+				if ( script ) {
+					script.onload( 0, 1 );
+				}
+			}
+		};
+	}
+} );
+
+
+
+
+var // Next active xhr id
+	xhrId = jQuery.now(),
+
+	// active xhrs
+	xhrs = {},
+
+	// #5280: see below
+	xhrUnloadAbortInstalled,
+
+	// XHR used to determine supports properties
+	testXHR;
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
+	/* Microsoft failed to properly
+	 * implement the XMLHttpRequest in IE7 (can't request local files),
+	 * so we use the ActiveXObject when it is available
+	 * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+	 * we need a fallback.
+	 */
+	function() {
+		if ( window.location.protocol !== "file:" ) {
+			try {
+				return new window.XMLHttpRequest();
+			} catch( xhrError ) {}
+		}
+
+		try {
+			return new window.ActiveXObject("Microsoft.XMLHTTP");
+		} catch( activeError ) {}
+	} :
+	// For all other browsers, use the standard XMLHttpRequest object
+	function() {
+		return new window.XMLHttpRequest();
+	};
+
+// Test if we can create an xhr object
+try {
+	testXHR = jQuery.ajaxSettings.xhr();
+} catch( xhrCreationException ) {}
+
+//Does this browser support XHR requests?
+jQuery.support.ajax = !!testXHR;
+
+// Does this browser support crossDomain XHR requests
+jQuery.support.cors = testXHR && ( "withCredentials" in testXHR );
+
+// No need for the temporary xhr anymore
+testXHR = undefined;
+
+// Create transport if the browser can provide an xhr
+if ( jQuery.support.ajax ) {
+
+	jQuery.ajaxTransport(function( s ) {
+		// Cross domain only allowed if supported through XMLHttpRequest
+		if ( !s.crossDomain || jQuery.support.cors ) {
+
+			var callback;
+
+			return {
+				send: function( headers, complete ) {
+
+					// #5280: we need to abort on unload or IE will keep connections alive
+					if ( !xhrUnloadAbortInstalled ) {
+
+						xhrUnloadAbortInstalled = 1;
+
+						jQuery(window).bind( "unload", function() {
+
+							// Abort all pending requests
+							jQuery.each( xhrs, function( _, xhr ) {
+								if ( xhr.onreadystatechange ) {
+									xhr.onreadystatechange( 1 );
+								}
+							} );
+
+						} );
+					}
+
+					// Get a new xhr
+					var xhr = s.xhr(),
+						handle;
+
+					// Open the socket
+					// Passing null username, generates a login popup on Opera (#2865)
+					if ( s.username ) {
+						xhr.open( s.type, s.url, s.async, s.username, s.password );
+					} else {
+						xhr.open( s.type, s.url, s.async );
+					}
+
+					// Requested-With header
+					// Not set for crossDomain requests with no content
+					// (see why at http://trac.dojotoolkit.org/ticket/9486)
+					// Won't change header if already provided
+					if ( !( s.crossDomain && !s.hasContent ) && !headers["x-requested-with"] ) {
+						headers[ "x-requested-with" ] = "XMLHttpRequest";
+					}
+
+					// Need an extra try/catch for cross domain requests in Firefox 3
+					try {
+						jQuery.each( headers, function( key, value ) {
+							xhr.setRequestHeader( key, value );
+						} );
+					} catch( _ ) {}
+
+					// Do send the request
+					// This may raise an exception which is actually
+					// handled in jQuery.ajax (so no try/catch here)
+					xhr.send( ( s.hasContent && s.data ) || null );
+
+					// Listener
+					callback = function( _, isAbort ) {
+
+						// Was never called and is aborted or complete
+						if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+
+							// Only called once
+							callback = 0;
+
+							// Do not keep as active anymore
+							if ( handle ) {
+								xhr.onreadystatechange = jQuery.noop;
+								delete xhrs[ handle ];
+							}
+
+							// If it's an abort
+							if ( isAbort ) {
+								// Abort it manually if needed
+								if ( xhr.readyState !== 4 ) {
+									xhr.abort();
+								}
+							} else {
+								// Get info
+								var status = xhr.status,
+									statusText,
+									responseHeaders = xhr.getAllResponseHeaders(),
+									responses = {},
+									xml = xhr.responseXML;
+
+								// Construct response list
+								if ( xml && xml.documentElement /* #4958 */ ) {
+									responses.xml = xml;
+								}
+								responses.text = xhr.responseText;
+
+								// Firefox throws an exception when accessing
+								// statusText for faulty cross-domain requests
+								try {
+									statusText = xhr.statusText;
+								} catch( e ) {
+									// We normalize with Webkit giving an empty statusText
+									statusText = "";
+								}
+
+								// Filter status for non standard behaviours
+								status =
+									// Opera returns 0 when it should be 304
+									// Webkit returns 0 for failing cross-domain no matter the real status
+									status === 0 ?
+										(
+											// Webkit, Firefox: filter out faulty cross-domain requests
+											!s.crossDomain || statusText ?
+											(
+												// Opera: filter out real aborts #6060
+												responseHeaders ?
+												304 :
+												0
+											) :
+											// We assume 302 but could be anything cross-domain related
+											302
+										) :
+										(
+											// IE sometimes returns 1223 when it should be 204 (see #1450)
+											status == 1223 ?
+												204 :
+												status
+										);
+
+								// Call complete
+								complete( status, statusText, responses, responseHeaders );
+							}
+						}
+					};
+
+					// if we're in sync mode or it's in cache
+					// and has been retrieved directly (IE6 & IE7)
+					// we need to manually fire the callback
+					if ( !s.async || xhr.readyState === 4 ) {
+						callback();
+					} else {
+						// Add to list of active xhrs
+						handle = xhrId++;
+						xhrs[ handle ] = xhr;
+						xhr.onreadystatechange = callback;
+					}
+				},
+
+				abort: function() {
+					if ( callback ) {
+						callback(0,1);
+					}
+				}
+			};
+		}
+	});
+}
+
+
+
+
+var elemdisplay = {},
+	rfxtypes = /^(?:toggle|show|hide)$/,
+	rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
+	timerId,
+	fxAttrs = [
+		// height animations
+		[ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
+		// width animations
+		[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
+		// opacity animations
+		[ "opacity" ]
+	];
+
+jQuery.fn.extend({
+	show: function( speed, easing, callback ) {
+		var elem, display;
+
+		if ( speed || speed === 0 ) {
+			return this.animate( genFx("show", 3), speed, easing, callback);
+
+		} else {
+			for ( var i = 0, j = this.length; i < j; i++ ) {
+				elem = this[i];
+				display = elem.style.display;
+
+				// Reset the inline display of this element to learn if it is
+				// being hidden by cascaded rules or not
+				if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
+					display = elem.style.display = "";
+				}
+
+				// Set elements which have been overridden with display: none
+				// in a stylesheet to whatever the default browser style is
+				// for such an element
+				if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
+					jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName));
+				}
+			}
+
+			// Set the display of most of the elements in a second loop
+			// to avoid the constant reflow
+			for ( i = 0; i < j; i++ ) {
+				elem = this[i];
+				display = elem.style.display;
+
+				if ( display === "" || display === "none" ) {
+					elem.style.display = jQuery._data(elem, "olddisplay") || "";
+				}
+			}
+
+			return this;
+		}
+	},
+
+	hide: function( speed, easing, callback ) {
+		if ( speed || speed === 0 ) {
+			return this.animate( genFx("hide", 3), speed, easing, callback);
+
+		} else {
+			for ( var i = 0, j = this.length; i < j; i++ ) {
+				var display = jQuery.css( this[i], "display" );
+
+				if ( display !== "none" && !jQuery._data( this[i], "olddisplay" ) ) {
+					jQuery._data( this[i], "olddisplay", display );
+				}
+			}
+
+			// Set the display of the elements in a second loop
+			// to avoid the constant reflow
+			for ( i = 0; i < j; i++ ) {
+				this[i].style.display = "none";
+			}
+
+			return this;
+		}
+	},
+
+	// Save the old toggle function
+	_toggle: jQuery.fn.toggle,
+
+	toggle: function( fn, fn2, callback ) {
+		var bool = typeof fn === "boolean";
+
+		if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
+			this._toggle.apply( this, arguments );
+
+		} else if ( fn == null || bool ) {
+			this.each(function() {
+				var state = bool ? fn : jQuery(this).is(":hidden");
+				jQuery(this)[ state ? "show" : "hide" ]();
+			});
+
+		} else {
+			this.animate(genFx("toggle", 3), fn, fn2, callback);
+		}
+
+		return this;
+	},
+
+	fadeTo: function( speed, to, easing, callback ) {
+		return this.filter(":hidden").css("opacity", 0).show().end()
+					.animate({opacity: to}, speed, easing, callback);
+	},
+
+	animate: function( prop, speed, easing, callback ) {
+		var optall = jQuery.speed(speed, easing, callback);
+
+		if ( jQuery.isEmptyObject( prop ) ) {
+			return this.each( optall.complete );
+		}
+
+		return this[ optall.queue === false ? "each" : "queue" ](function() {
+			// XXX 'this' does not always have a nodeName when running the
+			// test suite
+
+			var opt = jQuery.extend({}, optall), p,
+				isElement = this.nodeType === 1,
+				hidden = isElement && jQuery(this).is(":hidden"),
+				self = this;
+
+			for ( p in prop ) {
+				var name = jQuery.camelCase( p );
+
+				if ( p !== name ) {
+					prop[ name ] = prop[ p ];
+					delete prop[ p ];
+					p = name;
+				}
+
+				if ( prop[p] === "hide" && hidden || prop[p] === "show" && !hidden ) {
+					return opt.complete.call(this);
+				}
+
+				if ( isElement && ( p === "height" || p === "width" ) ) {
+					// Make sure that nothing sneaks out
+					// Record all 3 overflow attributes because IE does not
+					// change the overflow attribute when overflowX and
+					// overflowY are set to the same value
+					opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
+
+					// Set display property to inline-block for height/width
+					// animations on inline elements that are having width/height
+					// animated
+					if ( jQuery.css( this, "display" ) === "inline" &&
+							jQuery.css( this, "float" ) === "none" ) {
+						if ( !jQuery.support.inlineBlockNeedsLayout ) {
+							this.style.display = "inline-block";
+
+						} else {
+							var display = defaultDisplay(this.nodeName);
+
+							// inline-level elements accept inline-block;
+							// block-level elements need to be inline with layout
+							if ( display === "inline" ) {
+								this.style.display = "inline-block";
+
+							} else {
+								this.style.display = "inline";
+								this.style.zoom = 1;
+							}
+						}
+					}
+				}
+
+				if ( jQuery.isArray( prop[p] ) ) {
+					// Create (if needed) and add to specialEasing
+					(opt.specialEasing = opt.specialEasing || {})[p] = prop[p][1];
+					prop[p] = prop[p][0];
+				}
+			}
+
+			if ( opt.overflow != null ) {
+				this.style.overflow = "hidden";
+			}
+
+			opt.curAnim = jQuery.extend({}, prop);
+
+			jQuery.each( prop, function( name, val ) {
+				var e = new jQuery.fx( self, opt, name );
+
+				if ( rfxtypes.test(val) ) {
+					e[ val === "toggle" ? hidden ? "show" : "hide" : val ]( prop );
+
+				} else {
+					var parts = rfxnum.exec(val),
+						start = e.cur() || 0;
+
+					if ( parts ) {
+						var end = parseFloat( parts[2] ),
+							unit = parts[3] || "px";
+
+						// We need to compute starting value
+						if ( unit !== "px" ) {
+							jQuery.style( self, name, (end || 1) + unit);
+							start = ((end || 1) / e.cur()) * start;
+							jQuery.style( self, name, start + unit);
+						}
+
+						// If a +=/-= token was provided, we're doing a relative animation
+						if ( parts[1] ) {
+							end = ((parts[1] === "-=" ? -1 : 1) * end) + start;
+						}
+
+						e.custom( start, end, unit );
+
+					} else {
+						e.custom( start, val, "" );
+					}
+				}
+			});
+
+			// For JS strict compliance
+			return true;
+		});
+	},
+
+	stop: function( clearQueue, gotoEnd ) {
+		var timers = jQuery.timers;
+
+		if ( clearQueue ) {
+			this.queue([]);
+		}
+
+		this.each(function() {
+			// go in reverse order so anything added to the queue during the loop is ignored
+			for ( var i = timers.length - 1; i >= 0; i-- ) {
+				if ( timers[i].elem === this ) {
+					if (gotoEnd) {
+						// force the next step to be the last
+						timers[i](true);
+					}
+
+					timers.splice(i, 1);
+				}
+			}
+		});
+
+		// start the next in the queue if the last step wasn't forced
+		if ( !gotoEnd ) {
+			this.dequeue();
+		}
+
+		return this;
+	}
+
+});
+
+function genFx( type, num ) {
+	var obj = {};
+
+	jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
+		obj[ this ] = type;
+	});
+
+	return obj;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+	slideDown: genFx("show", 1),
+	slideUp: genFx("hide", 1),
+	slideToggle: genFx("toggle", 1),
+	fadeIn: { opacity: "show" },
+	fadeOut: { opacity: "hide" },
+	fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+	jQuery.fn[ name ] = function( speed, easing, callback ) {
+		return this.animate( props, speed, easing, callback );
+	};
+});
+
+jQuery.extend({
+	speed: function( speed, easing, fn ) {
+		var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
+			complete: fn || !fn && easing ||
+				jQuery.isFunction( speed ) && speed,
+			duration: speed,
+			easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
+		};
+
+		opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+			opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
+
+		// Queueing
+		opt.old = opt.complete;
+		opt.complete = function() {
+			if ( opt.queue !== false ) {
+				jQuery(this).dequeue();
+			}
+			if ( jQuery.isFunction( opt.old ) ) {
+				opt.old.call( this );
+			}
+		};
+
+		return opt;
+	},
+
+	easing: {
+		linear: function( p, n, firstNum, diff ) {
+			return firstNum + diff * p;
+		},
+		swing: function( p, n, firstNum, diff ) {
+			return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
+		}
+	},
+
+	timers: [],
+
+	fx: function( elem, options, prop ) {
+		this.options = options;
+		this.elem = elem;
+		this.prop = prop;
+
+		if ( !options.orig ) {
+			options.orig = {};
+		}
+	}
+
+});
+
+jQuery.fx.prototype = {
+	// Simple function for setting a style value
+	update: function() {
+		if ( this.options.step ) {
+			this.options.step.call( this.elem, this.now, this );
+		}
+
+		(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
+	},
+
+	// Get the current size
+	cur: function() {
+		if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
+			return this.elem[ this.prop ];
+		}
+
+		var r = parseFloat( jQuery.css( this.elem, this.prop ) );
+		return r || 0;
+	},
+
+	// Start an animation from one number to another
+	custom: function( from, to, unit ) {
+		var self = this,
+			fx = jQuery.fx;
+
+		this.startTime = jQuery.now();
+		this.start = from;
+		this.end = to;
+		this.unit = unit || this.unit || "px";
+		this.now = this.start;
+		this.pos = this.state = 0;
+
+		function t( gotoEnd ) {
+			return self.step(gotoEnd);
+		}
+
+		t.elem = this.elem;
+
+		if ( t() && jQuery.timers.push(t) && !timerId ) {
+			timerId = setInterval(fx.tick, fx.interval);
+		}
+	},
+
+	// Simple 'show' function
+	show: function() {
+		// Remember where we started, so that we can go back to it later
+		this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
+		this.options.show = true;
+
+		// Begin the animation
+		// Make sure that we start at a small width/height to avoid any
+		// flash of content
+		this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur());
+
+		// Start by showing the element
+		jQuery( this.elem ).show();
+	},
+
+	// Simple 'hide' function
+	hide: function() {
+		// Remember where we started, so that we can go back to it later
+		this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
+		this.options.hide = true;
+
+		// Begin the animation
+		this.custom(this.cur(), 0);
+	},
+
+	// Each step of an animation
+	step: function( gotoEnd ) {
+		var t = jQuery.now(), done = true;
+
+		if ( gotoEnd || t >= this.options.duration + this.startTime ) {
+			this.now = this.end;
+			this.pos = this.state = 1;
+			this.update();
+
+			this.options.curAnim[ this.prop ] = true;
+
+			for ( var i in this.options.curAnim ) {
+				if ( this.options.curAnim[i] !== true ) {
+					done = false;
+				}
+			}
+
+			if ( done ) {
+				// Reset the overflow
+				if ( this.options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
+					var elem = this.elem,
+						options = this.options;
+
+					jQuery.each( [ "", "X", "Y" ], function (index, value) {
+						elem.style[ "overflow" + value ] = options.overflow[index];
+					} );
+				}
+
+				// Hide the element if the "hide" operation was done
+				if ( this.options.hide ) {
+					jQuery(this.elem).hide();
+				}
+
+				// Reset the properties, if the item has been hidden or shown
+				if ( this.options.hide || this.options.show ) {
+					for ( var p in this.options.curAnim ) {
+						jQuery.style( this.elem, p, this.options.orig[p] );
+					}
+				}
+
+				// Execute the complete function
+				this.options.complete.call( this.elem );
+			}
+
+			return false;
+
+		} else {
+			var n = t - this.startTime;
+			this.state = n / this.options.duration;
+
+			// Perform the easing function, defaults to swing
+			var specialEasing = this.options.specialEasing && this.options.specialEasing[this.prop];
+			var defaultEasing = this.options.easing || (jQuery.easing.swing ? "swing" : "linear");
+			this.pos = jQuery.easing[specialEasing || defaultEasing](this.state, n, 0, 1, this.options.duration);
+			this.now = this.start + ((this.end - this.start) * this.pos);
+
+			// Perform the next step of the animation
+			this.update();
+		}
+
+		return true;
+	}
+};
+
+jQuery.extend( jQuery.fx, {
+	tick: function() {
+		var timers = jQuery.timers;
+
+		for ( var i = 0; i < timers.length; i++ ) {
+			if ( !timers[i]() ) {
+				timers.splice(i--, 1);
+			}
+		}
+
+		if ( !timers.length ) {
+			jQuery.fx.stop();
+		}
+	},
+
+	interval: 13,
+
+	stop: function() {
+		clearInterval( timerId );
+		timerId = null;
+	},
+
+	speeds: {
+		slow: 600,
+		fast: 200,
+		// Default speed
+		_default: 400
+	},
+
+	step: {
+		opacity: function( fx ) {
+			jQuery.style( fx.elem, "opacity", fx.now );
+		},
+
+		_default: function( fx ) {
+			if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
+				fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
+			} else {
+				fx.elem[ fx.prop ] = fx.now;
+			}
+		}
+	}
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.animated = function( elem ) {
+		return jQuery.grep(jQuery.timers, function( fn ) {
+			return elem === fn.elem;
+		}).length;
+	};
+}
+
+function defaultDisplay( nodeName ) {
+	if ( !elemdisplay[ nodeName ] ) {
+		var elem = jQuery("<" + nodeName + ">").appendTo("body"),
+			display = elem.css("display");
+
+		elem.remove();
+
+		if ( display === "none" || display === "" ) {
+			display = "block";
+		}
+
+		elemdisplay[ nodeName ] = display;
+	}
+
+	return elemdisplay[ nodeName ];
+}
+
+
+
+
+var rtable = /^t(?:able|d|h)$/i,
+	rroot = /^(?:body|html)$/i;
+
+if ( "getBoundingClientRect" in document.documentElement ) {
+	jQuery.fn.offset = function( options ) {
+		var elem = this[0], box;
+
+		if ( options ) {
+			return this.each(function( i ) {
+				jQuery.offset.setOffset( this, options, i );
+			});
+		}
+
+		if ( !elem || !elem.ownerDocument ) {
+			return null;
+		}
+
+		if ( elem === elem.ownerDocument.body ) {
+			return jQuery.offset.bodyOffset( elem );
+		}
+
+		try {
+			box = elem.getBoundingClientRect();
+		} catch(e) {}
+
+		var doc = elem.ownerDocument,
+			docElem = doc.documentElement;
+
+		// Make sure we're not dealing with a disconnected DOM node
+		if ( !box || !jQuery.contains( docElem, elem ) ) {
+			return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
+		}
+
+		var body = doc.body,
+			win = getWindow(doc),
+			clientTop  = docElem.clientTop  || body.clientTop  || 0,
+			clientLeft = docElem.clientLeft || body.clientLeft || 0,
+			scrollTop  = (win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop ),
+			scrollLeft = (win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft),
+			top  = box.top  + scrollTop  - clientTop,
+			left = box.left + scrollLeft - clientLeft;
+
+		return { top: top, left: left };
+	};
+
+} else {
+	jQuery.fn.offset = function( options ) {
+		var elem = this[0];
+
+		if ( options ) {
+			return this.each(function( i ) {
+				jQuery.offset.setOffset( this, options, i );
+			});
+		}
+
+		if ( !elem || !elem.ownerDocument ) {
+			return null;
+		}
+
+		if ( elem === elem.ownerDocument.body ) {
+			return jQuery.offset.bodyOffset( elem );
+		}
+
+		jQuery.offset.initialize();
+
+		var computedStyle,
+			offsetParent = elem.offsetParent,
+			prevOffsetParent = elem,
+			doc = elem.ownerDocument,
+			docElem = doc.documentElement,
+			body = doc.body,
+			defaultView = doc.defaultView,
+			prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
+			top = elem.offsetTop,
+			left = elem.offsetLeft;
+
+		while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
+			if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
+				break;
+			}
+
+			computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
+			top  -= elem.scrollTop;
+			left -= elem.scrollLeft;
+
+			if ( elem === offsetParent ) {
+				top  += elem.offsetTop;
+				left += elem.offsetLeft;
+
+				if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
+					top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
+					left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+				}
+
+				prevOffsetParent = offsetParent;
+				offsetParent = elem.offsetParent;
+			}
+
+			if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
+				top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
+				left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+			}
+
+			prevComputedStyle = computedStyle;
+		}
+
+		if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
+			top  += body.offsetTop;
+			left += body.offsetLeft;
+		}
+
+		if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
+			top  += Math.max( docElem.scrollTop, body.scrollTop );
+			left += Math.max( docElem.scrollLeft, body.scrollLeft );
+		}
+
+		return { top: top, left: left };
+	};
+}
+
+jQuery.offset = {
+	initialize: function() {
+		var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.css(body, "marginTop") ) || 0,
+			html = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
+
+		jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } );
+
+		container.innerHTML = html;
+		body.insertBefore( container, body.firstChild );
+		innerDiv = container.firstChild;
+		checkDiv = innerDiv.firstChild;
+		td = innerDiv.nextSibling.firstChild.firstChild;
+
+		this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
+		this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
+
+		checkDiv.style.position = "fixed";
+		checkDiv.style.top = "20px";
+
+		// safari subtracts parent border width here which is 5px
+		this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
+		checkDiv.style.position = checkDiv.style.top = "";
+
+		innerDiv.style.overflow = "hidden";
+		innerDiv.style.position = "relative";
+
+		this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
+
+		this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
+
+		body.removeChild( container );
+		body = container = innerDiv = checkDiv = table = td = null;
+		jQuery.offset.initialize = jQuery.noop;
+	},
+
+	bodyOffset: function( body ) {
+		var top = body.offsetTop,
+			left = body.offsetLeft;
+
+		jQuery.offset.initialize();
+
+		if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
+			top  += parseFloat( jQuery.css(body, "marginTop") ) || 0;
+			left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
+		}
+
+		return { top: top, left: left };
+	},
+
+	setOffset: function( elem, options, i ) {
+		var position = jQuery.css( elem, "position" );
+
+		// set position first, in-case top/left are set even on static elem
+		if ( position === "static" ) {
+			elem.style.position = "relative";
+		}
+
+		var curElem = jQuery( elem ),
+			curOffset = curElem.offset(),
+			curCSSTop = jQuery.css( elem, "top" ),
+			curCSSLeft = jQuery.css( elem, "left" ),
+			calculatePosition = (position === "absolute" && jQuery.inArray('auto', [curCSSTop, curCSSLeft]) > -1),
+			props = {}, curPosition = {}, curTop, curLeft;
+
+		// need to be able to calculate position if either top or left is auto and position is absolute
+		if ( calculatePosition ) {
+			curPosition = curElem.position();
+		}
+
+		curTop  = calculatePosition ? curPosition.top  : parseInt( curCSSTop,  10 ) || 0;
+		curLeft = calculatePosition ? curPosition.left : parseInt( curCSSLeft, 10 ) || 0;
+
+		if ( jQuery.isFunction( options ) ) {
+			options = options.call( elem, i, curOffset );
+		}
+
+		if (options.top != null) {
+			props.top = (options.top - curOffset.top) + curTop;
+		}
+		if (options.left != null) {
+			props.left = (options.left - curOffset.left) + curLeft;
+		}
+
+		if ( "using" in options ) {
+			options.using.call( elem, props );
+		} else {
+			curElem.css( props );
+		}
+	}
+};
+
+
+jQuery.fn.extend({
+	position: function() {
+		if ( !this[0] ) {
+			return null;
+		}
+
+		var elem = this[0],
+
+		// Get *real* offsetParent
+		offsetParent = this.offsetParent(),
+
+		// Get correct offsets
+		offset       = this.offset(),
+		parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
+
+		// Subtract element margins
+		// note: when an element has margin: auto the offsetLeft and marginLeft
+		// are the same in Safari causing offset.left to incorrectly be 0
+		offset.top  -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
+		offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
+
+		// Add offsetParent borders
+		parentOffset.top  += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
+		parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
+
+		// Subtract the two offsets
+		return {
+			top:  offset.top  - parentOffset.top,
+			left: offset.left - parentOffset.left
+		};
+	},
+
+	offsetParent: function() {
+		return this.map(function() {
+			var offsetParent = this.offsetParent || document.body;
+			while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
+				offsetParent = offsetParent.offsetParent;
+			}
+			return offsetParent;
+		});
+	}
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( ["Left", "Top"], function( i, name ) {
+	var method = "scroll" + name;
+
+	jQuery.fn[ method ] = function(val) {
+		var elem = this[0], win;
+
+		if ( !elem ) {
+			return null;
+		}
+
+		if ( val !== undefined ) {
+			// Set the scroll offset
+			return this.each(function() {
+				win = getWindow( this );
+
+				if ( win ) {
+					win.scrollTo(
+						!i ? val : jQuery(win).scrollLeft(),
+						 i ? val : jQuery(win).scrollTop()
+					);
+
+				} else {
+					this[ method ] = val;
+				}
+			});
+		} else {
+			win = getWindow( elem );
+
+			// Return the scroll offset
+			return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
+				jQuery.support.boxModel && win.document.documentElement[ method ] ||
+					win.document.body[ method ] :
+				elem[ method ];
+		}
+	};
+});
+
+function getWindow( elem ) {
+	return jQuery.isWindow( elem ) ?
+		elem :
+		elem.nodeType === 9 ?
+			elem.defaultView || elem.parentWindow :
+			false;
+}
+
+
+
+
+// Create innerHeight, innerWidth, outerHeight and outerWidth methods
+jQuery.each([ "Height", "Width" ], function( i, name ) {
+
+	var type = name.toLowerCase();
+
+	// innerHeight and innerWidth
+	jQuery.fn["inner" + name] = function() {
+		return this[0] ?
+			parseFloat( jQuery.css( this[0], type, "padding" ) ) :
+			null;
+	};
+
+	// outerHeight and outerWidth
+	jQuery.fn["outer" + name] = function( margin ) {
+		return this[0] ?
+			parseFloat( jQuery.css( this[0], type, margin ? "margin" : "border" ) ) :
+			null;
+	};
+
+	jQuery.fn[ type ] = function( size ) {
+		// Get window width or height
+		var elem = this[0];
+		if ( !elem ) {
+			return size == null ? null : this;
+		}
+
+		if ( jQuery.isFunction( size ) ) {
+			return this.each(function( i ) {
+				var self = jQuery( this );
+				self[ type ]( size.call( this, i, self[ type ]() ) );
+			});
+		}
+
+		if ( jQuery.isWindow( elem ) ) {
+			// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
+			// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
+			var docElemProp = elem.document.documentElement[ "client" + name ];
+			return elem.document.compatMode === "CSS1Compat" && docElemProp ||
+				elem.document.body[ "client" + name ] || docElemProp;
+
+		// Get document width or height
+		} else if ( elem.nodeType === 9 ) {
+			// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+			return Math.max(
+				elem.documentElement["client" + name],
+				elem.body["scroll" + name], elem.documentElement["scroll" + name],
+				elem.body["offset" + name], elem.documentElement["offset" + name]
+			);
+
+		// Get or set width or height on the element
+		} else if ( size === undefined ) {
+			var orig = jQuery.css( elem, type ),
+				ret = parseFloat( orig );
+
+			return jQuery.isNaN( ret ) ? orig : ret;
+
+		// Set the width or height on the element (default to pixels if value is unitless)
+		} else {
+			return this.css( type, typeof size === "string" ? size : size + "px" );
+		}
+	};
+
+});
+
+
+})(window);
Index: extensions/iPiwigo/www/phonegap.js
===================================================================
--- extensions/iPiwigo/www/phonegap.js	(revision 9188)
+++ extensions/iPiwigo/www/phonegap.js	(revision 9188)
@@ -0,0 +1,1 @@
+var _anomFunkMap={};var _anomFunkMapNextId=0;function anomToNameFunk(fun){var funkId="f"+_anomFunkMapNextId++;var funk=function(){fun.apply(this,arguments);_anomFunkMap[funkId]=null;delete _anomFunkMap[funkId]};_anomFunkMap[funkId]=funk;return"_anomFunkMap."+funkId}function GetFunctionName(fn){if(fn){var m=fn.toString().match(/^\s*function\s+([^\s\(]+)/);return m?m[1]:anomToNameFunk(fn)}else{return null}}if(typeof(DeviceInfo)!="object"){DeviceInfo={}}PhoneGap={queue:{ready:true,commands:[],timer:null},_constructors:[]};PhoneGap.available=DeviceInfo.uuid!=undefined;PhoneGap.addConstructor=function(func){var state=document.readyState;if((state=="loaded"||state=="complete")&&DeviceInfo.uuid!=null){func()}else{PhoneGap._constructors.push(func)}};(function(){var timer=setInterval(function(){var state=document.readyState;if((state=="loaded"||state=="complete")&&DeviceInfo.uuid!=null){clearInterval(timer);while(PhoneGap._constructors.length>0){var constructor=PhoneGap._constructors.shift();try{constructor()}catch(e){if(typeof(debug.log)=="function"){debug.log("Failed to run constructor: "+debug.processMessage(e))}else{alert("Failed to run constructor: "+e.message)}}}var e=document.createEvent("Events");e.initEvent("deviceready");document.dispatchEvent(e)}},1)})();PhoneGap.exec=function(){PhoneGap.queue.commands.push(arguments);if(PhoneGap.queue.timer==null){PhoneGap.queue.timer=setInterval(PhoneGap.run_command,10)}};PhoneGap.run_command=function(){if(!PhoneGap.available||!PhoneGap.queue.ready){return}PhoneGap.queue.ready=false;var args=PhoneGap.queue.commands.shift();if(PhoneGap.queue.commands.length==0){clearInterval(PhoneGap.queue.timer);PhoneGap.queue.timer=null}var uri=[];var dict=null;for(var i=1;i<args.length;i++){var arg=args[i];if(arg==undefined||arg==null){arg=""}if(typeof(arg)=="object"){dict=arg}else{uri.push(encodeURIComponent(arg))}}var url="gap://"+args[0]+"/"+uri.join("/");if(dict!=null){url+="?"+encodeURIComponent(JSON.stringify(dict))}document.location=url};function Acceleration(x,y,z){this.x=x;this.y=y;this.z=z;this.timestamp=new Date().getTime()}function AccelerationOptions(){this.timeout=10000}function Accelerometer(){this.lastAcceleration=new Acceleration(0,0,0)}Accelerometer.prototype.getCurrentAcceleration=function(successCallback,errorCallback,options){if(typeof successCallback=="function"){successCallback(this.lastAcceleration)}};Accelerometer.prototype._onAccelUpdate=function(x,y,z){this.lastAcceleration=new Acceleration(x,y,z)};Accelerometer.prototype.watchAcceleration=function(successCallback,errorCallback,options){var frequency=(options!=undefined&&options.frequency!=undefined)?options.frequency:10000;var updatedOptions={desiredFrequency:frequency};PhoneGap.exec("Accelerometer.start",options);return setInterval(function(){navigator.accelerometer.getCurrentAcceleration(successCallback,errorCallback,options)},frequency)};Accelerometer.prototype.clearWatch=function(watchId){PhoneGap.exec("Accelerometer.stop");clearInterval(watchId)};PhoneGap.addConstructor(function(){if(typeof navigator.accelerometer=="undefined"){navigator.accelerometer=new Accelerometer()}});function Camera(){}Camera.prototype.getPicture=function(successCallback,errorCallback,options){PhoneGap.exec("Camera.getPicture",GetFunctionName(successCallback),GetFunctionName(errorCallback),options)};Camera.prototype.PictureSourceType={PHOTOLIBRARY:0,CAMERA:1,SAVEDPHOTOALBUM:2};Camera.DestinationType={DATA_URL:0,FILE_URI:1};Camera.prototype.DestinationType=Camera.DestinationType;PhoneGap.addConstructor(function(){if(typeof navigator.camera=="undefined"){navigator.camera=new Camera()}});function Contact(jsonObject){this.firstName="";this.lastName="";this.name="";this.phones={};this.emails={};this.address=""}Contact.prototype.displayName=function(){return this.name};function ContactManager(){this.contacts=[];this.timestamp=new Date().getTime()}ContactManager.prototype.getAllContacts=function(successCallback,errorCallback,options){PhoneGap.exec("Contacts.allContacts",GetFunctionName(successCallback),options)};ContactManager.prototype.newContact=function(contact,successCallback,options){if(!options){options={}}options.successCallback=GetFunctionName(successCallback);PhoneGap.exec("Contacts.newContact",contact.firstName,contact.lastName,contact.phoneNumber,options)};ContactManager.prototype.chooseContact=function(successCallback,options){PhoneGap.exec("Contacts.chooseContact",GetFunctionName(successCallback),options)};ContactManager.prototype.displayContact=function(contactID,errorCallback,options){PhoneGap.exec("Contacts.displayContact",contactID,GetFunctionName(errorCallback),options)};ContactManager.prototype.removeContact=function(contactID,successCallback,options){PhoneGap.exec("Contacts.removeContact",contactID,GetFunctionName(successCallback),options)};ContactManager.prototype.contactsCount=function(successCallback,errorCallback){PhoneGap.exec("Contacts.contactsCount",GetFunctionName(successCallback))};PhoneGap.addConstructor(function(){if(typeof navigator.contacts=="undefined"){navigator.contacts=new ContactManager()}});function DebugConsole(isDeprecated){this.logLevel=DebugConsole.INFO_LEVEL;this.isDeprecated=isDeprecated?true:false}DebugConsole.ALL_LEVEL=1;DebugConsole.INFO_LEVEL=1;DebugConsole.WARN_LEVEL=2;DebugConsole.ERROR_LEVEL=4;DebugConsole.NONE_LEVEL=8;DebugConsole.prototype.setLevel=function(level){this.logLevel=level};DebugConsole.prototype.processMessage=function(message){if(typeof(message)!="object"){return(this.isDeprecated?"WARNING: debug object is deprecated, please use console object \n"+message:message)}else{function indent(str){return str.replace(/^/mg,"    ")}function makeStructured(obj){var str="";for(var i in obj){try{if(typeof(obj[i])=="object"){str+=i+":\n"+indent(makeStructured(obj[i]))+"\n"}else{str+=i+" = "+indent(String(obj[i])).replace(/^    /,"")+"\n"}}catch(e){str+=i+" = EXCEPTION: "+e.message+"\n"}}return str}return((this.isDeprecated?"WARNING: debug object is deprecated, please use console object\n":"")+"Object:\n"+makeStructured(message))}};DebugConsole.prototype.log=function(message){if(PhoneGap.available&&this.logLevel<=DebugConsole.INFO_LEVEL){PhoneGap.exec("DebugConsole.log",this.processMessage(message),{logLevel:"INFO"})}else{console.log(message)}};DebugConsole.prototype.warn=function(message){if(PhoneGap.available&&this.logLevel<=DebugConsole.WARN_LEVEL){PhoneGap.exec("DebugConsole.log",this.processMessage(message),{logLevel:"WARN"})}else{console.error(message)}};DebugConsole.prototype.error=function(message){if(PhoneGap.available&&this.logLevel<=DebugConsole.ERROR_LEVEL){PhoneGap.exec("DebugConsole.log",this.processMessage(message),{logLevel:"ERROR"})}else{console.error(message)}};PhoneGap.addConstructor(function(){window.console=new DebugConsole();window.debug=new DebugConsole(true)});function Device(){this.platform=null;this.version=null;this.name=null;this.phonegap=null;this.uuid=null;try{this.platform=DeviceInfo.platform;this.version=DeviceInfo.version;this.name=DeviceInfo.name;this.phonegap=DeviceInfo.gap;this.uuid=DeviceInfo.uuid}catch(e){}this.available=PhoneGap.available=this.uuid!=null}PhoneGap.addConstructor(function(){navigator.device=window.device=new Device()});PhoneGap.addConstructor(function(){if(typeof navigator.fileMgr=="undefined"){navigator.fileMgr=new FileMgr()}});FileError={NOT_IMPLEMENTED:-1,NOT_FOUND_ERR:1,SECURITY_ERR:2,ABORT_ERR:3,NOT_READABLE_ERR:4,ENCODING_ERR:5,NO_MODIFICATION_ALLOWED_ERR:6,INVALID_STATE_ERR:7,SYNTAX_ERR:8};File._createEvent=function(type,target){var evt={type:type};evt.target=target;return evt};function FileMgr(){this.getFileBasePaths();this.getFreeDiskSpace()}FileMgr.seperator="/";FileMgr.prototype={fileWriters:{},fileReaders:{},docsFolderPath:"./../Documents/",libFolderPath:"./../Library/",tempFolderPath:"./../tmp/",freeDiskSpace:-1,_setPaths:function(docs,temp,lib){this.docsFolderPath=docs;this.tempFolderPath=temp;this.libFolderPath=lib},_setFreeDiskSpace:function(val){this.freeDiskSpace=val},addFileWriter:function(filePath,fileWriter){this.fileWriters[filePath]=fileWriter;return fileWriter},removeFileWriter:function(filePath){this.fileWriters[filePath]=null},addFileReader:function(filePath,fileReader){this.fileReaders[filePath]=fileReader;return fileReader},removeFileReader:function(filePath){this.fileReaders[filePath]=null},reader_onloadstart:function(filePath,result){this.fileReaders[filePath].result=unescape(result);var evt=File._createEvent("loadstart",this.fileReaders[filePath]);this.fileReaders[filePath].onloadstart(evt)},reader_onprogress:function(filePath,result){this.fileReaders[filePath].result=unescape(result);var evt=File._createEvent("progress",this.fileReaders[filePath]);this.fileReaders[filePath].onprogress(evt)},reader_onload:function(filePath,result){this.fileReaders[filePath].result=unescape(result);var evt=File._createEvent("load",this.fileReaders[filePath]);this.fileReaders[filePath].onload(evt)},reader_onerror:function(filePath,err){this.fileReaders[filePath].result=err;this.fileReaders[filePath].result=unescape(result);var evt=File._createEvent("error",this.fileReaders[filePath]);this.fileReaders[filePath].onerror(evt)},reader_onloadend:function(filePath,result){this.fileReaders[filePath].result=unescape(result);var evt=File._createEvent("loadend",this.fileReaders[filePath]);this.fileReaders[filePath].onloadend(evt)},writer_onerror:function(filePath,err){this.fileWriters[filePath].error=err;this.fileWriters[filePath].onerror(err)},writer_oncomplete:function(filePath,result){var writer=this.fileWriters[filePath];writer.length=result;writer.position=result;var evt=File._createEvent("writeend",writer);writer.onwriteend(evt);evt.type="complete";writer.oncomplete(evt)},getRootPaths:function(){return[this.docsFolderPath,this.libFolderPath,this.tempFolderPath]},getFileBasePaths:function(){PhoneGap.exec("File.getFileBasePaths")},testFileExists:function(fileName,win,fail){this.successCallback=function(b){win(b)};this.errorCallback=function(b){fail(b)};PhoneGap.exec("File.testFileExists",fileName)},testDirectoryExists:function(dirName,win,fail){this.successCallback=function(b){win(b)};this.errorCallback=function(b){fail(b)};PhoneGap.exec("File.testDirectoryExists",dirName)},createDirectory:function(dirName,successCallback,errorCallback){this.successCallback=successCallback;this.errorCallback=errorCallback;PhoneGap.exec("File.createDirectory",dirName)},deleteDirectory:function(dirName,successCallback,errorCallback){this.successCallback=successCallback;this.errorCallback=errorCallback;PhoneGap.exec("File.deleteDirectory",dirName)},deleteFile:function(fileName,successCallback,errorCallback){this.successCallback=successCallback;this.errorCallback=errorCallback;PhoneGap.exec("File.deleteFile",fileName)},getFreeDiskSpace:function(successCallback,errorCallback){if(this.freeDiskSpace>0){successCallback(this.freeDiskSpace);return this.freeDiskSpace}else{this.successCallback=successCallback;this.errorCallback=errorCallback;PhoneGap.exec("File.getFreeDiskSpace")}}};function FileReader(filename){this.fileName=filename}FileReader.EMPTY=0;FileReader.LOADING=1;FileReader.DONE=2;FileReader.prototype={fileName:null,result:null,onloadstart:null,onprogress:null,onload:null,onerror:null,onloadend:null,abort:function(){},readAsBinaryString:function(filename){},readAsDataURL:function(url){},readAsArrayBuffer:function(filename){},readAsText:function(fname){if(this.fileName&&this.fileName.length>0){navigator.fileMgr.removeFileReader(this.fileName,this)}this.fileName=fname;navigator.fileMgr.addFileReader(this.fileName,this);PhoneGap.exec("File.readFile",this.fileName)}};function FileWriter(filename){if(navigator.fileMgr.fileWriters[filename]!=null){return navigator.fileMgr.fileWriters[filename]}else{this.fileName=filename}}FileWriter.INIT=0;FileWriter.WRITING=1;FileWriter.DONE=2;FileWriter.prototype={fileName:"",result:null,readyState:0,onerror:null,oncomplete:null,onwritestart:null,onprogress:null,onload:null,onabort:null,onerror:null,onwriteend:null,length:0,position:0,error:null,write:function(text){return this.writeAsText(this.fileName,text)},truncate:function(offset){if(this.readyState==FileWriter.WRITING){throw FileError.INVALID_STATE_ERR}this.readyState=FileWriter.WRITING;if(this.fileName&&this.fileName.length>0){navigator.fileMgr.removeFileWriter(this.fileName)}navigator.fileMgr.addFileWriter(this.fileName,this);this.readyState=0;this.result=null;PhoneGap.exec("File.truncateFile",this.fileName,offset)},seek:function(offset){if(this.readyState===FileWriter.WRITING){throw FileError.INVALID_STATE_ERR}if(!offset){return}if(offset<0){this.position=Math.max(offset+this.length,0)}else{if(offset>this.length){this.position=this.length}else{this.position=offset}}},abort:function(){if(this.readyState!=FileWriter.WRITING){throw FileError.INVALID_STATE_ERR}var error=new FileError();error.code=FileError.ABORT_ERR;this.error=error;if(typeof this.onerror=="function"){var evt=File._createEvent("error",this);this.onerror(evt)}if(typeof this.onabort=="function"){var evt=File._createEvent("abort",this);this.onabort(evt)}this.readyState=FileWriter.DONE;if(typeof this.onloadend=="function"){var evt=File._createEvent("writeend",this);this.onloadend(evt)}},writeAsText:function(fname,text){if(this.readyState==FileWriter.WRITING){throw FileError.INVALID_STATE_ERR}this.readyState=FileWriter.WRITING;if(this.fileName&&this.fileName.length>0){navigator.fileMgr.removeFileWriter(this.fileName)}this.fileName=fname;navigator.fileMgr.addFileWriter(this.fileName,this);this.readyState=0;this.result=null;PhoneGap.exec("File.write",this.fileName,text,this.position)}};function PositionError(){this.code=0;this.message=""}PositionError.PERMISSION_DENIED=1;PositionError.POSITION_UNAVAILABLE=2;PositionError.TIMEOUT=3;function Geolocation(){this.lastPosition=null;this.lastError=null}Geolocation.prototype.getCurrentPosition=function(successCallback,errorCallback,options){var referenceTime=0;if(this.lastError!=null){if(typeof(errorCallback)=="function"){errorCallback.call(null,this.lastError)}this.stop();return}this.start(options);var timeout=30000;var interval=2000;if(options&&options.interval){interval=options.interval}if(typeof(successCallback)!="function"){successCallback=function(){}}if(typeof(errorCallback)!="function"){errorCallback=function(){}}var dis=this;var delay=0;var timer;var onInterval=function(){delay+=interval;if(dis.lastPosition!=null&&dis.lastPosition.timestamp>referenceTime){clearInterval(timer);successCallback(dis.lastPosition)}else{if(delay>timeout){clearInterval(timer);errorCallback("Error Timeout")}else{if(dis.lastError!=null){clearInterval(timer);errorCallback(dis.lastError)}}}};timer=setInterval(onInterval,interval)};Geolocation.prototype.watchPosition=function(successCallback,errorCallback,options){this.getCurrentPosition(successCallback,errorCallback,options);var frequency=(options&&options.frequency)?options.frequency:10000;var that=this;return setInterval(function(){that.getCurrentPosition(successCallback,errorCallback,options)},frequency)};Geolocation.prototype.clearWatch=function(watchId){clearInterval(watchId)};Geolocation.prototype.setLocation=function(position){this.lastError=null;this.lastPosition=position};Geolocation.prototype.setError=function(error){this.lastError=error};Geolocation.prototype.start=function(args){PhoneGap.exec("Location.startLocation",args)};Geolocation.prototype.stop=function(){PhoneGap.exec("Location.stopLocation")};function __proxyObj(origObj,proxyObj,funkList){var replaceFunk=function(org,proxy,fName){org[fName]=function(){return proxy[fName].apply(proxy,arguments)}};for(var v in funkList){replaceFunk(origObj,proxyObj,funkList[v])}}PhoneGap.addConstructor(function(){if(typeof navigator._geo=="undefined"){navigator._geo=new Geolocation();__proxyObj(navigator.geolocation,navigator._geo,["setLocation","getCurrentPosition","watchPosition","clearWatch","setError","start","stop"])}});function Compass(){this.lastHeading=null;this.lastError=null;this.callbacks={onHeadingChanged:[],onError:[]}}Compass.prototype.getCurrentHeading=function(successCallback,errorCallback,options){if(this.lastHeading==null){this.start(options)}else{if(typeof successCallback=="function"){successCallback(this.lastHeading)}}};Compass.prototype.watchHeading=function(successCallback,errorCallback,options){this.getCurrentHeading(successCallback,errorCallback,options);var frequency=100;if(typeof(options)=="object"&&options.frequency){frequency=options.frequency}var self=this;return setInterval(function(){self.getCurrentHeading(successCallback,errorCallback,options)},frequency)};Compass.prototype.clearWatch=function(watchId){clearInterval(watchId)};Compass.prototype.setHeading=function(heading){this.lastHeading=heading;for(var i=0;i<this.callbacks.onHeadingChanged.length;i++){var f=this.callbacks.onHeadingChanged.shift();f(heading)}};Compass.prototype.setError=function(message){this.lastError=message;for(var i=0;i<this.callbacks.onError.length;i++){var f=this.callbacks.onError.shift();f(message)}};Compass.prototype.start=function(args){PhoneGap.exec("Location.startHeading",args)};Compass.prototype.stop=function(){PhoneGap.exec("Location.stopHeading")};PhoneGap.addConstructor(function(){if(typeof navigator.compass=="undefined"){navigator.compass=new Compass()}});function Media(src,successCallback,errorCallback,downloadCompleteCallback){if(!src){src="documents://"+String((new Date()).getTime()).replace(/\D/gi,"")}this.src=src;this.successCallback=successCallback;this.errorCallback=errorCallback;this.downloadCompleteCallback=downloadCompleteCallback;if(this.src!=null){PhoneGap.exec("Sound.prepare",this.src,this.successCallback,this.errorCallback,this.downloadCompleteCallback)}}Media.prototype.play=function(options){if(this.src!=null){PhoneGap.exec("Sound.play",this.src,options)}};Media.prototype.pause=function(){if(this.src!=null){PhoneGap.exec("Sound.pause",this.src)}};Media.prototype.stop=function(){if(this.src!=null){PhoneGap.exec("Sound.stop",this.src)}};Media.prototype.startAudioRecord=function(options){if(this.src!=null){PhoneGap.exec("Sound.startAudioRecord",this.src,options)}};Media.prototype.stopAudioRecord=function(){if(this.src!=null){PhoneGap.exec("Sound.stopAudioRecord",this.src)}};function MediaError(){this.code=null,this.message=""}MediaError.MEDIA_ERR_ABORTED=1;MediaError.MEDIA_ERR_NETWORK=2;MediaError.MEDIA_ERR_DECODE=3;MediaError.MEDIA_ERR_NONE_SUPPORTED=4;function Notification(){this.resultsCallback=null}Notification.prototype.blink=function(count,colour){};Notification.prototype.vibrate=function(mills){PhoneGap.exec("Notification.vibrate")};Notification.prototype.beep=function(count,volume){new Media("beep.wav").play()};Notification.prototype.alert=function(message,resultCallback,title,buttonLabel){var options={};options.title=(title||"Alert");options.buttonLabel=(buttonLabel||"OK");this.resultsCallback=resultCallback;PhoneGap.exec("Notification.alert",message,options);return};Notification.prototype.confirm=function(message,resultCallback,title,buttonLabels){var confirmTitle=title?title:"Confirm";var labels=buttonLabels?buttonLabels:"OK,Cancel";return this.alert(message,resultCallback,confirmTitle,labels)};Notification.prototype._alertCallback=function(index){try{this.resultsCallback(index)}catch(e){console.log("Error in user's result callback: "+e)}};Notification.prototype.activityStart=function(){PhoneGap.exec("Notification.activityStart")};Notification.prototype.activityStop=function(){PhoneGap.exec("Notification.activityStop")};Notification.prototype.loadingStart=function(options){PhoneGap.exec("Notification.loadingStart",options)};Notification.prototype.loadingStop=function(){PhoneGap.exec("Notification.loadingStop")};PhoneGap.addConstructor(function(){if(typeof navigator.notification=="undefined"){navigator.notification=new Notification()}});function Orientation(){this.currentOrientation=null}Orientation.prototype.setOrientation=function(orientation){Orientation.currentOrientation=orientation;var e=document.createEvent("Events");e.initEvent("orientationChanged","false","false");e.orientation=orientation;document.dispatchEvent(e)};Orientation.prototype.getCurrentOrientation=function(successCallback,errorCallback){};Orientation.prototype.watchOrientation=function(successCallback,errorCallback){this.getCurrentPosition(successCallback,errorCallback);return setInterval(function(){navigator.orientation.getCurrentOrientation(successCallback,errorCallback)},10000)};Orientation.prototype.clearWatch=function(watchId){clearInterval(watchId)};PhoneGap.addConstructor(function(){if(typeof navigator.orientation=="undefined"){navigator.orientation=new Orientation()}});function Position(coords,timestamp){this.coords=coords;this.timestamp=new Date().getTime()}function Coordinates(lat,lng,alt,acc,head,vel,altAcc){this.latitude=lat;this.longitude=lng;this.accuracy=acc;this.altitude=alt;this.heading=head;this.speed=vel;this.altitudeAccuracy=(altAcc!="undefined")?altAcc:null}function PositionOptions(){this.enableHighAccuracy=true;this.timeout=10000}function PositionError(){this.code=null;this.message=""}PositionError.UNKNOWN_ERROR=0;PositionError.PERMISSION_DENIED=1;PositionError.POSITION_UNAVAILABLE=2;PositionError.TIMEOUT=3;function Sms(){}Sms.prototype.send=function(number,message,successCallback,errorCallback,options){};PhoneGap.addConstructor(function(){if(typeof navigator.sms=="undefined"){navigator.sms=new Sms()}});function Telephony(){}Telephony.prototype.call=function(number){};PhoneGap.addConstructor(function(){if(typeof navigator.telephony=="undefined"){navigator.telephony=new Telephony()}});function NetworkStatus(){this.code=null;this.message=""}NetworkStatus.NOT_REACHABLE=0;NetworkStatus.REACHABLE_VIA_CARRIER_DATA_NETWORK=1;NetworkStatus.REACHABLE_VIA_WIFI_NETWORK=2;function Network(){this.lastReachability=null}Network.prototype.isReachable=function(hostName,successCallback,options){PhoneGap.exec("Network.isReachable",hostName,GetFunctionName(successCallback),options)};Network.prototype.updateReachability=function(reachability){this.lastReachability=reachability};PhoneGap.addConstructor(function(){if(typeof navigator.network=="undefined"){navigator.network=new Network()}});
Index: extensions/iPiwigo/www/piwigo.js
===================================================================
--- extensions/iPiwigo/www/piwigo.js	(revision 9188)
+++ extensions/iPiwigo/www/piwigo.js	(revision 9188)
@@ -0,0 +1,258 @@
+//IF IPHONE SAFARI USER "tap" INSTEAD OF "click"
+var userAgent = navigator.userAgent.toLowerCase();
+var isiPhone = (userAgent.indexOf('iphone') != -1 || userAgent.indexOf('ipod') != -1) ? true : false;
+clickEvent = isiPhone ? 'tap' : 'click';
+
+//SCREENSIZE
+
+$(document).ready(function() {
+
+	jQuery('#save_settings').click(function(e){
+		
+		// WRITE USER SETTINGS
+		var name = $("#piwigo_name").val();
+		localStorage.setItem("piwigo_name", name);
+
+		var url = $("#piwigo_url").val();
+		localStorage.setItem("piwigo_url", url);
+						
+		var username = $("#piwigo_username").val();
+		localStorage.setItem("piwigo_username", username);
+						
+		var password = $("#piwigo_password").val();
+		localStorage.setItem("piwigo_password", password);
+		
+		// WRITE HIGH_RES
+		var highres = $('#piwigo_highres:checked').val();
+		localStorage.setItem("piwigo_highres", highres);
+		e.preventDefault();
+		
+		// IMAGE SIZE
+		var width = $("#piwigo_width").val();
+		localStorage.setItem("piwigo_width", width);
+
+		var height = $("#piwigo_height").val();
+		localStorage.setItem("piwigo_height", height);
+		
+
+		var urlLogin = url + 'ws.php?format=json&method=pwg.session.login&username=' +username+ '&password=' +password;
+		//alert(urlLogin);
+
+		$.ajax({
+		   type: "POST",
+		   url: "http://localhost:8888/piwigo/ws.php",
+		   data: "format=json&method=pwg.session.login&username=admin&password=admin",
+		   success: function(msg){
+		     //$("#settings .bindSuccess").hide().prepend('<ul id="success" class="success"><li>User data saved!</li></ul>');
+		     $('<ul id="success" class="success"><li>User data saved!' +msg+ '</li></ul>').hide().prependTo('#settings .bindSuccess').fadeIn(200);
+		     $("#settings #success").delay(2000).fadeOut("slow");
+		   }
+		 });
+		
+		
+	});
+
+	// LOAD USER SETTINGS
+	var name = localStorage.getItem("piwigo_name");
+	$("#piwigo_name").val(name);
+
+	var url = localStorage.getItem("piwigo_url");
+	$("#piwigo_url").val(url);
+
+	var username = localStorage.getItem("piwigo_username");
+	$("#piwigo_username").val(username);
+
+	var password = localStorage.getItem("piwigo_password");
+	$("#piwigo_password").val(password);
+
+	// HIGH_RES - LOAD
+	var highres = localStorage.getItem("piwigo_highres");
+
+	if(highres=='on'){
+		$('#piwigo_highres').attr("checked","checked");	
+	}
+	else{
+	
+	}
+	
+	// IMAGE SIZE
+	var width = localStorage.getItem("piwigo_width");
+	$("#piwigo_width").val(width);
+
+	var height = localStorage.getItem("piwigo_height");
+	$("#piwigo_height").val(height);
+				
+
+	$("a.categoriesLink").tap(function(e){
+		var url = $(this).attr('url');
+		$('.images').empty();
+	
+		$.getJSON(url,		
+			function(data) {
+			for (var i=0; i<data.result.images._content.length; i++) {
+				var image = data.result.images._content[i];
+				console.log('image loaded ' +image.file);
+				$('.images').append('<li url="' +image.element_url+ '" class="rounded"><a class="imagesLink pop" file="' +image.file+ '" thumbnail="' +image.tn_url+ '" rel="' +image.high_url+ '" url="' +image.element_url+ '" href="#imageZoom"><img width="143px" src="'+image.tn_url+'"/><div class="file">'+image.file+ '</div></a></li>');
+	        }
+
+		});
+	});
+
+	$("a.imagesLink").tap(function(e){
+		var url = $(this).attr('url');
+		$('ul.images li').removeClass('selected');
+		$(this).parent('li').addClass('selected');
+		$('.imageZoom').empty();
+		$('.imageZoom').append('<li class="fullscreen"><img  src="'+url+'"/></li>');
+	});
+
+
+	$("a.prev").tap(function(e){
+		var url = $('li.selected').prev().attr('url');
+		var prevLi = $('li.selected').prev();
+		var title = $('li.selected .file').html();
+		if (typeof url == 'undefined') {
+			e.preventDefault();
+		} else {
+			//alert(url);
+			$('.imageZoom').empty();
+			$('.imageZoom').append('<li class="fullscreen"><img  src="'+url+'"/></li>');
+			$('#imageZoom h1').text(title);
+			console.log('Big image loaded ' +url);
+			$('ul.images li:not(:first)').removeClass('selected');
+			$(prevLi).addClass('selected');
+		}
+	});
+
+
+
+	$("a.play").tap(function(e){
+		var interval = $(this).replaceWith('<a class="pause" href="#">Pause</a>');
+		var url = $('li.selected').next().attr('url');
+		var nextLi = $('li.selected').next();
+		if (typeof url == 'undefined') {
+			e.preventDefault();
+		} else {
+			window.setInterval(function(play){
+				$("a.next").click();
+			},2000);
+		}
+	});
+
+	$("a.pause").tap(function(e){
+		$(this).replaceWith('<a class="play" href="#">Play</a>');
+			window.clearInterval(function(play){
+				$("a.next").click();
+			},2000);	});
+	
+
+	$("a.next").tap(function(e){
+		var url = $('li.selected').next().attr('url');
+		var nextLi = $('li.selected').next();
+		var title = $('li.selected .file').html();
+		if (typeof url == 'undefined') {
+			e.preventDefault();
+		} else {
+			//alert(url);
+			$('.imageZoom').empty();
+			$('.imageZoom').append('<li class="fullscreen"><img  src="'+url+'"/></li>');
+			$('#imageZoom h1').text(title);
+			console.log('Big image loaded ' +url);
+			$('ul.images li:not(:last)').removeClass('selected');
+			$(nextLi).addClass('selected');
+		}
+	});
+
+
+    $.getJSON(
+      /* "http://piwigo.knallimall.org/ws.php?format=json&method=pwg.categories.getList", */
+      "http://localhost:8888/piwigo/ws.php?format=json&method=pwg.categories.getList",
+      function(data) {
+        /* alert(dump(data)); */
+        for (var i=0; i<data.result.categories.length; i++) {
+          var category = data.result.categories[i];
+          console.log('category loaded ' +category.name);
+          $('.categories').append('<li><a class="categoriesLink" url="http://localhost:8888/piwigo/ws.php?format=json&method=pwg.categories.getImages&cat_id='+category.id+'" href="#images">'+category.name+' </a> <small class="counter">'+category.total_nb_images+' </small></li>');
+        }
+      }
+    );
+
+/**
+* Function : dump()
+* Arguments: The data - array,hash(associative array),object
+*    The level - OPTIONAL
+* Returns  : The textual representation of the array.
+* This function was inspired by the print_r function of PHP.
+* This will accept some data as the argument and return a
+* text that will be a more readable version of the
+* array/hash/object that is given.
+*/
+function dump(arr,level) {
+var dumped_text = "";
+if(!level) level = 0;
+
+//The padding given at the beginning of the line.
+var level_padding = "";
+for(var j=0;j<level+1;j++) level_padding += "    ";
+
+if(typeof(arr) == 'object') { //Array/Hashes/Objects
+ for(var item in arr) {
+  var value = arr[item];
+ 
+  if(typeof(value) == 'object') { //If it is an array,
+   dumped_text += level_padding + "'" + item + "' ...\n";
+   dumped_text += dump(value,level+1);
+  } else {
+   dumped_text += level_padding + "'" + item + "' => \"" + value + "\"\n";
+  }
+ }
+} else { //Stings/Chars/Numbers etc.
+ dumped_text = "===>"+arr+"<===("+typeof(arr)+")";
+}
+return dumped_text;
+}
+});
+
+// JQTOUCH
+var jQT = new $.jQTouch({
+    icon: 'jqtouch.png',
+    addGlossToIcon: false,
+    startupScreen: 'jqt_startup.png',
+    statusBar: 'black',
+    preloadImages: [
+        'themes/piwigo/img/back_button.png',
+        'themes/piwigo/img/back_button_clicked.png',
+        'themes/piwigo/img/button_clicked.png',
+        'themes/piwigo/img/grayButton.png',
+        'themes/piwigo/img/whiteButton.png',
+        'themes/piwigo/img/loading.gif'
+        ]
+});
+// Some sample Javascript functions:
+$(function(){
+// Orientation callback event
+$('body').bind('turn', function(e, data){
+  if (data.orientation == 'landscape')
+  {
+    $(this).addClass('wide');
+    $(this).removeClass('small');
+    
+	var $winWidth = $(window).width();
+	var $winHeight = $(window).height();
+    $(".fullscreen img").attr({
+		width: $winWidth,
+		height: $winHeight
+	});	
+  } else{
+    $(this).addClass('small');
+    $(this).removeClass('wide');
+	var $winWidth = $(window).width();
+	var $winHeight = $(window).height();
+    $(".fullscreen img").attr({
+		width: $winWidth,
+		height: $winHeight
+	});
+  }
+
+}); 
+}); 
Index: extensions/iPiwigo/www/themes/piwigo/theme.css
===================================================================
--- extensions/iPiwigo/www/themes/piwigo/theme.css	(revision 9188)
+++ extensions/iPiwigo/www/themes/piwigo/theme.css	(revision 9188)
@@ -0,0 +1,701 @@
+/* 
+BACKGROUND: #464646
+LINK PASSIV, H1: #f1f1f1
+CLICK ACTIVE: #ff7701
+
+*/
+
+li.rounded {
+	display: inline;
+	float: left;
+	margin: 1px;
+}
+
+
+.images li.rounded {
+	padding: 0px !important;
+    border: 1px solid #464646 !important;
+}
+
+.images li.rounded:active {
+	padding: 0px !important;
+    border: 1px solid #ff7701 !important;
+}
+
+
+.imagesLink {
+	padding: 0px !important;
+	margin: 0px !important;
+
+}
+
+div.file {
+	color: #fff;
+	font-size: 12px;
+	font-weight: normal;
+	padding: 2px 3px 2px 3px;
+}
+
+#highResIcon {
+	position: absolute;
+	z-index: 99
+}
+
+
+
+body {
+    background: #464646;
+    color: #ddd;
+}
+body > * {
+    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#333), to(#464646));
+}
+h1, h2 {
+    font: bold 18px Helvetica;
+    text-shadow: rgba(255,255,255,.2) 0 1px 1px;
+    color: #000;
+    margin: 10px 20px 0px;
+}
+/* @group Toolbar */
+.toolbar {
+    -webkit-box-sizing: border-box;
+    border-bottom: 1px solid #000;
+    padding: 10px;
+    height: 45px;
+    background: url(img/toolbar.png) #000000 repeat-x;
+    position: relative;
+}
+.black-translucent .toolbar {
+	margin-top: 20px;
+}
+.toolbar > h1 {
+    position: absolute;
+    overflow: hidden;
+    left: 50%;
+    top: 10px;
+    line-height: 1em;
+    margin: 1px 0 0 -75px;
+    height: 40px;
+    font-size: 20px;
+    width: 150px;
+    font-weight: bold;
+    text-shadow: rgba(0,0,0,1) 0 -1px 1px;
+    text-align: center;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    color: #fff;
+}
+body.landscape .toolbar > h1 {
+    margin-left: -125px;
+    width: 250px;
+}
+.button, .back, .cancel, .add {
+    position: absolute;
+    overflow: hidden;
+    top: 8px;
+    right: 10px;
+    margin: 0;
+    border-width: 0 5px;
+    padding: 0 3px;
+    width: auto;
+    height: 30px;
+    line-height: 30px;
+    font-family: inherit;
+    font-size: 12px;
+    font-weight: bold;
+    color: #fff;
+    text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0;
+    text-overflow: ellipsis;
+    text-decoration: none;
+    white-space: nowrap;
+    background: none;
+    -webkit-border-image: url(img/button.png) 0 5 0 5;
+}
+.blueButton {
+    -webkit-border-image: url(img/blueButton.png) 0 5 0 5;
+    border-width: 0 5px;
+}
+.back {
+    left: 6px;
+    right: auto;
+    padding: 0;
+    max-width: 55px;
+    border-width: 0 8px 0 14px;
+    -webkit-border-image: url(img/back_button.png) 0 8 0 14;
+}
+.back.active {
+    -webkit-border-image: url(img/back_button_clicked.png) 0 8 0 14;
+    color: #aaa;
+}
+.leftButton, .cancel {
+    left: 6px;
+    right: auto;
+}
+.add {
+    font-size: 24px;
+    line-height: 24px;
+    font-weight: bold;
+}
+.whiteButton,
+.grayButton {
+    display: block;
+    border-width: 0 12px;
+    padding: 10px;
+    text-align: center;
+    font-size: 20px;
+    font-weight: bold;
+    text-decoration: inherit;
+    color: inherit;
+}
+.whiteButton {
+    -webkit-border-image: url(img/whiteButton.png) 0 12 0 12;
+    text-shadow: rgba(255, 255, 255, 0.7) 0 1px 0;
+}
+.grayButton {
+    -webkit-border-image: url(img/grayButton.png) 0 12 0 12;
+    color: #FFFFFF;
+}
+/* @end */
+/* @group Lists */
+h1 + ul, h2 + ul, h3 + ul, h4 + ul, h5 + ul, h6 + ul {
+    margin-top: 0;
+}
+ul {
+    color: #aaa;
+    border: 1px solid #333333;
+    font: bold 18px Helvetica;
+    padding: 0;
+    margin: 10px 10px 17px 10px;
+}
+ul.rounded {
+    -webkit-border-radius: 8px;
+    -webkit-box-shadow: rgba(0,0,0,.3) 1px 1px 3px;
+}
+
+li.rounded {
+    -webkit-border-radius: 8px;
+    -webkit-box-shadow: rgba(0,0,0,.3) 1px 1px 3px;
+}
+
+ul.rounded li:first-child, ul.rounded li:first-child a {
+    border-top: 0;
+    -webkit-border-top-left-radius: 8px;
+    -webkit-border-top-right-radius: 8px;
+}
+ul.rounded li:last-child, ul.rounded li:last-child a {
+    -webkit-border-bottom-left-radius: 8px;
+    -webkit-border-bottom-right-radius: 8px;
+}
+ul li {
+    color: #666;
+    border-top: 1px solid #333;
+    border-bottom: #555858;
+    list-style-type: none;
+    padding: 10px 10px 10px 10px;
+    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4c4d4e), to(#404142));
+    overflow: hidden;
+}
+ul li.arrow {
+    background-image: url(img/chevron.png), -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4c4d4e), to(#404142));
+    background-position: right center;
+    background-repeat: no-repeat;
+}
+ul li.forward {
+    background-image: url(img/chevron_circle.png), -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4c4d4e), to(#404142));
+    background-position: right center;
+    background-repeat: no-repeat;
+}
+/* universal links on list */
+ul li a, li.img a + a {
+    color: #fff;
+    text-decoration: none;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    overflow: hidden;
+    display: block;
+    padding: 12px 10px 12px 10px;
+    margin: -10px;
+    -webkit-tap-highlight-color: rgba(0,0,0,0);
+    text-shadow: rgba(0,0,0,.2) 0 1px 1px;
+}
+ul li a.active, ul li a.button {
+    background-color: #ff7701;
+    color: #fff;
+}
+ul li a.active.loading {
+    background-image: url(img/loading.gif);
+    background-position: 95% center;
+    background-repeat: no-repeat;
+}
+ul li.arrow a.active {
+    background-image: url(img/chevron.png);
+    background-position: right center;
+    background-repeat: no-repeat;
+}
+ul li.forward a.active {
+    background-image: url(img/chevron_circle.png);
+    background-position: right center;
+    background-repeat: no-repeat;
+}
+ul li.img a + a {
+    margin: -10px 10px -20px -5px;
+    font-size: 17px;
+    font-weight: bold;
+}
+ul li.img a + a + a {
+    font-size: 14px;
+    font-weight: normal;
+    margin-left: -10px;
+    margin-bottom: -10px;
+    margin-top: 0;
+}
+ul li.img a + small + a {
+    margin-left: -5px;
+}
+ul li.img a + small + a + a {
+    margin-left: -10px;
+    margin-top: -20px;
+    margin-bottom: -10px;
+    font-size: 14px;
+    font-weight: normal;
+}
+ul li.img a + small + a + a + a {
+    margin-left: 0px !important;
+    margin-bottom: 0;
+}
+ul li a + a {
+    color: #000;
+    font: 14px Helvetica;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    overflow: hidden;
+    display: block;
+    margin: 0;
+    padding: 0;
+}
+ul li a + a + a, ul li.img a + a + a + a, ul li.img a + small + a + a + a {
+    color: #666;
+    font: 13px Helvetica;
+    margin: 0;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    overflow: hidden;
+    display: block;
+    padding: 0;
+}
+/*
+@end */
+/* @group Forms */
+ul.form li {
+    padding: 7px 10px;
+}
+ul.form li.error {
+    border: 2px solid red;
+}
+ul.form li.error + li.error {
+    border-top: 0;
+}
+ul li input[type="text"], ul li input[type="password"], ul li textarea, ul li select {
+    color: #777;
+    background: transparent url(../.png);
+    border: 0;
+    font: normal 17px Helvetica;
+    padding: 0;
+    display: inline-block;
+    margin-left: 0px;
+    width: 100%;
+    -webkit-appearance: textarea;
+}
+ul li textarea {
+    height: 120px;
+    padding: 0;
+    text-indent: -2px;
+}
+ul li select {
+    text-indent: 0px;
+    background: transparent url(img/chevron.png) no-repeat right center;
+    -webkit-appearance: textfield;
+    margin-left: -6px;
+    width: 104%;
+}
+ul li input[type="checkbox"], ul li input[type="radio"] {
+    margin: 0;
+    padding: 10px 10px;
+}
+ul li input[type="checkbox"]:after, ul li input[type="radio"]:after {
+    content: attr(title);
+    font: 17px Helvetica;
+    display: block;
+    width: 246px;
+    color: #777;
+    margin: -12px 0 0 17px;
+}
+/* @end */
+/* @group Mini Label */
+ul li small {
+    color: #64c114;
+    font: 17px Helvetica;
+    text-align: right;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    overflow: hidden;
+    display: block;
+    width: 23%;
+    float: right;
+    padding: 0;
+}
+ul li.arrow small {
+    padding: 0 15px;
+}
+ul li small.counter {
+    font-size: 17px;
+    line-height: 13px;
+    font-weight: bold;
+    background: rgba(0,0,0,.15);
+    color: #fff;
+    -webkit-border-radius: 11px;
+    padding: 4px 10px 5px 10px;
+    display: block;
+    width: auto;
+    margin-top: -22px;
+    -webkit-box-shadow: rgba(255,255,255,.1) 0 1px 0;
+}
+ul li.arrow small.counter {
+    margin-right: 15px;
+}
+/* @end */
+/* @group Individual */
+ul.individual {
+    border: 0;
+    background: none;
+    clear: both;
+    overflow: hidden;
+    padding-bottom: 3px;
+    -webkit-box-shadow: none;
+}
+ul.individual li {
+    background: #4c4d4e;
+    border: 1px solid #333;
+    font-size: 14px;
+    text-align: center;
+    -webkit-border-radius: 8px;
+    -webkit-box-sizing: border-box;
+    width: 48%;
+    float: left;
+    display: block;
+    padding: 11px 10px 14px 10px;
+    -webkit-box-shadow: rgba(0,0,0,.2) 1px 1px 3px;
+    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4c4d4e), to(#404142));
+}
+ul.individual li + li {
+    float: right;
+}
+ul.individual li a {
+    color: #fff;
+    line-height: 16px;
+    margin: -11px -10px -14px -10px;
+    padding: 11px 10px 14px 10px;
+    -webkit-border-radius: 8px;
+}
+/* @end */
+/* @group Toggle */
+.toggle {
+    width: 94px;
+    position: relative;
+    height: 27px;
+    display: block;
+    overflow: hidden !important;
+    float: right;
+    background-color: transparent !important;
+}
+.toggle input[type="checkbox"]:checked {
+    left: 0px;
+    -webkit-appearance: textarea;
+    -webkit-border-radius: 5px;
+    -webkit-tap-highlight-color: rgba(0,0,0,0);
+    -webkit-transition: left .15s;
+    background: transparent url(img/on_off.png) 0 0 no-repeat;
+    background-color: transparent !important;
+    border: 0;
+    height: 27px;
+    margin: 0;
+    overflow: hidden;
+    position: absolute;
+    top: 0;
+    width: 149px !important;
+}
+.toggle input[type="checkbox"] {
+    -webkit-appearance: textarea;
+    -webkit-border-radius: 5px;
+    -webkit-tap-highlight-color: rgba(0,0,0,0);
+    -webkit-transition: left .15s;
+    background: transparent url(img/on_off2.png) 0 0 no-repeat;
+    background-color: transparent !important;
+    border: 0;
+    height: 27px;
+    left: -55px;
+    margin: 0;
+    overflow: hidden;
+    position: absolute;
+    top: 0;
+    width: 149px !important;
+}
+/* @end */
+/* @group Info */
+.info {
+    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ccc), to(#aaa), color-stop(.6,#CCCCCC));
+    font-size: 12px;
+    line-height: 16px;
+    text-align: center;
+    text-shadow: rgba(255,255,255,.8) 0 1px 0;
+    color: #444;
+    padding: 15px;
+    border-top: 1px solid rgba(255,255,255,.2);
+    font-weight: bold;
+}
+/* @end */
+/* @group Edge to edge */
+ul.edgetoedge {
+    border-width: 1px 0;
+    margin: 0;
+    padding: 0;
+}
+ul.edgetoedge li {
+    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#1e1f21), to(#272729));
+    border-bottom: 2px solid #000;
+    border-top: 1px solid #4a4b4d;
+    font-size: 20px;
+    margin-bottom: -1px;
+}
+ul.edgetoedge li.sep {
+    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0,0,0,0)), to(rgba(0,0,0,.5)));
+    border-bottom: 1px solid #111113;
+    border-top: 1px solid #666;
+    color: #3e9ac3;
+    font-size: 16px;
+    margin: 1px 0 0 0;
+    padding: 2px 10px;
+    text-shadow: #000 0 1px 0;
+}
+ul.edgetoedge li em {
+    font-weight: normal;
+    font-style: normal;
+}
+/* @end */
+/* @group Plastic */
+#plastic {
+    background: #17181a;
+}
+ul.plastic {
+    background: #17181a;
+    color: #aaa;
+    font: bold 18px Helvetica;
+    margin: 0;
+    padding: 0;
+    border-width: 0 0 1px 0;
+}
+ul.plastic li {
+    border-width: 1px 0;
+    border-style: solid;
+    border-top-color: #222;
+    border-bottom-color: #000;
+    color: #666;
+    list-style-type: none;
+    overflow: hidden;
+    padding: 10px 10px 10px 10px;
+}
+ul.plastic li a.active.loading {
+    background-image: url(img/loading.gif);
+    background-position: 95% center;
+    background-repeat: no-repeat;
+}
+ul.plastic li small {
+    color: #888;
+    font-size: 13px;
+    font-weight: bold;
+    line-height: 24px;
+    text-transform: uppercase;
+}
+ul.plastic li:nth-child(odd) {
+    background-color: #1c1c1f;
+}
+ul.plastic li.arrow {
+    background-image: url(img/chevron.png);
+    background-position: right center;
+    background-repeat: no-repeat;
+}
+ul.plastic li.arrow a.active {
+    background-image: url(img/chevron.png);
+    background-position: right center;
+    background-repeat: no-repeat;
+}
+ul.plastic li.forward {
+    background-image: url(img/chevron_circle.png);
+    background-position: right center;
+    background-repeat: no-repeat;
+}
+ul.plastic li.forward a.active {
+    background-image: url(img/chevron_circle.png);
+    background-position: right center;
+    background-repeat: no-repeat;
+}
+/* @group Metal */
+ul.metal {
+    border-bottom: 0;
+    border-left: 0;
+    border-right: 0;
+    border-top: 0;
+    margin: 0;
+}
+ul.metal li {
+    background-image: none;
+    border-top: 1px solid #fff;
+    border-bottom: 1px solid #666;
+    font-size: 26px;
+    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(238,238,238,1)), to(rgba(156,158,160,1)));
+}
+ul.metal li a {
+    line-height: 26px;
+    margin: 0;
+    text-shadow: #fff 0 1px 0;
+    padding: 13px 0;
+}
+ul.metal li a em {
+    display: block;
+    font-size: 14px;
+    font-style: normal;
+    color: #444;
+    width: 50%;
+    line-height: 14px;
+}
+ul.metal li a.active {
+    color: rgb(0,0,0);
+}
+ul.metal li small {
+    float: right;
+    position: relative;
+    margin-top: 10px;
+    font-weight: bold;
+}
+ul.metal li.arrow {
+    background-image: url(img/chevron.png);
+    background-position: right center;
+    background-repeat: no-repeat;
+    background-image: url(img/chevron.png), -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(238,238,238,1)), to(rgba(156,158,160,1)));
+    background-repeat: no-repeat;
+    background-position: right center;
+}
+ul.metal li.arrow a small {
+    padding-right: 15px;
+    line-height: 17px;
+}
+/* @end */
+
+#about {
+	padding: 20px 10px;
+}
+
+#about h1, #about h2 {
+    margin: 10px 0px;
+    color: #f1f1f1
+}
+
+a {
+	color: #f1f1f1;
+}
+
+.buttonRight {
+	float: right;
+	width: 35% !important;
+}
+
+.buttonLeft {
+	float: left;
+	width: 35% !important;
+}
+
+.spaceBottom {
+	height: 20px;
+	clear: both;
+}
+
+
+/* INFO BOXES */
+ul.success {
+	border: 0px !important;
+}
+
+ul.success li {
+	background-image: url(img/infos.png);
+	background-repeat: no-repeat;
+	background-position: 5px center;
+	background-color: #C2F5C2;
+	-webkit-border-radius: 8px;
+    padding: 12px 10px 12px 60px;
+    color: #00aa00 !important;
+}
+
+ul.error li {
+	background-image: url(img/error.png);
+	background-repeat: no-repeat;
+	background-position: 5px center;
+	background-color: #d01e1e;
+	-webkit-border-radius: 8px;
+    padding: 12px 10px 12px 60px;
+    color: #ffffff;
+}
+
+
+
+#success {
+	position: absolute;
+	top: 30%;
+	left: 50%;
+	width: 180px;
+	margin-left: -90px;
+	z-index: 99;
+}
+
+h1 {
+	color: #FF7700;
+	text-shadow: rgba(255,255,255,.0) 0 1px 1px;
+}
+
+
+#imageZoom .imageZoom, #imageZoom .imageZoom li, #imageZoom .imageZoom ul {
+	padding: 0px !important;
+	margin: 0px !important;
+}
+
+
+#imageZoom .fullscreen img {
+	max-height: 460px;
+	max-width: 320px;
+	display: block;
+	z-index: 1;
+	top: 0px;
+	right: 0px;
+	bottom: 0px;
+	left: 0px;
+	vertical-align: center;
+}
+
+#imageZoom .navigation {
+	position: fixed;
+	height: 30px;
+	left: 0px;
+	right: 0px;
+	bottom: 0px;
+	display: block;
+	background-color: green;
+	opacity: 0.4;
+	z-index: 99;
+}
+
+#imageZoom .navigation a {
+	opacity: 1;
+}
+
+.url {
+	background-color: #ffffff;
+}
