/* ***************************************************************** 
1. dimensions
2. hoverintend
3. cluetip
4. ga
5. ge.debug
***************************************************************** */
/* ***************************************************************** */
/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* $LastChangedDate: 2007-08-17 14:14:11 -0400 (Fri, 17 Aug 2007) $
* $Rev: 2759 $
*
* Version: 1.1.2
*
* Requires: jQuery 1.1.3+
*/

(function($) {

    // store a copy of the core height and width methods
    var height = $.fn.height,
    width = $.fn.width;

    $.fn.extend({
        /**
        * If used on document, returns the document's height (innerHeight).
        * If used on window, returns the viewport's (window) height.
        * See core docs on height() to see what happens when used on an element.
        *
        * @example $("#testdiv").height()
        * @result 200
        *
        * @example $(document).height()
        * @result 800
        *
        * @example $(window).height()
        * @result 400
        *
        * @name height
        * @type Number
        * @cat Plugins/Dimensions
        */
        height: function() {
            if (!this[0]) error();
            if (this[0] == window)
                if ($.browser.opera || ($.browser.safari && parseInt($.browser.version) > 520))
                return self.innerHeight - (($(document).height() > self.innerHeight) ? getScrollbarWidth() : 0);
            else if ($.browser.safari)
                return self.innerHeight;
            else
                return $.boxModel && document.documentElement.clientHeight || document.body.clientHeight;

            if (this[0] == document)
                return Math.max(($.boxModel && document.documentElement.scrollHeight || document.body.scrollHeight), document.body.offsetHeight);

            return height.apply(this, arguments);
        },

        /**
        * If used on document, returns the document's width (innerWidth).
        * If used on window, returns the viewport's (window) width.
        * See core docs on width() to see what happens when used on an element.
        *
        * @example $("#testdiv").width()
        * @result 200
        *
        * @example $(document).width()
        * @result 800
        *
        * @example $(window).width()
        * @result 400
        *
        * @name width
        * @type Number
        * @cat Plugins/Dimensions
        */
        width: function() {
            if (!this[0]) error();
            if (this[0] == window)
                if ($.browser.opera || ($.browser.safari && parseInt($.browser.version) > 520))
                return self.innerWidth - (($(document).width() > self.innerWidth) ? getScrollbarWidth() : 0);
            else if ($.browser.safari)
                return self.innerWidth;
            else
                return $.boxModel && document.documentElement.clientWidth || document.body.clientWidth;

            if (this[0] == document)
                if ($.browser.mozilla) {
                // mozilla reports scrollWidth and offsetWidth as the same
                var scrollLeft = self.pageXOffset;
                self.scrollTo(99999999, self.pageYOffset);
                var scrollWidth = self.pageXOffset;
                self.scrollTo(scrollLeft, self.pageYOffset);
                return document.body.offsetWidth + scrollWidth;
            }
            else
                return Math.max((($.boxModel && !$.browser.safari) && document.documentElement.scrollWidth || document.body.scrollWidth), document.body.offsetWidth);

            return width.apply(this, arguments);
        },

        /**
        * Gets the inner height (excludes the border and includes the padding) for the first matched element.
        * If used on document, returns the document's height (innerHeight).
        * If used on window, returns the viewport's (window) height.
        *
        * @example $("#testdiv").innerHeight()
        * @result 210
        *
        * @name innerHeight
        * @type Number
        * @cat Plugins/Dimensions
        */
        innerHeight: function() {
            if (!this[0]) error();
            return this[0] == window || this[0] == document ?
			this.height() :
			this.is(':visible') ?
				this[0].offsetHeight - num(this, 'borderTopWidth') - num(this, 'borderBottomWidth') :
				this.height() + num(this, 'paddingTop') + num(this, 'paddingBottom');
        },

        /**
        * Gets the inner width (excludes the border and includes the padding) for the first matched element.
        * If used on document, returns the document's width (innerWidth).
        * If used on window, returns the viewport's (window) width.
        *
        * @example $("#testdiv").innerWidth()
        * @result 210
        *
        * @name innerWidth
        * @type Number
        * @cat Plugins/Dimensions
        */
        innerWidth: function() {
            if (!this[0]) error();
            return this[0] == window || this[0] == document ?
			this.width() :
			this.is(':visible') ?
				this[0].offsetWidth - num(this, 'borderLeftWidth') - num(this, 'borderRightWidth') :
				this.width() + num(this, 'paddingLeft') + num(this, 'paddingRight');
        },

        /**
        * Gets the outer height (includes the border and padding) for the first matched element.
        * If used on document, returns the document's height (innerHeight).
        * If used on window, returns the viewport's (window) height.
        *
        * The margin can be included in the calculation by passing an options map with margin
        * set to true.
        *
        * @example $("#testdiv").outerHeight()
        * @result 220
        *
        * @example $("#testdiv").outerHeight({ margin: true })
        * @result 240
        *
        * @name outerHeight
        * @type Number
        * @param Map options Optional settings to configure the way the outer height is calculated.
        * @cat Plugins/Dimensions
        */
        outerHeight: function(options) {
            if (!this[0]) error();
            options = $.extend({ margin: false }, options || {});
            return this[0] == window || this[0] == document ?
			this.height() :
			this.is(':visible') ?
				this[0].offsetHeight + (options.margin ? (num(this, 'marginTop') + num(this, 'marginBottom')) : 0) :
				this.height()
					+ num(this, 'borderTopWidth') + num(this, 'borderBottomWidth')
					+ num(this, 'paddingTop') + num(this, 'paddingBottom')
					+ (options.margin ? (num(this, 'marginTop') + num(this, 'marginBottom')) : 0);
        },

        /**
        * Gets the outer width (including the border and padding) for the first matched element.
        * If used on document, returns the document's width (innerWidth).
        * If used on window, returns the viewport's (window) width.
        *
        * The margin can be included in the calculation by passing an options map with margin
        * set to true.
        *
        * @example $("#testdiv").outerWidth()
        * @result 1000
        *
        * @example $("#testdiv").outerWidth({ margin: true })
        * @result 1020
        * 
        * @name outerHeight
        * @type Number
        * @param Map options Optional settings to configure the way the outer width is calculated.
        * @cat Plugins/Dimensions
        */
        outerWidth: function(options) {
            if (!this[0]) error();
            options = $.extend({ margin: false }, options || {});
            return this[0] == window || this[0] == document ?
			this.width() :
			this.is(':visible') ?
				this[0].offsetWidth + (options.margin ? (num(this, 'marginLeft') + num(this, 'marginRight')) : 0) :
				this.width()
					+ num(this, 'borderLeftWidth') + num(this, 'borderRightWidth')
					+ num(this, 'paddingLeft') + num(this, 'paddingRight')
					+ (options.margin ? (num(this, 'marginLeft') + num(this, 'marginRight')) : 0);
        },

        /**
        * Gets how many pixels the user has scrolled to the right (scrollLeft).
        * Works on containers with overflow: auto and window/document.
        *
        * @example $(window).scrollLeft()
        * @result 100
        *
        * @example $(document).scrollLeft()
        * @result 100
        * 
        * @example $("#testdiv").scrollLeft()
        * @result 100
        *
        * @name scrollLeft
        * @type Number
        * @cat Plugins/Dimensions
        */
        /**
        * Sets the scrollLeft property for each element and continues the chain.
        * Works on containers with overflow: auto and window/document.
        *
        * @example $(window).scrollLeft(100).scrollLeft()
        * @result 100
        * 
        * @example $(document).scrollLeft(100).scrollLeft()
        * @result 100
        *
        * @example $("#testdiv").scrollLeft(100).scrollLeft()
        * @result 100
        *
        * @name scrollLeft
        * @param Number value A positive number representing the desired scrollLeft.
        * @type jQuery
        * @cat Plugins/Dimensions
        */
        scrollLeft: function(val) {
            if (!this[0]) error();
            if (val != undefined)
            // set the scroll left
                return this.each(function() {
                    if (this == window || this == document)
                        window.scrollTo(val, $(window).scrollTop());
                    else
                        this.scrollLeft = val;
                });

            // return the scroll left offest in pixels
            if (this[0] == window || this[0] == document)
                return self.pageXOffset ||
				$.boxModel && document.documentElement.scrollLeft ||
				document.body.scrollLeft;

            return this[0].scrollLeft;
        },

        /**
        * Gets how many pixels the user has scrolled to the bottom (scrollTop).
        * Works on containers with overflow: auto and window/document.
        *
        * @example $(window).scrollTop()
        * @result 100
        *
        * @example $(document).scrollTop()
        * @result 100
        * 
        * @example $("#testdiv").scrollTop()
        * @result 100
        *
        * @name scrollTop
        * @type Number
        * @cat Plugins/Dimensions
        */
        /**
        * Sets the scrollTop property for each element and continues the chain.
        * Works on containers with overflow: auto and window/document.
        *
        * @example $(window).scrollTop(100).scrollTop()
        * @result 100
        * 
        * @example $(document).scrollTop(100).scrollTop()
        * @result 100
        *
        * @example $("#testdiv").scrollTop(100).scrollTop()
        * @result 100
        *
        * @name scrollTop
        * @param Number value A positive number representing the desired scrollTop.
        * @type jQuery
        * @cat Plugins/Dimensions
        */
        scrollTop: function(val) {
            if (!this[0]) error();
            if (val != undefined)
            // set the scroll top
                return this.each(function() {
                    if (this == window || this == document)
                        window.scrollTo($(window).scrollLeft(), val);
                    else
                        this.scrollTop = val;
                });

            // return the scroll top offset in pixels
            if (this[0] == window || this[0] == document)
                return self.pageYOffset ||
				$.boxModel && document.documentElement.scrollTop ||
				document.body.scrollTop;

            return this[0].scrollTop;
        },

        /** 
        * Gets the top and left positioned offset in pixels.
        * The positioned offset is the offset between a positioned
        * parent and the element itself.
        *
        * For accurate calculations make sure to use pixel values for margins, borders and padding.
        *
        * @example $("#testdiv").position()
        * @result { top: 100, left: 100 }
        *
        * @example var position = {};
        * $("#testdiv").position(position)
        * @result position = { top: 100, left: 100 }
        * 
        * @name position
        * @param Object returnObject Optional An object to store the return value in, so as not to break the chain. If passed in the
        *                            chain will not be broken and the result will be assigned to this object.
        * @type Object
        * @cat Plugins/Dimensions
        */
        position: function(returnObject) {
            return this.offset({ margin: false, scroll: false, relativeTo: this.offsetParent() }, returnObject);
        },

        /**
        * Gets the location of the element in pixels from the top left corner of the viewport.
        * The offset method takes an optional map of key value pairs to configure the way
        * the offset is calculated. Here are the different options.
        *
        * (Boolean) margin - Should the margin of the element be included in the calculations? True by default.
        * (Boolean) border - Should the border of the element be included in the calculations? False by default. 
        * (Boolean) padding - Should the padding of the element be included in the calculations? False by default. 
        * (Boolean) scroll - Should the scroll offsets of the parent elements be included in the calculations? True by default.
        *                    When true it adds the total scroll offsets of all parents to the total offset and also adds two
        *                    properties to the returned object, scrollTop and scrollLeft.
        * (Boolean) lite - When true it will use the offsetLite method instead of the full-blown, slower offset method. False by default.
        *                  Only use this when margins, borders and padding calculations don't matter.
        * (HTML Element) relativeTo - This should be a parent of the element and should have position (like absolute or relative).
        *                             It will retreive the offset relative to this parent element. By default it is the body element.
        *
        * Also an object can be passed as the second paramater to
        * catch the value of the return and continue the chain.
        *
        * For accurate calculations make sure to use pixel values for margins, borders and padding.
        * 
        * Known issues:
        *  - Issue: A div positioned relative or static without any content before it and its parent will report an offsetTop of 0 in Safari
        *    Workaround: Place content before the relative div ... and set height and width to 0 and overflow to hidden
        *
        * @example $("#testdiv").offset()
        * @result { top: 100, left: 100, scrollTop: 10, scrollLeft: 10 }
        *
        * @example $("#testdiv").offset({ scroll: false })
        * @result { top: 90, left: 90 }
        *
        * @example var offset = {}
        * $("#testdiv").offset({ scroll: false }, offset)
        * @result offset = { top: 90, left: 90 }
        *
        * @name offset
        * @param Map options Optional settings to configure the way the offset is calculated.
        * @param Object returnObject An object to store the return value in, so as not to break the chain. If passed in the
        *                            chain will not be broken and the result will be assigned to this object.
        * @type Object
        * @cat Plugins/Dimensions
        */
        offset: function(options, returnObject) {
            if (!this[0]) error();
            var x = 0, y = 0, sl = 0, st = 0,
		    elem = this[0], parent = this[0], op, parPos, elemPos = $.css(elem, 'position'),
		    mo = $.browser.mozilla, ie = $.browser.msie, oa = $.browser.opera,
		    sf = $.browser.safari, sf3 = $.browser.safari && parseInt($.browser.version) > 520,
		    absparent = false, relparent = false,
		    options = $.extend({ margin: true, border: false, padding: false, scroll: true, lite: false, relativeTo: document.body }, options || {});

            // Use offsetLite if lite option is true
            if (options.lite) return this.offsetLite(options, returnObject);
            // Get the HTMLElement if relativeTo is a jquery collection
            if (options.relativeTo.jquery) options.relativeTo = options.relativeTo[0];

            if (elem.tagName == 'BODY') {
                // Safari 2 is the only one to get offsetLeft and offsetTop properties of the body "correct"
                // Except they all mess up when the body is positioned absolute or relative
                x = elem.offsetLeft;
                y = elem.offsetTop;
                // Mozilla ignores margin and subtracts border from body element
                if (mo) {
                    x += num(elem, 'marginLeft') + (num(elem, 'borderLeftWidth') * 2);
                    y += num(elem, 'marginTop') + (num(elem, 'borderTopWidth') * 2);
                } else
                // Opera ignores margin
                    if (oa) {
                    x += num(elem, 'marginLeft');
                    y += num(elem, 'marginTop');
                } else
                // IE does not add the border in Standards Mode
                    if ((ie && jQuery.boxModel)) {
                    x += num(elem, 'borderLeftWidth');
                    y += num(elem, 'borderTopWidth');
                } else
                // Safari 3 doesn't not include border or margin
                    if (sf3) {
                    x += num(elem, 'marginLeft') + num(elem, 'borderLeftWidth');
                    y += num(elem, 'marginTop') + num(elem, 'borderTopWidth');
                }
            } else {
                do {
                    parPos = $.css(parent, 'position');

                    x += parent.offsetLeft;
                    y += parent.offsetTop;

                    // Mozilla and IE do not add the border
                    // Mozilla adds the border for table cells
                    if ((mo && !parent.tagName.match(/^t[d|h]$/i)) || ie || sf3) {
                        // add borders to offset
                        x += num(parent, 'borderLeftWidth');
                        y += num(parent, 'borderTopWidth');

                        // Mozilla does not include the border on body if an element isn't positioned absolute and is without an absolute parent
                        if (mo && parPos == 'absolute') absparent = true;
                        // IE does not include the border on the body if an element is position static and without an absolute or relative parent
                        if (ie && parPos == 'relative') relparent = true;
                    }

                    op = parent.offsetParent || document.body;
                    if (options.scroll || mo) {
                        do {
                            if (options.scroll) {
                                // get scroll offsets
                                sl += parent.scrollLeft;
                                st += parent.scrollTop;
                            }

                            // Opera sometimes incorrectly reports scroll offset for elements with display set to table-row or inline
                            if (oa && ($.css(parent, 'display') || '').match(/table-row|inline/)) {
                                sl = sl - ((parent.scrollLeft == parent.offsetLeft) ? parent.scrollLeft : 0);
                                st = st - ((parent.scrollTop == parent.offsetTop) ? parent.scrollTop : 0);
                            }

                            // Mozilla does not add the border for a parent that has overflow set to anything but visible
                            if (mo && parent != elem && $.css(parent, 'overflow') != 'visible') {
                                x += num(parent, 'borderLeftWidth');
                                y += num(parent, 'borderTopWidth');
                            }

                            parent = parent.parentNode;
                        } while (parent != op);
                    }
                    parent = op;

                    // exit the loop if we are at the relativeTo option but not if it is the body or html tag
                    if (parent == options.relativeTo && !(parent.tagName == 'BODY' || parent.tagName == 'HTML')) {
                        // Mozilla does not add the border for a parent that has overflow set to anything but visible
                        if (mo && parent != elem && $.css(parent, 'overflow') != 'visible') {
                            x += num(parent, 'borderLeftWidth');
                            y += num(parent, 'borderTopWidth');
                        }
                        // Safari 2 and opera includes border on positioned parents
                        if (((sf && !sf3) || oa) && parPos != 'static') {
                            x -= num(op, 'borderLeftWidth');
                            y -= num(op, 'borderTopWidth');
                        }
                        break;
                    }
                    if (parent.tagName == 'BODY' || parent.tagName == 'HTML') {
                        // Safari 2 and IE Standards Mode doesn't add the body margin for elments positioned with static or relative
                        if (((sf && !sf3) || (ie && $.boxModel)) && elemPos != 'absolute' && elemPos != 'fixed') {
                            x += num(parent, 'marginLeft');
                            y += num(parent, 'marginTop');
                        }
                        // Safari 3 does not include the border on body
                        // Mozilla does not include the border on body if an element isn't positioned absolute and is without an absolute parent
                        // IE does not include the border on the body if an element is positioned static and without an absolute or relative parent
                        if (sf3 || (mo && !absparent && elemPos != 'fixed') ||
					     (ie && elemPos == 'static' && !relparent)) {
                            x += num(parent, 'borderLeftWidth');
                            y += num(parent, 'borderTopWidth');
                        }
                        break; // Exit the loop
                    }
                } while (parent);
            }

            var returnValue = handleOffsetReturn(elem, options, x, y, sl, st);

            if (returnObject) { $.extend(returnObject, returnValue); return this; }
            else { return returnValue; }
        },

        /**
        * Gets the location of the element in pixels from the top left corner of the viewport.
        * This method is much faster than offset but not as accurate when borders and margins are
        * on the element and/or its parents. This method can be invoked
        * by setting the lite option to true in the offset method.
        * The offsetLite method takes an optional map of key value pairs to configure the way
        * the offset is calculated. Here are the different options.
        *
        * (Boolean) margin - Should the margin of the element be included in the calculations? True by default.
        * (Boolean) border - Should the border of the element be included in the calculations? False by default. 
        * (Boolean) padding - Should the padding of the element be included in the calcuations? False by default. 
        * (Boolean) scroll - Sould the scroll offsets of the parent elements be included int he calculations? True by default.
        *                    When true it adds the total scroll offsets of all parents to the total offset and also adds two
        *                    properties to the returned object, scrollTop and scrollLeft.
        * (HTML Element) relativeTo - This should be a parent of the element and should have position (like absolute or relative).
        *                             It will retreive the offset relative to this parent element. By default it is the body element.
        *
        * @name offsetLite
        * @param Map options Optional settings to configure the way the offset is calculated.
        * @param Object returnObject An object to store the return value in, so as not to break the chain. If passed in the
        *                            chain will not be broken and the result will be assigned to this object.
        * @type Object
        * @cat Plugins/Dimensions
        */
        offsetLite: function(options, returnObject) {
            if (!this[0]) error();
            var x = 0, y = 0, sl = 0, st = 0, parent = this[0], offsetParent,
		    options = $.extend({ margin: true, border: false, padding: false, scroll: true, relativeTo: document.body }, options || {});

            // Get the HTMLElement if relativeTo is a jquery collection
            if (options.relativeTo.jquery) options.relativeTo = options.relativeTo[0];

            do {
                x += parent.offsetLeft;
                y += parent.offsetTop;

                offsetParent = parent.offsetParent || document.body;
                if (options.scroll) {
                    // get scroll offsets
                    do {
                        sl += parent.scrollLeft;
                        st += parent.scrollTop;
                        parent = parent.parentNode;
                    } while (parent != offsetParent);
                }
                parent = offsetParent;
            } while (parent && parent.tagName != 'BODY' && parent.tagName != 'HTML' && parent != options.relativeTo);

            var returnValue = handleOffsetReturn(this[0], options, x, y, sl, st);

            if (returnObject) { $.extend(returnObject, returnValue); return this; }
            else { return returnValue; }
        },

        /**
        * Returns a jQuery collection with the positioned parent of 
        * the first matched element. This is the first parent of 
        * the element that has position (as in relative or absolute).
        *
        * @name offsetParent
        * @type jQuery
        * @cat Plugins/Dimensions
        */
        offsetParent: function() {
            if (!this[0]) error();
            var offsetParent = this[0].offsetParent;
            while (offsetParent && (offsetParent.tagName != 'BODY' && $.css(offsetParent, 'position') == 'static'))
                offsetParent = offsetParent.offsetParent;
            return $(offsetParent);
        }
    });

    /**
    * Throws an error message when no elements are in the jQuery collection
    * @private
    */
    var error = function() {
        throw "Dimensions: jQuery collection is empty";
    };

    /**
    * Handles converting a CSS Style into an Integer.
    * @private
    */
    var num = function(el, prop) {
        return parseInt($.css(el.jquery ? el[0] : el, prop)) || 0;
    };

    /**
    * Handles the return value of the offset and offsetLite methods.
    * @private
    */
    var handleOffsetReturn = function(elem, options, x, y, sl, st) {
        if (!options.margin) {
            x -= num(elem, 'marginLeft');
            y -= num(elem, 'marginTop');
        }

        // Safari and Opera do not add the border for the element
        if (options.border && (($.browser.safari && parseInt($.browser.version) < 520) || $.browser.opera)) {
            x += num(elem, 'borderLeftWidth');
            y += num(elem, 'borderTopWidth');
        } else if (!options.border && !(($.browser.safari && parseInt($.browser.version) < 520) || $.browser.opera)) {
            x -= num(elem, 'borderLeftWidth');
            y -= num(elem, 'borderTopWidth');
        }

        if (options.padding) {
            x += num(elem, 'paddingLeft');
            y += num(elem, 'paddingTop');
        }

        // do not include scroll offset on the element ... opera sometimes reports scroll offset as actual offset
        if (options.scroll && (!$.browser.opera || elem.offsetLeft != elem.scrollLeft && elem.offsetTop != elem.scrollLeft)) {
            sl -= elem.scrollLeft;
            st -= elem.scrollTop;
        }

        return options.scroll ? { top: y - st, left: x - sl, scrollTop: st, scrollLeft: sl }
	                      : { top: y, left: x };
    };

    /**
    * Gets the width of the OS scrollbar
    * @private
    */
    var scrollbarWidth = 0;
    var getScrollbarWidth = function() {
        if (!scrollbarWidth) {
            var testEl = $('<div>')
				.css({
				    width: 100,
				    height: 100,
				    overflow: 'auto',
				    position: 'absolute',
				    top: -1000,
				    left: -1000
				})
				.appendTo('body');
            scrollbarWidth = 100 - testEl
			.append('<div>')
			.find('div')
				.css({
				    width: '100%',
				    height: 200
				})
				.width();
            testEl.remove();
        }
        return scrollbarWidth;
    };

})(jQuery);
/* ***************************************************************** */
/**
* hoverIntent is similar to jQuery's built-in "hover" function except that
* instead of firing the onMouseOver event immediately, hoverIntent checks
* to see if the user's mouse has slowed down (beneath the sensitivity
* threshold) before firing the onMouseOver event.
* 
* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
* 
* hoverIntent is currently available for use in all personal or commercial 
* projects under both MIT and GPL licenses. This means that you can choose 
* the license that best suits your project, and use it accordingly.
* 
* // basic usage (just like .hover) receives onMouseOver and onMouseOut functions
* $("ul li").hoverIntent( showNav , hideNav );
* 
* // advanced usage receives configuration object only
* $("ul li").hoverIntent({
*	sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)
*	interval: 50,   // number = milliseconds of polling interval
*	over: showNav,  // function = onMouseOver callback (required)
*	timeout: 100,   // number = milliseconds delay before onMouseOut function call
*	out: hideNav    // function = onMouseOut callback (required)
* });
* 
* @param  f  onMouseOver function || An object with configuration options
* @param  g  onMouseOut function  || Nothing (use configuration options object)
* @return    The object (aka "this") that called hoverIntent, and the event object
* @author    Brian Cherne <brian@cherne.net>
*/
(function($) {
    $.fn.hoverIntent = function(f, g) {
        // default configuration options
        var cfg = {
            sensitivity: 7,
            interval: 100,
            timeout: 0
        };
        // override configuration options with user supplied object
        cfg = $.extend(cfg, g ? { over: f, out: g} : f);

        // instantiate variables
        // cX, cY = current X and Y position of mouse, updated by mousemove event
        // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval
        var cX, cY, pX, pY;

        // A private function for getting mouse position
        var track = function(ev) {
            cX = ev.pageX;
            cY = ev.pageY;
        };

        // A private function for comparing current and previous mouse position
        var compare = function(ev, ob) {
            ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
            // compare mouse positions to see if they've crossed the threshold
            if ((Math.abs(pX - cX) + Math.abs(pY - cY)) < cfg.sensitivity) {
                $(ob).unbind("mousemove", track);
                // set hoverIntent state to true (so mouseOut can be called)
                ob.hoverIntent_s = 1;
                return cfg.over.apply(ob, [ev]);
            } else {
                // set previous coordinates for next time
                pX = cX; pY = cY;
                // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
                ob.hoverIntent_t = setTimeout(function() { compare(ev, ob); }, cfg.interval);
            }
        };

        // A private function for delaying the mouseOut function
        var delay = function(ev, ob) {
            ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
            ob.hoverIntent_s = 0;
            return cfg.out.apply(ob, [ev]);
        };

        // A private function for handling mouse 'hovering'
        var handleHover = function(e) {
            // next three lines copied from jQuery.hover, ignore children onMouseOver/onMouseOut
            var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
            while (p && p != this) { try { p = p.parentNode; } catch (e) { p = this; } }
            if (p == this) { return false; }

            // copy objects to be passed into t (required for event object to be passed in IE)
            var ev = jQuery.extend({}, e);
            var ob = this;

            // cancel hoverIntent timer if it exists
            if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }

            // else e.type == "onmouseover"
            if (e.type == "mouseover") {
                // set "previous" X and Y position based on initial entry point
                pX = ev.pageX; pY = ev.pageY;
                // update "current" X and Y position based on mousemove
                $(ob).bind("mousemove", track);
                // start polling interval (self-calling timeout) to compare mouse coordinates over time
                if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout(function() { compare(ev, ob); }, cfg.interval); }

                // else e.type == "onmouseout"
            } else {
                // unbind expensive mousemove event
                $(ob).unbind("mousemove", track);
                // if hoverIntent state is true, then call the mouseOut function after the specified delay
                if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout(function() { delay(ev, ob); }, cfg.timeout); }
            }
        };

        // bind the function to the two event listeners
        return this.mouseover(handleHover).mouseout(handleHover);
    };
})(jQuery);
/* ***************************************************************** */
/*
* jQuery clueTip plugin
* Version 0.9.4  (11/14/2007)
* @requires jQuery v1.1.1+
* @requires Dimensions plugin 
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
(function($) {
    /*
    * @name clueTip
    * @type jQuery
    * @cat Plugins/tooltip
    * @return jQuery
    * @author Karl Swedberg
    *
    * @credit Inspired by Cody Lindley's jTip (http://www.codylindley.com)
    * @credit Thanks to Shelane Enos for the feature ideas 
    * @credit Thanks to the following people for their expert advice, code enhancements, bug fixes, etc.:
    Glen Lipka, Hector Santos, Torben Schreiter, Dan G. Switzer, Jörn Zaefferer 
    * @credit Thanks to Jonathan Chaffer, as always, for help with the hard parts. :-)
    */

    /**
    * 
    * Displays a highly customizable tooltip when the user hovers (default) or clicks (optional) the matched element. 
    * By default, the clueTip plugin loads a page indicated by the "rel" attribute via ajax and displays its contents.
    * If a "title" attribute is specified, its value is used as the clueTip's heading.
    * The attribute to be used for both the body and the heading of the clueTip is user-configurable. 
    * Optionally, the clueTip's body can display content from an element on the same page.
    * * Just indicate the element's id (e.g. "#some-id") in the rel attribute.
    * Optionally, the clueTip's body can display content from the title attribute, when a delimiter is indicated. 
    * * The string before the first instance of the delimiter is set as the clueTip's heading.
    * * All subsequent strings are wrapped in separate DIVs and placed in the clueTip's body.
    * The clueTip plugin allows for many, many more options. Pleasee see the examples and the option descriptions below...
    * 
    * 
    * @example $('#tip).cluetip();
    * @desc This is the most basic clueTip. It displays a 275px-wide clueTip on mouseover of the element with an ID of "tip." On mouseout of the element, the clueTip is hidden.
    *
    *
    * @example $('a.clue').cluetip({
    *  hoverClass: 'highlight',
    *  sticky: true,
    *  closePosition: 'bottom',
    *  closeText: '<img src="cross.png" alt="close" />',
    *  truncate: 60,
    *  ajaxSettings: {
    *    type: 'POST'
    *  }
    * });
    * @desc Displays a clueTip on mouseover of all <a> elements with class="clue". The hovered element gets a class of "highlight" added to it (so that it can be styled appropriately. This is esp. useful for non-anchor elements.). The clueTip is "sticky," which means that it will not be hidden until the user either clicks on its "close" text/graphic or displays another clueTip. The "close" text/graphic is set to diplay at the bottom of the clueTip (default is top) and display an image rather than the default "Close" text. Moreover, the body of the clueTip is truncated to the first 60 characters, which are followed by an ellipsis (...). Finally, the clueTip retrieves the content using POST rather than the $.ajax method's default "GET."
    * 
    * More examples can be found at http://plugins.learningjquery.com/cluetip/demo/
    *
    * @param Object defaults (optional) Customize your clueTips
    * @option Integer width: default is 275. The width of the clueTip
    * @option Integer|String height: default is 'auto'. The height of the clueTip. Setting a specific height also sets  <div id="cluetip-outer"> to overflow:auto
    * @option Integer cluezIndex: default is 97; sets the z-index style property of the clueTip.
    * @option String positionBy: default is 'auto'. Available options: 'auto', 'mouse', 'bottomTop', 'fixed'. Change to 'mouse' if you want to override positioning by element and position the clueTip based on where the mouse is instead. Change to 'bottomTop' if you want positioning to begin below the mouse when there is room or above if not -- rather than right or left of the elemnent and flush with element's top Change to 'fixed' if you want the clueTip to appear in exactly the same location relative to the linked element no matter where it appears on the page. Use 'fixed' at your own risk.
    * @option Integer topOffset: number of pixels to offset the clueTip from the top of the linked element. For positionBy "auto", "mouse", and "bottomTop" the number will be added to the clueTip's "top" value if the clueTip appears below the linked element and subtracted from it if the clueTip appears above. For positionBy "fixed", the number will be added to the "top" value, offsetting the clueTip from the top of the linked element.
    * @option Integer leftOffset: number of pixels to offset the cluetip horizontally from the linked element. For positionBy "auto", "mouse", and "bottomTop" the number will be added to clueTip's "left" value if the clueTip appears to the right of the linked element and subtracted if the clueTip appears to the left. For positionBy "fixed", the number will be added to the "left" value of the clueTip, offsetting it from the right-most part of the linked element. 
    * @option Boolean local: default is false. Whether to use content from the same page (using ID) for clueTip body
    * @option Boolean hideLocal: default is true. If local option is set to true, determine whether local content to be shown in clueTip should be hidden at its original location. 
    * @option String attribute default is 'rel'. The attribute to be used for the URL of the ajaxed content
    * @option Boolean showtitle: default is true. Shows the title bar of the clueTip, whether a title attribute has been set or not. Change this to false to hide the title bar.
    * @option String cluetipClass: default is 'default'; this adds a class to the outermost clueTip div with a class name in the form of 'cluetip-' + clueTipClass. It also adds "clue-left-default" or "clue-right-default" to the same div, depending on whether the clueTip is to the left or to the right of the link element. This allows you to create your own clueTip theme in a separate CSS file or use one of the three pre-packaged themes: default, jtip, or rounded.
    * @option String titleAttribute: default is 'title'. The attribute to be used for the clueTip's heading, if the attribute exists for the hovered element.
    * @option String splitTitle: default is '' (empty string). A character used to split the title attribute into the clueTip title and divs within the clueTip body; if used, the clueTip will be populated only by the title attribute, 
    * @option String hoverClass: default is empty string. designate one to apply to the hovered element
    * @option String closePosition: default is 'top'. Set to 'bottom' to put the closeText at the bottom of the clueTip body
    * @option String closeText: default is 'Close'. This determines the text to be clicked to close a clueTip when sticky is set to true.
    * @option Number truncate: default is 0. Set to some number greater than 0 to truncate the text in the body of the clueTip. This also removes all HTML/images from the clueTip body.
    * @option Boolean waitImage: default is true. Set to false to avoid having the plugin try to show/hide the image.
    * @option Boolean arrows: Default is false. Set to true to display an arrow at the appropriate side of the cluetip and lined vertically with the hovered element.
    * @option Boolean dropShadow: default is true; set it to false if you do not want the drop-shadow effect on the clueTip
    * @option Integer dropShadowSteps: default is 6; change this number to adjust the size of the drop shadow
    * @option Boolean sticky: default is false. Set to true to keep the clueTip visible until the user either closes it manually by clicking on the CloseText or display another clueTip.
    * @option Object fx: default is: {open: 'show', openSpeed: ''}. Change these to apply one of jQuery's effects when opening the clueTip
    * @option String activation: default is 'hover'. Set to 'toggle' to force the user to click the element in order to activate the clueTip.
    * @option Object hoverIntent: default is {sensitivity: 3, interval: 50, timeout: 0}. If jquery.hoverintent.js plugin is included in <head>, hoverIntent() will be used with these settings instead of hover(). Set to false if for some reason you have the hoverintent plugin included but don't want to use it. For info on hoverIntent options, see http://cherne.net/brian/resources/jquery.hoverIntent.html
    * @option Function onShow: default is function (ct, c){} ; allows you to pass in your own function once the clueTip has shown.
    * @option Boolean ajaxCache: Default is true; caches the results of the ajax request to avoid unnecessary hits to the server. When set to false, the script will make an ajax request every time the clueTip is shown, which allows for dynamic content to be loaded.
    * @option Object ajaxProcess: Default is function(data) { data = $(data).not('style, meta, link, script, title); return data; } . When getting clueTip content via ajax, allows processing of it before it's displayed. The default value strips out elements typically found in the <head> that might interfere with current page.
    * @option Object ajaxSettings: allows you to pass in standard $.ajax() parameters, not including error, complete, success, and url. Default is { dataType: 'html'}
    *
    */
    var $cluetip, $cluetipInner, $cluetipOuter, $cluetipTitle, $cluetipArrows, $dropShadow, imgCount;
    $.fn.cluetip = function(options) {
        var defaults = {  // set up default options
            width: 275,
            height: 'auto',
            cluezIndex: 97,
            positionBy: 'auto',
            topOffset: 15,
            leftOffset: 15,
            local: false,
            hideLocal: true,
            attribute: 'rel',
            titleAttribute: 'title',
            splitTitle: '',
            showTitle: true,
            cluetipClass: 'default',
            hoverClass: '',
            waitImage: true,
            cursor: 'help',
            arrows: false,
            dropShadow: true,
            dropShadowSteps: 6,
            sticky: false,
            mouseOutClose: false,
            activation: 'hover',
            closePosition: 'top',
            closeText: 'Close',
            truncate: 0,
            fx: {
                open: 'show',
                openSpeed: ''
            },
            hoverIntent: {
                sensitivity: 3,
                interval: 50,
                timeout: 0
            },
            onActivate: function(e) { return true; },
            onShow: function(ct, c) { },
            ajaxCache: true,
            ajaxProcess: function(data) {
                data = $(data).not('style, meta, link, script, title');
                return data;
            },
            ajaxSettings: {
                dataType: 'html'
            }
        };

        if (options && options.ajaxSettings) {
            $.extend(defaults.ajaxSettings, options.ajaxSettings);
            delete options.ajaxSettings;
        }
        if (options && options.fx) {
            $.extend(defaults.fx, options.fx);
            delete options.fx;
        }
        if (options && options.hoverIntent) {
            $.extend(defaults.hoverIntent, options.hoverIntent);
            delete options.hoverIntent;
        }
        $.extend(defaults, options);

        return this.each(function() {
            // start out with no contents (for ajax activation)
            var cluetipContents = false;
            var cluezIndex = parseInt(defaults.cluezIndex, 10) - 1;
            var isActive = false;

            // create the cluetip divs
            if (!$cluetip) {
                $cluetipInner = $('<div id="cluetip-inner"></div>');
                $cluetipTitle = $('<h3 id="cluetip-title"></h3>');
                $cluetipOuter = $('<div id="cluetip-outer"></div>').append($cluetipInner).prepend($cluetipTitle);
                $cluetip = $('<div></div>').attr({ 'id': 'cluetip' }).css({ zIndex: defaults.cluezIndex })
        .append($cluetipOuter).append('<div id="cluetip-extra"></div>')[insertionType](insertionElement).hide();
                $('<div id="cluetip-waitimage"></div>').css({ position: 'absolute', zIndex: cluezIndex - 1 })
        .insertBefore('#cluetip').hide();
                $cluetip.css({ position: 'absolute', zIndex: cluezIndex });
                $cluetipOuter.css({ position: 'relative', zIndex: cluezIndex + 1 });
                $cluetipArrows = $('<div id="cluetip-arrows" class="cluetip-arrows"></div>').css({ zIndex: cluezIndex + 1 }).appendTo('#cluetip');
            }
            var dropShadowSteps = (defaults.dropShadow) ? +defaults.dropShadowSteps : 0;
            if (!$dropShadow) {
                $dropShadow = $([]);
                for (var i = 0; i < dropShadowSteps; i++) {
                    $dropShadow = $dropShadow.add($('<div></div>').css({ zIndex: cluezIndex - i - 1, opacity: .1, top: 1 + i, left: 1 + i }));
                };
                $dropShadow.css({ position: 'absolute', backgroundColor: '#000' })
        .prependTo($cluetip);
            }
            var $this = $(this);
            var tipAttribute = $this.attr(defaults.attribute), ctClass = defaults.cluetipClass;
            if (!tipAttribute && !defaults.splitTitle) return true;
            // if hideLocal is set to true, on DOM ready hide the local content that will be displayed in the clueTip
            if (defaults.local && defaults.hideLocal) { $(tipAttribute + ':first').hide(); }
            var tOffset = parseInt(defaults.topOffset, 10), lOffset = parseInt(defaults.leftOffset, 10);
            // vertical measurement variables
            var tipHeight, wHeight;
            var defHeight = isNaN(parseInt(defaults.height, 10)) ? 'auto' : (/\D/g).test(defaults.height) ? defaults.height : defaults.height + 'px';
            var sTop, linkTop, posY, tipY, mouseY;
            // horizontal measurement variables
            var tipWidth = parseInt(defaults.width, 10) + parseInt($cluetip.css('paddingLeft')) + parseInt($cluetip.css('paddingRight')) + dropShadowSteps;
            if (isNaN(tipWidth)) tipWidth = 275;
            var linkWidth = this.offsetWidth;
            var linkLeft, posX, tipX, mouseX, winWidth;

            // parse the title
            var tipParts;
            var tipTitle = (defaults.attribute != 'title') ? $this.attr(defaults.titleAttribute) : '';
            if (defaults.splitTitle) {
                tipParts = tipTitle.split(defaults.splitTitle);
                tipTitle = tipParts.shift();
            }
            var localContent;

            /***************************************      
            * ACTIVATION
            ****************************************/

            //activate clueTip
            var activate = function(event) {
                if (!defaults.onActivate($this)) {
                    return false;
                }
                isActive = true;
                $cluetip.removeClass().css({ width: defaults.width });
                if (tipAttribute == $this.attr('href')) {
                    $this.css('cursor', defaults.cursor);
                }
                $this.attr('title', '');
                if (defaults.hoverClass) {
                    $this.addClass(defaults.hoverClass);
                }
                linkTop = posY = $this.offset().top;
                linkLeft = $this.offset().left;
                mouseX = event.pageX;
                mouseY = event.pageY;
                if ($this[0].tagName.toLowerCase() != 'area') {
                    sTop = $(document).scrollTop();
                    winWidth = $(window).width();
                }
                // position clueTip horizontally
                if (defaults.positionBy == 'fixed') {
                    posX = linkWidth + linkLeft + lOffset;
                    $cluetip.css({ left: posX });
                } else {
                    posX = (linkWidth > linkLeft && linkLeft > tipWidth)
          || linkLeft + linkWidth + tipWidth + lOffset > winWidth
          ? linkLeft - tipWidth - lOffset
          : linkWidth + linkLeft + lOffset;
                    if ($this[0].tagName.toLowerCase() == 'area' || defaults.positionBy == 'mouse' || linkWidth + tipWidth > winWidth) { // position by mouse
                        if (mouseX + 20 + tipWidth > winWidth) {
                            posX = (mouseX - tipWidth - lOffset) >= 0 ? mouseX - tipWidth - lOffset : mouseX - (tipWidth / 2);
                        } else {
                            posX = mouseX + lOffset;
                        }
                        var pY = posX < 0 ? event.pageY + tOffset : event.pageY;
                    }
                    $cluetip.css({ left: (posX > 0 && defaults.positionBy != 'bottomTop') ? posX : (mouseX + (tipWidth / 2) > winWidth) ? winWidth / 2 - tipWidth / 2 : Math.max(mouseX - (tipWidth / 2), 0) });
                }
                wHeight = $(window).height();

                /***************************************
                * load the title attribute only (or user-selected attribute). 
                * clueTip title is the string before the first delimiter
                * subsequent delimiters place clueTip body text on separate lines
                ***************************************/
                if (tipParts) {
                    for (var i = 0; i < tipParts.length; i++) {
                        if (i == 0) {
                            $cluetipInner.html(tipParts[i]);
                        } else {
                            $cluetipInner.append('<div class="split-body">' + tipParts[i] + '</div>');
                        }
                    };
                    cluetipShow(pY);
                }
                /***************************************
                * load external file via ajax          
                ***************************************/
                else if (!defaults.local && tipAttribute.indexOf('#') != 0) {
                    if (cluetipContents && defaults.ajaxCache) {
                        $cluetipInner.html(cluetipContents);
                        cluetipShow(pY);
                    }
                    else {
                        var ajaxSettings = defaults.ajaxSettings;
                        ajaxSettings.url = tipAttribute;
                        ajaxSettings.beforeSend = function() {
                            $cluetipOuter.children().empty();
                            if (defaults.waitImage) {
                                $('#cluetip-waitimage')
              .css({ top: mouseY - 10, left: parseInt(posX + (tipWidth / 2), 10) })
              .show();
                            }
                        };
                        ajaxSettings.error = function() {
                            if (isActive) {
                                $cluetipInner.html('<i>sorry, the contents could not be loaded</i>');
                            }
                        };
                        ajaxSettings.success = function(data) {
                            cluetipContents = defaults.ajaxProcess(data);
                            if (isActive) {
                                $cluetipInner.html(cluetipContents);
                            }
                        };
                        ajaxSettings.complete = function() {
                            imgCount = $('#cluetip-inner img').length;
                            if (imgCount) {
                                $('#cluetip-inner img').load(function() {
                                    imgCount--;
                                    if (imgCount < 1) {
                                        $('#cluetip-waitimage').hide();
                                        if (isActive) cluetipShow(pY);
                                    }
                                });
                            } else {
                                $('#cluetip-waitimage').hide();
                                if (isActive) cluetipShow(pY);
                            }
                        };
                        $.ajax(ajaxSettings);
                    }

                    /***************************************
                    * load an element from the same page
                    ***************************************/
                } else if (defaults.local) {
                    var $localContent = $(tipAttribute + ':first');
                    var localCluetip = $.fn.wrapInner ? $localContent.wrapInner('<div></div>').children().clone(true) : $localContent.html();
                    $.fn.wrapInner ? $cluetipInner.empty().append(localCluetip) : $cluetipInner.html(localCluetip);
                    cluetipShow(pY);
                }
            };

            // get dimensions and options for cluetip and prepare it to be shown
            var cluetipShow = function(bpY) {
                $cluetip.addClass('cluetip-' + ctClass);

                if (defaults.truncate) {
                    var $truncloaded = $cluetipInner.text().slice(0, defaults.truncate) + '...';
                    $cluetipInner.html($truncloaded);
                }
                function doNothing() { }; //empty function
                tipTitle ? $cluetipTitle.show().html(tipTitle) : (defaults.showTitle) ? $cluetipTitle.show().html('&nbsp;') : $cluetipTitle.hide();
                if (defaults.sticky) {
                    var $closeLink = $('<div id="cluetip-close"><a href="#">' + defaults.closeText + '</a></div>');
                    (defaults.closePosition == 'bottom') ? $closeLink.appendTo($cluetipInner) : (defaults.closePosition == 'title') ? $closeLink.prependTo($cluetipTitle) : $closeLink.prependTo($cluetipInner);
                    $closeLink.click(function() {
                        cluetipClose();
                        return false;
                    });
                    if (defaults.mouseOutClose) {
                        $cluetip.hover(function() { doNothing(); },
          function() { $closeLink.trigger('click'); });
                    } else {
                        $cluetip.unbind('mouseout');
                    }
                }
                // now that content is loaded, finish the positioning 
                var direction = '';
                $cluetipOuter.css({ overflow: defHeight == 'auto' ? 'visible' : 'auto', height: defHeight });
                tipHeight = defHeight == 'auto' ? $cluetip.outerHeight() : parseInt(defHeight, 10);
                tipY = posY;
                if (defaults.positionBy == 'fixed') {
                    tipY = posY - defaults.dropShadowSteps + tOffset;
                } else if ((posX < mouseX && Math.max(posX, 0) + tipWidth > mouseX) || defaults.positionBy == 'bottomTop') {
                    if (posY + tipHeight + tOffset > sTop + wHeight && mouseY - sTop > tipHeight + tOffset) {
                        tipY = mouseY - tipHeight - tOffset;
                        direction = 'top';
                    } else {
                        tipY = mouseY + tOffset;
                        direction = 'bottom';
                    }
                } else if (posY + tipHeight + tOffset > sTop + wHeight) {
                    tipY = (tipHeight >= wHeight) ? sTop : sTop + wHeight - tipHeight - tOffset;
                } else if ($this.css('display') == 'block' || $this[0].tagName.toLowerCase() == 'area' || defaults.positionBy == "mouse") {
                    tipY = bpY - tOffset;
                } else {
                    tipY = posY - defaults.dropShadowSteps;
                }
                if (direction == '') {
                    posX < linkLeft ? direction = 'left' : direction = 'right';
                }
                $cluetip.css({ top: tipY + 'px' }).removeClass().addClass('clue-' + direction + '-' + ctClass).addClass(' cluetip-' + ctClass);
                if (defaults.arrows) { // set up background positioning to align with element
                    var bgY = (posY - tipY - defaults.dropShadowSteps);
                    $cluetipArrows.css({ top: (/(left|right)/.test(direction) && posX >= 0 && bgY > 0) ? bgY + 'px' : /(left|right)/.test(direction) ? 0 : '' }).show();
                } else {
                    $cluetipArrows.hide();
                }

                // (first hide, then) ***SHOW THE CLUETIP***
                $dropShadow.hide();
                $cluetip.hide()[defaults.fx.open](defaults.fx.open != 'show' && defaults.fx.openSpeed);
                if (defaults.dropShadow) $dropShadow.css({ height: tipHeight, width: defaults.width }).show();
                // trigger the optional onShow function
                defaults.onShow($cluetip, $cluetipInner);
            };

            /***************************************
            =INACTIVATION
            -------------------------------------- */
            var inactivate = function() {
                isActive = false;
                $('#cluetip-waitimage').hide();
                if (!defaults.sticky) {
                    cluetipClose();
                };
                if (defaults.hoverClass) {
                    $this.removeClass(defaults.hoverClass);
                }
            };
            // close cluetip and reset some things
            var cluetipClose = function() {
                $cluetipOuter
      .parent().hide().removeClass().end()
      .children().empty();
                if (tipTitle) {
                    $this.attr('title', tipTitle);
                }
                $this.css('cursor', '');
                if (defaults.arrows) $cluetipArrows.css({ top: '' });
            };

            /***************************************
            =BIND EVENTS
            -------------------------------------- */
            // activate by click
            if (defaults.activation == 'click' || defaults.activation == 'toggle') {
                $this.click(function(event) {
                    if ($cluetip.is(':hidden')) {
                        activate(event);
                    } else {
                        inactivate(event);
                    }
                    this.blur();
                    return false;
                });
                // activate by hover
                // clicking is returned false if cluetip url is same as href url
            } else {
                $this.click(function() {
                    if (tipAttribute == $this.attr('href')) {
                        return false;
                    }
                });
                if ($.fn.hoverIntent && defaults.hoverIntent) {
                    $this.hoverIntent({
                        sensitivity: defaults.hoverIntent.sensitivity,
                        interval: defaults.hoverIntent.interval,
                        over: function(event) { activate(event); },
                        timeout: defaults.hoverIntent.timeout,
                        out: function(event) { inactivate(event); }
                    });
                } else {
                    $this.hover(function(event) {
                        activate(event);
                    }, function(event) {
                        inactivate(event);
                    });
                }
            }
        });
    };

    /*
    * Global defaults for clueTips. Apply to all calls to the clueTip plugin.
    *
    * @example $.cluetip.setup({
    *   insertionType: 'prependTo',
    *   insertionElement: '#container'
    * });
    * 
    * @property
    * @name $.cluetip.setup
    * @type Map
    * @cat Plugins/tooltip
    * @option String insertionType: Default is 'appendTo'. Determines the method to be used for inserting the clueTip into the DOM. Permitted values are 'appendTo', 'prependTo', 'insertBefore', and 'insertAfter'
    * @option String insertionElement: Default is 'body'. Determines which element in the DOM the plugin will reference when inserting the clueTip.
    *
    */

    var insertionType = 'appendTo', insertionElement = 'body';
    $.cluetip = {};
    $.cluetip.setup = function(options) {
        if (options && options.insertionType && (options.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)) {
            insertionType = options.insertionType;
        }
        if (options && options.insertionElement) {
            insertionElement = options.insertionElement;
        }
    };
})(jQuery);
/* ***************************************************************** */
/*!
* http://www.shamasis.net/projects/ga/
* Refer jquery.ga.debug.js
* Revision: 13
*/
(function($) { $.ga = {}; $.ga.load = function(uid, callback) { jQuery.ajax({ type: 'GET', url: (document.location.protocol == "https:" ? "https://ssl" : "http://www") + '.google-analytics.com/ga.js', cache: true, success: function() { if (typeof _gat == undefined) { throw "_gat has not been defined"; } t = _gat._getTracker(uid); bind(); if ($.isFunction(callback)) { callback(t) } t._trackPageview() }, dataType: 'script', data: null }) }; var t; var bind = function() { if (noT()) { throw "pageTracker has not been defined"; } for (var $1 in t) { if ($1.charAt(0) != '_') continue; $.ga[$1.substr(1)] = t[$1] } }; var noT = function() { return t == undefined } })(jQuery);
/* ***************************************************************** */
/*!
* jQuery Google Analytics Plugin
* jquery.ga.js
* http://www.shamasis.net/projects/ga/
*
* Copyright (c) 2009 Shamasis Bhattacharya
* Complies and conforms to all jQuery licensing schemes.
* http://docs.jquery.com/License
*
* Date: 2009-08-23
* Revision: 13
*/

(function($) {

    /**
    * Contains the various Google Analytics routines.
    *
    * @code
    * $(document).ready(function() {
    *    $.ga.load('UA-0000000-0');
    * });
    *
    *
    * @id jQuery.ga
    * @return Nothing
    * @type undefined
    * @since 1.0
    * @compat=IE6|IE7|IE8|FF1|FF2|FF3|OPERA|SAFARI2|SAFARI3|KONQ
    */
    $.ga = {};

    /**
    * Loads the Google Analytics core tracking scripts (ga.js) and other
    * routines.
    *
    * @code
    * $(document).ready(function() {
    *    $.ga.load('UA-0000000-0');
    * });
    *
    *
    * @param {String} uid Google Anayltics account id that will be used to
    * report analysis. The account it somewhat looks like "UA-0000000-0".
    * 
    * @param {Function} callback
    *
    * @id jQuery.ga.load
    * @return Nothing
    * @type undefined
    * @since 1.0
    * @compat=IE6|IE7|IE8|FF1|FF2|FF3|OPERA|SAFARI2|SAFARI3|KONQ
    */
    $.ga.load = function(uid, callback) {

        jQuery.ajax({
            type: 'GET',
            url: (document.location.protocol == "https:" ?
                "https://ssl" : "http://www") + '.google-analytics.com/ga.js',
            cache: true,
            success: function() {

                // check whether _gat is undefined
                if (typeof _gat == undefined) {
                    throw "_gat has not been defined";
                }

                // create a new tracker
                t = _gat._getTracker(uid);

                // map all underscore functions of tracker to $.ga
                bind();

                // call the callback function for user to do whatever
                // required.
                if ($.isFunction(callback)) {
                    callback(t);
                }

                // initialize GATC
                t._trackPageview();
            },
            dataType: 'script',
            data: null
        });
    };


    /**
    *  The pageTracker variable, holding the pageTracker retrieved from _gat
    *  @access: private
    */
    var t;

    /**
    *  Maps all user API of pageTracker to $.ga.* after dropping the
    *  underscore.
    *  @access: private
    */
    var bind = function() {

        // check whether tracker exists
        if (noT()) {
            throw "pageTracker has not been defined";
        }

        // for each function of tracker that starts with underscore, map it to
        // $.ga.* after dropping the underscore.
        for (var $1 in t) {
            if ($1.charAt(0) != '_') continue;
            $.ga[$1.substr(1)] = t[$1];
        }
    };

    /**
    *  Returns whether pageTracker has been defined or not after the launch of
    *  core GATC logic.
    *  @access: private
    *  @type Boolean
    */
    var noT = function() {
        return t == undefined;
    };


})(jQuery);
/* ***************************************************************** */
/*
* jQuery resize event - v1.1 - 3/14/2010
* http://benalman.com/projects/jquery-resize-plugin/
* 
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function($, h, c) { var a = $([]), e = $.resize = $.extend($.resize, {}), i, k = "setTimeout", j = "resize", d = j + "-special-event", b = "delay", f = "throttleWindow"; e[b] = 250; e[f] = true; $.event.special[j] = { setup: function() { if (!e[f] && this[k]) { return false } var l = $(this); a = a.add(l); $.data(this, d, { w: l.width(), h: l.height() }); if (a.length === 1) { g() } }, teardown: function() { if (!e[f] && this[k]) { return false } var l = $(this); a = a.not(l); l.removeData(d); if (!a.length) { clearTimeout(i) } }, add: function(l) { if (!e[f] && this[k]) { return false } var n; function m(s, o, p) { var q = $(this), r = $.data(this, d); r.w = o !== c ? o : q.width(); r.h = p !== c ? p : q.height(); n.apply(this, arguments) } if ($.isFunction(l)) { n = l; return m } else { n = l.handler; l.handler = m } } }; function g() { i = h[k](function() { a.each(function() { var n = $(this), m = n.width(), l = n.height(), o = $.data(this, d); if (m !== o.w || l !== o.h) { n.trigger(j, [o.w = m, o.h = l]) } }); g() }, e[b]) } })(jQuery, this);
/* ***************************************************************** */
/*!
* jQuery miniZoomPan 1.0
* 2009 Gian Carlo Mingati
* Version: 1.0 (18-JUNE-2009)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Requires:
* jQuery v1.3.2 or later
* 
*/
jQuery.fn.miniZoomPan = function(settings) {

    settings = jQuery.extend({
        sW: 10, // small image width
        sH: 10, // small image height
        lW: 20, // large image width
        lH: 20, // large image height
        frameColor: "#cecece",
        frameWidth: 0,
        loaderContent: "loading...", // plain text or an image tag eg.: "<img src='yoursite.com/spinner.gif' />"
        zoom: false,
        vpW: settings.sW, // image viewport width , default width = width of small image
        vpH: settings.sH,  // image vierport height, default height = height of small image
        previewImageTitle: "Click to zoom in",
        zoomImageTitle: "Click to zoom out",
        callback: function() { ; }
    }, settings);

    return this.each(function() {

        var div = jQuery(this);
        div.data = { zoom: false };
        div.css({ "width": settings.vpW, "height": settings.vpH, "border": settings.frameWidth + "px solid " + settings.frameColor }).addClass("minizoompan");
        var ig = div.children();
        ig.attr("title", settings.previewImageTitle);
        ig.css({ "cursor": "-moz-zoom-in" });
        ig.data = { "loading": false };
        div.css({ overflow: "hidden" });
        jQuery("<span class='loader'>" + settings.loaderContent + "<\/span>").insertBefore(ig);

        div.mousemove(function(e) {
            if (div.data.zoom == true) {
                panImage(e.pageX, e.pageY)
            }
        });

        ig.click(
			function(e) {
			    var img = jQuery(this);
			    if (img.data.loading == true)
			        return;
			    img.data.loading = true;
			    if (div.data.zoom == false) {
			        var hiSrc = img.attr("src").replace(/filetype=normal/, 'filetype=zoom');
			        swapImage(img, hiSrc, true, e.pageX, e.pageY);
			    }
			    else {
			        var loSrc = img.attr("src").replace(/filetype=zoom/, 'filetype=normal');
			        swapImage(img, loSrc, false);
			    }
			    return false;
			}
		);
        ig.bind('swap', function(event, uri) {
            var img = jQuery(this);
            img.data.loading = true;
            div.children("span.loader").show();
            swapImage(img, uri.toString(), false);
        });

        function panImage(pageX, pageY) {
            var divWidth = div.width();
            var divHeight = div.height();
            var igW = settings.lW;
            var igH = settings.lH;
            var dOs = div.offset();
            var leftPan = (pageX - dOs.left) * (divWidth - igW) / (divWidth + settings.frameWidth * 2);
            var topPan = (pageY - dOs.top) * (divHeight - igH) / (divHeight + settings.frameWidth * 2);
            ig.css({ left: leftPan, top: topPan });
        }

        function swapImage(img, uri, hires, pageX, pageY) {
            div.children("span.loader").show();
            img.css({ "cursor": "progress" });
            img.load(function() {
                div.children("span.loader").hide();
                if (hires == true) {
                    div.data.zoom = true;
                    img.css({ "position": "relative", "margin-left": "0", "left": "0", "width": settings.lW, "height": settings.lH });
                    img.css({ "cursor": "move" });
                    panImage(pageX, pageY);
                    img.attr("title", settings.zoomImageTitle);
                }
                else {
                    div.data.zoom = false;
                    img.css({ left: "0", top: "0", "width": settings.sW, "height": settings.sH });
                    if ((jQuery.browser.msie == true) || (jQuery.browser.webkit == true))
                        img.css({ "cursor": "pointer" });
                    else
                        img.css({ "cursor": "-moz-zoom-in" });
                    settings.callback();
                    img.attr("title", settings.previewImageTitle);
                }
                img.data.loading = false;
            }).error(function() {
                ;  //alert("Image does not exist or its SRC is not correct.");
            }).attr('src', uri);
        }
    });
};
/* ***************************************************************** */
/*
* jquery.tools 1.1.2 - The missing UI library for the Web
* 
* [tools.tabs-1.0.4, tools.tabs.slideshow-1.0.2, tools.tabs.history-1.0.2, tools.tooltip-1.1.3, tools.tooltip.dynamic-1.0.1, tools.scrollable-1.1.2, tools.scrollable.circular-0.5.1, tools.scrollable.autoscroll-1.0.1, tools.scrollable.mousewheel-1.0.1, tools.overlay-1.1.2, tools.overlay.gallery-1.0.0, tools.expose-1.0.5, tools.flashembed-1.0.4]
* 
* Copyright (c) 2009 Tero Piirainen
* http://flowplayer.org/tools/
*
* Dual licensed under MIT and GPL 2+ licenses
* http://www.opensource.org/licenses
* 
* -----
* 
* jquery.event.wheel.js - rev 1 
* Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
* Liscensed under the MIT License (MIT-LICENSE.txt)
* http://www.opensource.org/licenses/mit-license.php
* Created: 2008-07-01 | Updated: 2008-07-14
* 
* -----
* 
* File generated: Mon Apr 26 12:00:24 GMT 2010
*/
(function(d) { d.tools = d.tools || {}; d.tools.tabs = { version: "1.0.4", conf: { tabs: "a", current: "current", onBeforeClick: null, onClick: null, effect: "default", initialIndex: 0, event: "click", api: false, rotate: false }, addEffect: function(e, f) { c[e] = f } }; var c = { "default": function(f, e) { this.getPanes().hide().eq(f).show(); e.call() }, fade: function(g, e) { var f = this.getConf(), j = f.fadeOutSpeed, h = this.getPanes(); if (j) { h.fadeOut(j) } else { h.hide() } h.eq(g).fadeIn(f.fadeInSpeed, e) }, slide: function(f, e) { this.getPanes().slideUp(200); this.getPanes().eq(f).slideDown(400, e) }, ajax: function(f, e) { this.getPanes().eq(0).load(this.getTabs().eq(f).attr("href"), e) } }; var b; d.tools.tabs.addEffect("horizontal", function(f, e) { if (!b) { b = this.getPanes().eq(0).width() } this.getCurrentPane().animate({ width: 0 }, function() { d(this).hide() }); this.getPanes().eq(f).animate({ width: b }, function() { d(this).show(); e.call() }) }); function a(g, h, f) { var e = this, j = d(this), i; d.each(f, function(k, l) { if (d.isFunction(l)) { j.bind(k, l) } }); d.extend(this, { click: function(k, n) { var o = e.getCurrentPane(); var l = g.eq(k); if (typeof k == "string" && k.replace("#", "")) { l = g.filter("[href*=" + k.replace("#", "") + "]"); k = Math.max(g.index(l), 0) } if (f.rotate) { var m = g.length - 1; if (k < 0) { return e.click(m, n) } if (k > m) { return e.click(0, n) } } if (!l.length) { if (i >= 0) { return e } k = f.initialIndex; l = g.eq(k) } if (k === i) { return e } n = n || d.Event(); n.type = "onBeforeClick"; j.trigger(n, [k]); if (n.isDefaultPrevented()) { return } c[f.effect].call(e, k, function() { n.type = "onClick"; j.trigger(n, [k]) }); n.type = "onStart"; j.trigger(n, [k]); if (n.isDefaultPrevented()) { return } i = k; g.removeClass(f.current); l.addClass(f.current); return e }, getConf: function() { return f }, getTabs: function() { return g }, getPanes: function() { return h }, getCurrentPane: function() { return h.eq(i) }, getCurrentTab: function() { return g.eq(i) }, getIndex: function() { return i }, next: function() { return e.click(i + 1) }, prev: function() { return e.click(i - 1) }, bind: function(k, l) { j.bind(k, l); return e }, onBeforeClick: function(k) { return this.bind("onBeforeClick", k) }, onClick: function(k) { return this.bind("onClick", k) }, unbind: function(k) { j.unbind(k); return e } }); g.each(function(k) { d(this).bind(f.event, function(l) { e.click(k, l); return false }) }); if (location.hash) { e.click(location.hash) } else { if (f.initialIndex === 0 || f.initialIndex > 0) { e.click(f.initialIndex) } } h.find("a[href^=#]").click(function(k) { e.click(d(this).attr("href"), k) }) } d.fn.tabs = function(i, f) { var g = this.eq(typeof f == "number" ? f : 0).data("tabs"); if (g) { return g } if (d.isFunction(f)) { f = { onBeforeClick: f} } var h = d.extend({}, d.tools.tabs.conf), e = this.length; f = d.extend(h, f); this.each(function(l) { var j = d(this); var k = j.find(f.tabs); if (!k.length) { k = j.children() } var m = i.jquery ? i : j.children(i); if (!m.length) { m = e == 1 ? d(i) : j.parent().find(i) } g = new a(k, m, f); j.data("tabs", g) }); return f.api ? g : this } })(jQuery);
(function(b) { var a = b.tools.tabs; a.plugins = a.plugins || {}; a.plugins.slideshow = { version: "1.0.2", conf: { next: ".forward", prev: ".backward", disabledClass: "disabled", autoplay: false, autopause: true, interval: 3000, clickable: true, api: false} }; b.prototype.slideshow = function(e) { var f = b.extend({}, a.plugins.slideshow.conf), c = this.length, d; e = b.extend(f, e); this.each(function() { var p = b(this), m = p.tabs(), i = b(m), o = m; b.each(e, function(t, u) { if (b.isFunction(u)) { m.bind(t, u) } }); function n(t) { return c == 1 ? b(t) : p.parent().find(t) } var s = n(e.next).click(function() { m.next() }); var q = n(e.prev).click(function() { m.prev() }); var h, j, l, g = false; b.extend(m, { play: function() { if (h) { return } var t = b.Event("onBeforePlay"); i.trigger(t); if (t.isDefaultPrevented()) { return m } g = false; h = setInterval(m.next, e.interval); i.trigger("onPlay"); m.next() }, pause: function() { if (!h) { return m } var t = b.Event("onBeforePause"); i.trigger(t); if (t.isDefaultPrevented()) { return m } h = clearInterval(h); l = clearInterval(l); i.trigger("onPause") }, stop: function() { m.pause(); g = true }, onBeforePlay: function(t) { return m.bind("onBeforePlay", t) }, onPlay: function(t) { return m.bind("onPlay", t) }, onBeforePause: function(t) { return m.bind("onBeforePause", t) }, onPause: function(t) { return m.bind("onPause", t) } }); if (e.autopause) { var k = m.getTabs().add(s).add(q).add(m.getPanes()); k.hover(function() { m.pause(); j = clearInterval(j) }, function() { if (!g) { j = setTimeout(m.play, e.interval) } }) } if (e.autoplay) { l = setTimeout(m.play, e.interval) } else { m.stop() } if (e.clickable) { m.getPanes().click(function() { m.next() }) } if (!m.getConf().rotate) { var r = e.disabledClass; if (!m.getIndex()) { q.addClass(r) } m.onBeforeClick(function(u, t) { if (!t) { q.addClass(r) } else { q.removeClass(r); if (t == m.getTabs().length - 1) { s.addClass(r) } else { s.removeClass(r) } } }) } }); return e.api ? d : this } })(jQuery);
(function(d) { var a = d.tools.tabs; a.plugins = a.plugins || {}; a.plugins.history = { version: "1.0.2", conf: { api: false} }; var e, b; function c(f) { if (f) { var g = b.contentWindow.document; g.open().close(); g.location.hash = f } } d.fn.onHash = function(g) { var f = this; if (d.browser.msie && d.browser.version < "8") { if (!b) { b = d("<iframe/>").attr("src", "javascript:false;").hide().get(0); d("body").append(b); setInterval(function() { var i = b.contentWindow.document, j = i.location.hash; if (e !== j) { d.event.trigger("hash", j); e = j } }, 100); c(location.hash || "#") } f.bind("click.hash", function(h) { c(d(this).attr("href")) }) } else { setInterval(function() { var j = location.hash; var i = f.filter("[href$=" + j + "]"); if (!i.length) { j = j.replace("#", ""); i = f.filter("[href$=" + j + "]") } if (i.length && j !== e) { e = j; d.event.trigger("hash", j) } }, 100) } d(window).bind("hash", g); return this }; d.fn.history = function(g) { var h = d.extend({}, a.plugins.history.conf), f; g = d.extend(h, g); this.each(function() { var j = d(this).tabs(), i = j.getTabs(); if (j) { f = j } i.onHash(function(k, l) { if (!l || l == "#") { l = j.getConf().initialIndex } j.click(l) }); i.click(function(k) { location.hash = d(this).attr("href").replace("#", "") }) }); return g.api ? f : this } })(jQuery);
(function(c) { var d = []; c.tools = c.tools || {}; c.tools.tooltip = { version: "1.1.3", conf: { effect: "toggle", fadeOutSpeed: "fast", tip: null, predelay: 0, delay: 30, opacity: 1, lazy: undefined, position: ["top", "center"], offset: [0, 0], cancelDefault: true, relative: false, oneInstance: true, events: { def: "mouseover,mouseout", input: "focus,blur", widget: "focus mouseover,blur mouseout", tooltip: "mouseover,mouseout" }, api: false }, addEffect: function(e, g, f) { b[e] = [g, f] } }; var b = { toggle: [function(e) { var f = this.getConf(), g = this.getTip(), h = f.opacity; if (h < 1) { g.css({ opacity: h }) } g.show(); e.call() }, function(e) { this.getTip().hide(); e.call() } ], fade: [function(e) { this.getTip().fadeIn(this.getConf().fadeInSpeed, e) }, function(e) { this.getTip().fadeOut(this.getConf().fadeOutSpeed, e) } ] }; function a(f, g) { var p = this, k = c(this); f.data("tooltip", p); var l = f.next(); if (g.tip) { l = c(g.tip); if (l.length > 1) { l = f.nextAll(g.tip).eq(0); if (!l.length) { l = f.parent().nextAll(g.tip).eq(0) } } } function o(u) { var t = g.relative ? f.position().top : f.offset().top, s = g.relative ? f.position().left : f.offset().left, v = g.position[0]; t -= l.outerHeight() - g.offset[0]; s += f.outerWidth() + g.offset[1]; var q = l.outerHeight() + f.outerHeight(); if (v == "center") { t += q / 2 } if (v == "bottom") { t += q } v = g.position[1]; var r = l.outerWidth() + f.outerWidth(); if (v == "center") { s -= r / 2 } if (v == "left") { s -= r } return { top: t, left: s} } var i = f.is(":input"), e = i && f.is(":checkbox, :radio, select, :button"), h = f.attr("type"), n = g.events[h] || g.events[i ? (e ? "widget" : "input") : "def"]; n = n.split(/,\s*/); if (n.length != 2) { throw "Tooltip: bad events configuration for " + h } f.bind(n[0], function(r) { if (g.oneInstance) { c.each(d, function() { this.hide() }) } var q = l.data("trigger"); if (q && q[0] != this) { l.hide().stop(true, true) } r.target = this; p.show(r); n = g.events.tooltip.split(/,\s*/); l.bind(n[0], function() { p.show(r) }); if (n[1]) { l.bind(n[1], function() { p.hide(r) }) } }); f.bind(n[1], function(q) { p.hide(q) }); if (!c.browser.msie && !i && !g.predelay) { f.mousemove(function() { if (!p.isShown()) { f.triggerHandler("mouseover") } }) } if (g.opacity < 1) { l.css("opacity", g.opacity) } var m = 0, j = f.attr("title"); if (j && g.cancelDefault) { f.removeAttr("title"); f.data("title", j) } c.extend(p, { show: function(r) { if (r) { f = c(r.target) } clearTimeout(l.data("timer")); if (l.is(":animated") || l.is(":visible")) { return p } function q() { l.data("trigger", f); var t = o(r); if (g.tip && j) { l.html(f.data("title")) } r = r || c.Event(); r.type = "onBeforeShow"; k.trigger(r, [t]); if (r.isDefaultPrevented()) { return p } t = o(r); l.css({ position: "absolute", top: t.top, left: t.left }); var s = b[g.effect]; if (!s) { throw 'Nonexistent effect "' + g.effect + '"' } s[0].call(p, function() { r.type = "onShow"; k.trigger(r) }) } if (g.predelay) { clearTimeout(m); m = setTimeout(q, g.predelay) } else { q() } return p }, hide: function(r) { clearTimeout(l.data("timer")); clearTimeout(m); if (!l.is(":visible")) { return } function q() { r = r || c.Event(); r.type = "onBeforeHide"; k.trigger(r); if (r.isDefaultPrevented()) { return } b[g.effect][1].call(p, function() { r.type = "onHide"; k.trigger(r) }) } if (g.delay && r) { l.data("timer", setTimeout(q, g.delay)) } else { q() } return p }, isShown: function() { return l.is(":visible, :animated") }, getConf: function() { return g }, getTip: function() { return l }, getTrigger: function() { return f }, bind: function(q, r) { k.bind(q, r); return p }, onHide: function(q) { return this.bind("onHide", q) }, onBeforeShow: function(q) { return this.bind("onBeforeShow", q) }, onShow: function(q) { return this.bind("onShow", q) }, onBeforeHide: function(q) { return this.bind("onBeforeHide", q) }, unbind: function(q) { k.unbind(q); return p } }); c.each(g, function(q, r) { if (c.isFunction(r)) { p.bind(q, r) } }) } c.prototype.tooltip = function(e) { var f = this.eq(typeof e == "number" ? e : 0).data("tooltip"); if (f) { return f } var g = c.extend(true, {}, c.tools.tooltip.conf); if (c.isFunction(e)) { e = { onBeforeShow: e} } else { if (typeof e == "string") { e = { tip: e} } } e = c.extend(true, g, e); if (typeof e.position == "string") { e.position = e.position.split(/,?\s/) } if (e.lazy !== false && (e.lazy === true || this.length > 20)) { this.one("mouseover", function(h) { f = new a(c(this), e); f.show(h); d.push(f) }) } else { this.each(function() { f = new a(c(this), e); d.push(f) }) } return e.api ? f : this } })(jQuery);
(function(d) { var c = d.tools.tooltip; c.plugins = c.plugins || {}; c.plugins.dynamic = { version: "1.0.1", conf: { api: false, classNames: "top right bottom left"} }; function b(h) { var e = d(window); var g = e.width() + e.scrollLeft(); var f = e.height() + e.scrollTop(); return [h.offset().top <= e.scrollTop(), g <= h.offset().left + h.width(), f <= h.offset().top + h.height(), e.scrollLeft() >= h.offset().left] } function a(f) { var e = f.length; while (e--) { if (f[e]) { return false } } return true } d.fn.dynamic = function(g) { var h = d.extend({}, c.plugins.dynamic.conf), f; if (typeof g == "number") { g = { speed: g} } g = d.extend(h, g); var e = g.classNames.split(/\s/), i; this.each(function() { if (d(this).tooltip().jquery) { throw "Lazy feature not supported by dynamic plugin. set lazy: false for tooltip" } var j = d(this).tooltip().onBeforeShow(function(n, o) { var m = this.getTip(), l = this.getConf(); if (!i) { i = [l.position[0], l.position[1], l.offset[0], l.offset[1], d.extend({}, l)] } d.extend(l, i[4]); l.position = [i[0], i[1]]; l.offset = [i[2], i[3]]; m.css({ visibility: "hidden", position: "absolute", top: o.top, left: o.left }).show(); var k = b(m); if (!a(k)) { if (k[2]) { d.extend(l, g.top); l.position[0] = "top"; m.addClass(e[0]) } if (k[3]) { d.extend(l, g.right); l.position[1] = "right"; m.addClass(e[1]) } if (k[0]) { d.extend(l, g.bottom); l.position[0] = "bottom"; m.addClass(e[2]) } if (k[1]) { d.extend(l, g.left); l.position[1] = "left"; m.addClass(e[3]) } if (k[0] || k[2]) { l.offset[0] *= -1 } if (k[1] || k[3]) { l.offset[1] *= -1 } } m.css({ visibility: "visible" }).hide() }); j.onShow(function() { var l = this.getConf(), k = this.getTip(); l.position = [i[0], i[1]]; l.offset = [i[2], i[3]] }); j.onHide(function() { var k = this.getTip(); k.removeClass(g.classNames) }); f = j }); return g.api ? f : this } })(jQuery);
(function(b) { b.tools = b.tools || {}; b.tools.scrollable = { version: "1.1.2", conf: { size: 5, vertical: false, speed: 400, keyboard: true, keyboardSteps: null, disabledClass: "disabled", hoverClass: null, clickable: true, activeClass: "active", easing: "swing", loop: false, items: ".items", item: null, prev: ".prev", next: ".next", prevPage: ".prevPage", nextPage: ".nextPage", api: false} }; var c; function a(o, m) { var r = this, p = b(this), d = !m.vertical, e = o.children(), k = 0, i; if (!c) { c = r } b.each(m, function(s, t) { if (b.isFunction(t)) { p.bind(s, t) } }); if (e.length > 1) { e = b(m.items, o) } function l(t) { var s = b(t); return m.globalNav ? s : o.parent().find(t) } o.data("finder", l); var f = l(m.prev), h = l(m.next), g = l(m.prevPage), n = l(m.nextPage); b.extend(r, { getIndex: function() { return k }, getClickIndex: function() { var s = r.getItems(); return s.index(s.filter("." + m.activeClass)) }, getConf: function() { return m }, getSize: function() { return r.getItems().size() }, getPageAmount: function() { return Math.ceil(this.getSize() / m.size) }, getPageIndex: function() { return Math.ceil(k / m.size) }, getNaviButtons: function() { return f.add(h).add(g).add(n) }, getRoot: function() { return o }, getItemWrap: function() { return e }, getItems: function() { return e.children(m.item) }, getVisibleItems: function() { return r.getItems().slice(k, k + m.size) }, seekTo: function(s, w, t) { if (s < 0) { s = 0 } if (k === s) { return r } if (b.isFunction(w)) { t = w } if (s > r.getSize() - m.size) { return m.loop ? r.begin() : this.end() } var u = r.getItems().eq(s); if (!u.length) { return r } var v = b.Event("onBeforeSeek"); p.trigger(v, [s]); if (v.isDefaultPrevented()) { return r } if (w === undefined || b.isFunction(w)) { w = m.speed } function x() { if (t) { t.call(r, s) } p.trigger("onSeek", [s]) } if (d) { e.animate({ left: -u.position().left }, w, m.easing, x) } else { e.animate({ top: -u.position().top }, w, m.easing, x) } c = r; k = s; v = b.Event("onStart"); p.trigger(v, [s]); if (v.isDefaultPrevented()) { return r } f.add(g).toggleClass(m.disabledClass, s === 0); h.add(n).toggleClass(m.disabledClass, s >= r.getSize() - m.size); return r }, move: function(u, t, s) { i = u > 0; return this.seekTo(k + u, t, s) }, next: function(t, s) { return this.move(1, t, s) }, prev: function(t, s) { return this.move(-1, t, s) }, movePage: function(w, v, u) { i = w > 0; var s = m.size * w; var t = k % m.size; if (t > 0) { s += (w > 0 ? -t : m.size - t) } return this.move(s, v, u) }, prevPage: function(t, s) { return this.movePage(-1, t, s) }, nextPage: function(t, s) { return this.movePage(1, t, s) }, setPage: function(t, u, s) { return this.seekTo(t * m.size, u, s) }, begin: function(t, s) { i = false; return this.seekTo(0, t, s) }, end: function(t, s) { i = true; var u = this.getSize() - m.size; return u > 0 ? this.seekTo(u, t, s) : r }, reload: function() { p.trigger("onReload"); return r }, focus: function() { c = r; return r }, click: function(u) { var v = r.getItems().eq(u), s = m.activeClass, t = m.size; if (u < 0 || u >= r.getSize()) { return r } if (t == 1) { if (m.loop) { return r.next() } if (u === 0 || u == r.getSize() - 1) { i = (i === undefined) ? true : !i } return i === false ? r.prev() : r.next() } if (t == 2) { if (u == k) { u-- } r.getItems().removeClass(s); v.addClass(s); return r.seekTo(u, time, fn) } if (!v.hasClass(s)) { r.getItems().removeClass(s); v.addClass(s); var x = Math.floor(t / 2); var w = u - x; if (w > r.getSize() - t) { w = r.getSize() - t } if (w !== u) { return r.seekTo(w) } } return r }, bind: function(s, t) { p.bind(s, t); return r }, unbind: function(s) { p.unbind(s); return r } }); b.each("onBeforeSeek,onStart,onSeek,onReload".split(","), function(s, t) { r[t] = function(u) { return r.bind(t, u) } }); f.addClass(m.disabledClass).click(function() { r.prev() }); h.click(function() { r.next() }); n.click(function() { r.nextPage() }); if (r.getSize() < m.size) { h.add(n).addClass(m.disabledClass) } g.addClass(m.disabledClass).click(function() { r.prevPage() }); var j = m.hoverClass, q = "keydown." + Math.random().toString().substring(10); r.onReload(function() { if (j) { r.getItems().hover(function() { b(this).addClass(j) }, function() { b(this).removeClass(j) }) } if (m.clickable) { r.getItems().each(function(s) { b(this).unbind("click.scrollable").bind("click.scrollable", function(t) { if (b(t.target).is("a")) { return } return r.click(s) }) }) } if (m.keyboard) { b(document).unbind(q).bind(q, function(t) { if (t.altKey || t.ctrlKey) { return } if (m.keyboard != "static" && c != r) { return } var u = m.keyboardSteps; if (d && (t.keyCode == 37 || t.keyCode == 39)) { r.move(t.keyCode == 37 ? -u : u); return t.preventDefault() } if (!d && (t.keyCode == 38 || t.keyCode == 40)) { r.move(t.keyCode == 38 ? -u : u); return t.preventDefault() } return true }) } else { b(document).unbind(q) } }); r.reload() } b.fn.scrollable = function(d) { var e = this.eq(typeof d == "number" ? d : 0).data("scrollable"); if (e) { return e } var f = b.extend({}, b.tools.scrollable.conf); d = b.extend(f, d); d.keyboardSteps = d.keyboardSteps || d.size; this.each(function() { e = new a(b(this), d); b(this).data("scrollable", e) }); return d.api ? e : this } })(jQuery);
(function(b) { var a = b.tools.scrollable; a.plugins = a.plugins || {}; a.plugins.circular = { version: "0.5.1", conf: { api: false, clonedClass: "cloned"} }; b.fn.circular = function(e) { var d = b.extend({}, a.plugins.circular.conf), c; b.extend(d, e); this.each(function() { var i = b(this).scrollable(), n = i.getItems(), k = i.getConf(), f = i.getItemWrap(), j = 0; if (i) { c = i } if (n.length < k.size) { return false } n.slice(0, k.size).each(function(o) { b(this).clone().appendTo(f).click(function() { i.click(n.length + o) }).addClass(d.clonedClass) }); var l = b.makeArray(n.slice(-k.size)).reverse(); b(l).each(function(o) { b(this).clone().prependTo(f).click(function() { i.click(-o - 1) }).addClass(d.clonedClass) }); var m = f.children(k.item); var h = k.hoverClass; if (h) { m.hover(function() { b(this).addClass(h) }, function() { b(this).removeClass(h) }) } function g(o) { var p = m.eq(o); if (k.vertical) { f.css({ top: -p.position().top }) } else { f.css({ left: -p.position().left }) } } g(k.size); b.extend(i, { move: function(s, r, p, q) { var u = j + s + k.size; var t = u > i.getSize() - k.size; if (u <= 0 || t) { var o = j + k.size + (t ? -n.length : n.length); g(o); u = o + s } if (q) { m.removeClass(k.activeClass).eq(u + Math.floor(k.size / 2)).addClass(k.activeClass) } if (u === j + k.size) { return self } return i.seekTo(u, r, p) }, begin: function(p, o) { return this.seekTo(k.size, p, o) }, end: function(p, o) { return this.seekTo(n.length, p, o) }, click: function(p, r, q) { if (!k.clickable) { return self } if (k.size == 1) { return this.next() } var s = p - j, o = k.activeClass; s -= Math.floor(k.size / 2); return this.move(s, r, q, true) }, getIndex: function() { return j }, setPage: function(p, q, o) { return this.seekTo(p * k.size + k.size, q, o) }, getPageAmount: function() { return Math.ceil(n.length / k.size) }, getPageIndex: function() { if (j < 0) { return this.getPageAmount() - 1 } if (j >= n.length) { return 0 } var o = (j + k.size) / k.size - 1; return o }, getVisibleItems: function() { var o = j + k.size; return m.slice(o, o + k.size) } }); i.onStart(function(p, o) { j = o - k.size; return false }); i.getNaviButtons().removeClass(k.disabledClass) }); return d.api ? c : this } })(jQuery);
(function(b) { var a = b.tools.scrollable; a.plugins = a.plugins || {}; a.plugins.autoscroll = { version: "1.0.1", conf: { autoplay: true, interval: 3000, autopause: true, steps: 1, api: false} }; b.fn.autoscroll = function(d) { if (typeof d == "number") { d = { interval: d} } var e = b.extend({}, a.plugins.autoscroll.conf), c; b.extend(e, d); this.each(function() { var g = b(this).scrollable(); if (g) { c = g } var i, f, h = true; g.play = function() { if (i) { return } h = false; i = setInterval(function() { g.move(e.steps) }, e.interval); g.move(e.steps) }; g.pause = function() { i = clearInterval(i) }; g.stop = function() { g.pause(); h = true }; if (e.autopause) { g.getRoot().add(g.getNaviButtons()).hover(function() { g.pause(); clearInterval(f) }, function() { if (!h) { f = setTimeout(g.play, e.interval) } }) } if (e.autoplay) { setTimeout(g.play, e.interval) } }); return e.api ? c : this } })(jQuery);
(function(b) { b.fn.wheel = function(e) { return this[e ? "bind" : "trigger"]("wheel", e) }; b.event.special.wheel = { setup: function() { b.event.add(this, d, c, {}) }, teardown: function() { b.event.remove(this, d, c) } }; var d = !b.browser.mozilla ? "mousewheel" : "DOMMouseScroll" + (b.browser.version < "1.9" ? " mousemove" : ""); function c(e) { switch (e.type) { case "mousemove": return b.extend(e.data, { clientX: e.clientX, clientY: e.clientY, pageX: e.pageX, pageY: e.pageY }); case "DOMMouseScroll": b.extend(e, e.data); e.delta = -e.detail / 3; break; case "mousewheel": e.delta = e.wheelDelta / 120; break } e.type = "wheel"; return b.event.handle.call(this, e, e.delta) } var a = b.tools.scrollable; a.plugins = a.plugins || {}; a.plugins.mousewheel = { version: "1.0.1", conf: { api: false, speed: 50} }; b.fn.mousewheel = function(f) { var g = b.extend({}, a.plugins.mousewheel.conf), e; if (typeof f == "number") { f = { speed: f} } f = b.extend(g, f); this.each(function() { var h = b(this).scrollable(); if (h) { e = h } h.getRoot().wheel(function(i, j) { h.move(j < 0 ? 1 : -1, f.speed || 50); return false }) }); return f.api ? e : this } })(jQuery);
(function(c) { c.tools = c.tools || {}; c.tools.overlay = { version: "1.1.2", addEffect: function(e, f, g) { b[e] = [f, g] }, conf: { top: "10%", left: "center", absolute: false, speed: "normal", closeSpeed: "fast", effect: "default", close: null, oneInstance: true, closeOnClick: true, closeOnEsc: true, api: false, expose: null, target: null} }; var b = {}; c.tools.overlay.addEffect("default", function(e) { this.getOverlay().fadeIn(this.getConf().speed, e) }, function(e) { this.getOverlay().fadeOut(this.getConf().closeSpeed, e) }); var d = []; function a(g, k) { var o = this, m = c(this), n = c(window), j, i, h, e = k.expose && c.tools.expose.version; var f = k.target || g.attr("rel"); i = f ? c(f) : null || g; if (!i.length) { throw "Could not find Overlay: " + f } if (g && g.index(i) == -1) { g.click(function(p) { o.load(p); return p.preventDefault() }) } c.each(k, function(p, q) { if (c.isFunction(q)) { m.bind(p, q) } }); c.extend(o, { load: function(u) { if (o.isOpened()) { return o } var r = b[k.effect]; if (!r) { throw 'Overlay: cannot find effect : "' + k.effect + '"' } if (k.oneInstance) { c.each(d, function() { this.close(u) }) } u = u || c.Event(); u.type = "onBeforeLoad"; m.trigger(u); if (u.isDefaultPrevented()) { return o } h = true; if (e) { i.expose().load(u) } var t = k.top; var s = k.left; var p = i.outerWidth({ margin: true }); var q = i.outerHeight({ margin: true }); if (typeof t == "string") { t = t == "center" ? Math.max((n.height() - q) / 2, 0) : parseInt(t, 10) / 100 * n.height() } if (s == "center") { s = Math.max((n.width() - p) / 2, 0) } if (!k.absolute) { t += n.scrollTop(); s += n.scrollLeft() } i.css({ top: t, left: s, position: "absolute" }); u.type = "onStart"; m.trigger(u); r[0].call(o, function() { if (h) { u.type = "onLoad"; m.trigger(u) } }); if (k.closeOnClick) { c(document).bind("click.overlay", function(w) { if (!o.isOpened()) { return } var v = c(w.target); if (v.parents(i).length > 1) { return } c.each(d, function() { this.close(w) }) }) } if (k.closeOnEsc) { c(document).unbind("keydown.overlay").bind("keydown.overlay", function(v) { if (v.keyCode == 27) { c.each(d, function() { this.close(v) }) } }) } return o }, close: function(q) { if (!o.isOpened()) { return o } q = q || c.Event(); q.type = "onBeforeClose"; m.trigger(q); if (q.isDefaultPrevented()) { return } h = false; b[k.effect][1].call(o, function() { q.type = "onClose"; m.trigger(q) }); var p = true; c.each(d, function() { if (this.isOpened()) { p = false } }); if (p) { c(document).unbind("click.overlay").unbind("keydown.overlay") } return o }, getContent: function() { return i }, getOverlay: function() { return i }, getTrigger: function() { return g }, getClosers: function() { return j }, isOpened: function() { return h }, getConf: function() { return k }, bind: function(p, q) { m.bind(p, q); return o }, unbind: function(p) { m.unbind(p); return o } }); c.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","), function(p, q) { o[q] = function(r) { return o.bind(q, r) } }); if (e) { if (typeof k.expose == "string") { k.expose = { color: k.expose} } c.extend(k.expose, { api: true, closeOnClick: k.closeOnClick, closeOnEsc: false }); var l = i.expose(k.expose); l.onBeforeClose(function(p) { o.close(p) }); o.onClose(function(p) { l.close(p) }) } j = i.find(k.close || ".close"); if (!j.length && !k.close) { j = c('<div class="close"></div>'); i.prepend(j) } j.click(function(p) { o.close(p) }) } c.fn.overlay = function(e) { var f = this.eq(typeof e == "number" ? e : 0).data("overlay"); if (f) { return f } if (c.isFunction(e)) { e = { onBeforeLoad: e} } var g = c.extend({}, c.tools.overlay.conf); e = c.extend(true, g, e); this.each(function() { f = new a(c(this), e); d.push(f); c(this).data("overlay", f) }); return e.api ? f : this } })(jQuery);
(function(b) { var a = b.tools.overlay; a.plugins = a.plugins || {}; a.plugins.gallery = { version: "1.0.0", conf: { imgId: "img", next: ".next", prev: ".prev", info: ".info", progress: ".progress", disabledClass: "disabled", activeClass: "active", opacity: 0.8, speed: "slow", template: "<strong>${title}</strong> <span>Image ${index} of ${total}</span>", autohide: true, preload: true, api: false} }; b.fn.gallery = function(d) { var o = b.extend({}, a.plugins.gallery.conf), m; b.extend(o, d); m = this.overlay(); var r = this, j = m.getOverlay(), k = j.find(o.next), g = j.find(o.prev), e = j.find(o.info), c = j.find(o.progress), h = g.add(k).add(e).css({ opacity: o.opacity }), s = m.getClosers(), l; function p(u) { c.fadeIn(); h.hide(); s.hide(); var t = u.attr("href"); var v = new Image(); v.onload = function() { c.fadeOut(); var y = b("#" + o.imgId, j); if (!y.length) { y = b("<img/>").attr("id", o.imgId).css("visibility", "hidden"); j.prepend(y) } y.attr("src", t).css("visibility", "hidden"); var z = v.width; var A = (b(window).width() - z) / 2; l = r.index(r.filter("[href=" + t + "]")); r.removeClass(o.activeClass).eq(l).addClass(o.activeClass); var w = o.disabledClass; h.removeClass(w); if (l === 0) { g.addClass(w) } if (l == r.length - 1) { k.addClass(w) } var B = o.template.replace("${title}", u.attr("title") || u.data("title")).replace("${index}", l + 1).replace("${total}", r.length); var x = parseInt(e.css("paddingLeft"), 10) + parseInt(e.css("paddingRight"), 10); e.html(B).css({ width: z - x }); j.animate({ width: z, height: v.height, left: A }, o.speed, function() { y.hide().css("visibility", "visible").fadeIn(function() { if (!o.autohide) { h.fadeIn(); s.show() } }) }) }; v.onerror = function() { j.fadeIn().html("Cannot find image " + t) }; v.src = t; if (o.preload) { r.filter(":eq(" + (l - 1) + "), :eq(" + (l + 1) + ")").each(function() { var w = new Image(); w.src = b(this).attr("href") }) } } function f(t, u) { t.click(function() { if (t.hasClass(o.disabledClass)) { return } var v = r.eq(i = l + (u ? 1 : -1)); if (v.length) { p(v) } }) } f(k, true); f(g); b(document).keydown(function(t) { if (!j.is(":visible") || t.altKey || t.ctrlKey) { return } if (t.keyCode == 37 || t.keyCode == 39) { var u = t.keyCode == 37 ? g : k; u.click(); return t.preventDefault() } return true }); function q() { if (!j.is(":animated")) { h.show(); s.show() } } if (o.autohide) { j.hover(q, function() { h.fadeOut(); s.hide() }).mousemove(q) } var n; this.each(function() { var v = b(this), u = b(this).overlay(), t = u; u.onBeforeLoad(function() { p(v) }); u.onClose(function() { r.removeClass(o.activeClass) }) }); return o.api ? n : this } })(jQuery);
(function(b) { b.tools = b.tools || {}; b.tools.expose = { version: "1.0.5", conf: { maskId: null, loadSpeed: "slow", closeSpeed: "fast", closeOnClick: true, closeOnEsc: true, zIndex: 9998, opacity: 0.8, color: "#456", api: false} }; function a() { if (b.browser.msie) { var f = b(document).height(), e = b(window).height(); return [window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, f - e < 20 ? e : f] } return [b(window).width(), b(document).height()] } function c(h, g) { var e = this, j = b(this), d = null, f = false, i = 0; b.each(g, function(k, l) { if (b.isFunction(l)) { j.bind(k, l) } }); b(window).resize(function() { e.fit() }); b.extend(this, { getMask: function() { return d }, getExposed: function() { return h }, getConf: function() { return g }, isLoaded: function() { return f }, load: function(n) { if (f) { return e } i = h.eq(0).css("zIndex"); if (g.maskId) { d = b("#" + g.maskId) } if (!d || !d.length) { var l = a(); d = b("<div/>").css({ position: "absolute", top: 0, left: 0, width: l[0], height: l[1], display: "none", opacity: 0, zIndex: g.zIndex }); if (g.maskId) { d.attr("id", g.maskId) } b("body").append(d); var k = d.css("backgroundColor"); if (!k || k == "transparent" || k == "rgba(0, 0, 0, 0)") { d.css("backgroundColor", g.color) } if (g.closeOnEsc) { b(document).bind("keydown.unexpose", function(o) { if (o.keyCode == 27) { e.close() } }) } if (g.closeOnClick) { d.bind("click.unexpose", function(o) { e.close(o) }) } } n = n || b.Event(); n.type = "onBeforeLoad"; j.trigger(n); if (n.isDefaultPrevented()) { return e } b.each(h, function() { var o = b(this); if (!/relative|absolute|fixed/i.test(o.css("position"))) { o.css("position", "relative") } }); h.css({ zIndex: Math.max(g.zIndex + 1, i == "auto" ? 0 : i) }); var m = d.height(); if (!this.isLoaded()) { d.css({ opacity: 0, display: "block" }).fadeTo(g.loadSpeed, g.opacity, function() { if (d.height() != m) { d.css("height", m) } n.type = "onLoad"; j.trigger(n) }) } f = true; return e }, close: function(k) { if (!f) { return e } k = k || b.Event(); k.type = "onBeforeClose"; j.trigger(k); if (k.isDefaultPrevented()) { return e } d.fadeOut(g.closeSpeed, function() { k.type = "onClose"; j.trigger(k); h.css({ zIndex: b.browser.msie ? i : null }) }); f = false; return e }, fit: function() { if (d) { var k = a(); d.css({ width: k[0], height: k[1] }) } }, bind: function(k, l) { j.bind(k, l); return e }, unbind: function(k) { j.unbind(k); return e } }); b.each("onBeforeLoad,onLoad,onBeforeClose,onClose".split(","), function(k, l) { e[l] = function(m) { return e.bind(l, m) } }) } b.fn.expose = function(d) { var e = this.eq(typeof d == "number" ? d : 0).data("expose"); if (e) { return e } if (typeof d == "string") { d = { color: d} } var f = b.extend({}, b.tools.expose.conf); d = b.extend(f, d); this.each(function() { e = new c(b(this), d); b(this).data("expose", e) }); return d.api ? e : this } })(jQuery);
(function() { var e = typeof jQuery == "function"; var i = { width: "100%", height: "100%", allowfullscreen: true, allowscriptaccess: "always", quality: "high", version: null, onFail: null, expressInstall: null, w3c: false, cachebusting: false }; if (e) { jQuery.tools = jQuery.tools || {}; jQuery.tools.flashembed = { version: "1.0.4", conf: i} } function j() { if (c.done) { return false } var l = document; if (l && l.getElementsByTagName && l.getElementById && l.body) { clearInterval(c.timer); c.timer = null; for (var k = 0; k < c.ready.length; k++) { c.ready[k].call() } c.ready = null; c.done = true } } var c = e ? jQuery : function(k) { if (c.done) { return k() } if (c.timer) { c.ready.push(k) } else { c.ready = [k]; c.timer = setInterval(j, 13) } }; function f(l, k) { if (k) { for (key in k) { if (k.hasOwnProperty(key)) { l[key] = k[key] } } } return l } function g(k) { switch (h(k)) { case "string": k = k.replace(new RegExp('(["\\\\])', "g"), "\\$1"); k = k.replace(/^\s?(\d+)%/, "$1pct"); return '"' + k + '"'; case "array": return "[" + b(k, function(n) { return g(n) }).join(",") + "]"; case "function": return '"function()"'; case "object": var l = []; for (var m in k) { if (k.hasOwnProperty(m)) { l.push('"' + m + '":' + g(k[m])) } } return "{" + l.join(",") + "}" } return String(k).replace(/\s/g, " ").replace(/\'/g, '"') } function h(l) { if (l === null || l === undefined) { return false } var k = typeof l; return (k == "object" && l.push) ? "array" : k } if (window.attachEvent) { window.attachEvent("onbeforeunload", function() { __flash_unloadHandler = function() { }; __flash_savedUnloadHandler = function() { } }) } function b(k, n) { var m = []; for (var l in k) { if (k.hasOwnProperty(l)) { m[l] = n(k[l]) } } return m } function a(r, t) { var q = f({}, r); var s = document.all; var n = '<object width="' + q.width + '" height="' + q.height + '"'; if (s && !q.id) { q.id = "_" + ("" + Math.random()).substring(9) } if (q.id) { n += ' id="' + q.id + '"' } if (q.cachebusting) { q.src += ((q.src.indexOf("?") != -1 ? "&" : "?") + Math.random()) } if (q.w3c || !s) { n += ' data="' + q.src + '" type="application/x-shockwave-flash"' } else { n += ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' } n += ">"; if (q.w3c || s) { n += '<param name="movie" value="' + q.src + '" />' } q.width = q.height = q.id = q.w3c = q.src = null; for (var l in q) { if (q[l] !== null) { n += '<param name="' + l + '" value="' + q[l] + '" />' } } var o = ""; if (t) { for (var m in t) { if (t[m] !== null) { o += m + "=" + (typeof t[m] == "object" ? g(t[m]) : t[m]) + "&" } } o = o.substring(0, o.length - 1); n += '<param name="flashvars" value=\'' + o + "' />" } n += "</object>"; return n } function d(m, p, l) { var k = flashembed.getVersion(); f(this, { getContainer: function() { return m }, getConf: function() { return p }, getVersion: function() { return k }, getFlashvars: function() { return l }, getApi: function() { return m.firstChild }, getHTML: function() { return a(p, l) } }); var q = p.version; var r = p.expressInstall; var o = !q || flashembed.isSupported(q); if (o) { p.onFail = p.version = p.expressInstall = null; m.innerHTML = a(p, l) } else { if (q && r && flashembed.isSupported([6, 65])) { f(p, { src: r }); l = { MMredirectURL: location.href, MMplayerType: "PlugIn", MMdoctitle: document.title }; m.innerHTML = a(p, l) } else { if (m.innerHTML.replace(/\s/g, "") !== "") { } else { m.innerHTML = "<h2>Flash version " + q + " or greater is required</h2><h3>" + (k[0] > 0 ? "Your version is " + k : "You have no flash plugin installed") + "</h3>" + (m.tagName == "A" ? "<p>Click here to download latest version</p>" : "<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>"); if (m.tagName == "A") { m.onclick = function() { location.href = "http://www.adobe.com/go/getflashplayer" } } } } } if (!o && p.onFail) { var n = p.onFail.call(this); if (typeof n == "string") { m.innerHTML = n } } if (document.all) { window[p.id] = document.getElementById(p.id) } } window.flashembed = function(l, m, k) { if (typeof l == "string") { var n = document.getElementById(l); if (n) { l = n } else { c(function() { flashembed(l, m, k) }); return } } if (!l) { return } if (typeof m == "string") { m = { src: m} } var o = f({}, i); f(o, m); return new d(l, o, k) }; f(window.flashembed, { getVersion: function() { var m = [0, 0]; if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") { var l = navigator.plugins["Shockwave Flash"].description; if (typeof l != "undefined") { l = l.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); var n = parseInt(l.replace(/^(.*)\..*$/, "$1"), 10); var r = /r/.test(l) ? parseInt(l.replace(/^.*r(.*)$/, "$1"), 10) : 0; m = [n, r] } } else { if (window.ActiveXObject) { try { var p = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7") } catch (q) { try { p = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); m = [6, 0]; p.AllowScriptAccess = "always" } catch (k) { if (m[0] == 6) { return m } } try { p = new ActiveXObject("ShockwaveFlash.ShockwaveFlash") } catch (o) { } } if (typeof p == "object") { l = p.GetVariable("$version"); if (typeof l != "undefined") { l = l.replace(/^\S+\s+(.*)$/, "$1").split(","); m = [parseInt(l[0], 10), parseInt(l[2], 10)] } } } } return m }, isSupported: function(k) { var m = flashembed.getVersion(); var l = (m[0] > k[0]) || (m[0] == k[0] && m[1] >= k[1]); return l }, domReady: c, asString: g, getHTML: a }); if (e) { jQuery.fn.flashembed = function(l, k) { var m = null; this.each(function() { m = flashembed(this, l, k) }); return l.api === false ? this : m } } })();

