/*!
 * jQuery UI 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */
(function(c,j){
    function k(a,b){
        var d=a.nodeName.toLowerCase();
        if("area"===d){
            b=a.parentNode;
            d=b.name;
            if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;
            a=c("img[usemap=#"+d+"]")[0];
            return!!a&&l(a)
            }
            return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)
        }
        function l(a){
        return!c(a).parents().andSelf().filter(function(){
            return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)
            }).length
        }
        c.ui=c.ui||{};
    
    if(!c.ui.version){
        c.extend(c.ui,{
            version:"1.8.16",
            keyCode:{
                ALT:18,
                BACKSPACE:8,
                CAPS_LOCK:20,
                COMMA:188,
                COMMAND:91,
                COMMAND_LEFT:91,
                COMMAND_RIGHT:93,
                CONTROL:17,
                DELETE:46,
                DOWN:40,
                END:35,
                ENTER:13,
                ESCAPE:27,
                HOME:36,
                INSERT:45,
                LEFT:37,
                MENU:93,
                NUMPAD_ADD:107,
                NUMPAD_DECIMAL:110,
                NUMPAD_DIVIDE:111,
                NUMPAD_ENTER:108,
                NUMPAD_MULTIPLY:106,
                NUMPAD_SUBTRACT:109,
                PAGE_DOWN:34,
                PAGE_UP:33,
                PERIOD:190,
                RIGHT:39,
                SHIFT:16,
                SPACE:32,
                TAB:9,
                UP:38,
                WINDOWS:91
            }
        });
    c.fn.extend({
        propAttr:c.fn.prop||c.fn.attr,
        _focus:c.fn.focus,
        focus:function(a,b){
            return typeof a==="number"?this.each(function(){
                var d=
                this;
                setTimeout(function(){
                    c(d).focus();
                    b&&b.call(d)
                    },a)
                }):this._focus.apply(this,arguments)
            },
        scrollParent:function(){
            var a;
            a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){
                return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))
                }).eq(0):this.parents().filter(function(){
                return/(auto|scroll)/.test(c.curCSS(this,
                    "overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))
                }).eq(0);
            return/fixed/.test(this.css("position"))||!a.length?c(document):a
            },
        zIndex:function(a){
            if(a!==j)return this.css("zIndex",a);
            if(this.length){
                a=c(this[0]);
                for(var b;a.length&&a[0]!==document;){
                    b=a.css("position");
                    if(b==="absolute"||b==="relative"||b==="fixed"){
                        b=parseInt(a.css("zIndex"),10);
                        if(!isNaN(b)&&b!==0)return b
                            }
                            a=a.parent()
                    }
                }
                return 0
        },
    disableSelection:function(){
        return this.bind((c.support.selectstart?"selectstart":
            "mousedown")+".ui-disableSelection",function(a){
            a.preventDefault()
            })
        },
    enableSelection:function(){
        return this.unbind(".ui-disableSelection")
        }
    });
c.each(["Width","Height"],function(a,b){
    function d(f,g,m,n){
        c.each(e,function(){
            g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;
            if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;
            if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0
                });
        return g
        }
        var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={
        innerWidth:c.fn.innerWidth,
        innerHeight:c.fn.innerHeight,
        outerWidth:c.fn.outerWidth,
        outerHeight:c.fn.outerHeight
        };
        
    c.fn["inner"+b]=function(f){
        if(f===j)return i["inner"+b].call(this);
        return this.each(function(){
            c(this).css(h,d(this,f)+"px")
            })
        };
        
    c.fn["outer"+b]=function(f,g){
        if(typeof f!=="number")return i["outer"+b].call(this,f);
        return this.each(function(){
            c(this).css(h,d(this,f,true,g)+"px")
            })
        }
    });
c.extend(c.expr[":"],{
    data:function(a,b,d){
        return!!c.data(a,d[3])
        },
    focusable:function(a){
        return k(a,!isNaN(c.attr(a,"tabindex")))
        },
    tabbable:function(a){
        var b=c.attr(a,
            "tabindex"),d=isNaN(b);
        return(d||b>=0)&&k(a,!d)
        }
    });
c(function(){
    var a=document.body,b=a.appendChild(b=document.createElement("div"));
    c.extend(b.style,{
        minHeight:"100px",
        height:"auto",
        padding:0,
        borderWidth:0
    });
    c.support.minHeight=b.offsetHeight===100;
    c.support.selectstart="onselectstart"in b;
    a.removeChild(b).style.display="none"
    });
c.extend(c.ui,{
    plugin:{
        add:function(a,b,d){
            a=c.ui[a].prototype;
            for(var e in d){
                a.plugins[e]=a.plugins[e]||[];
                a.plugins[e].push([b,d[e]])
                }
            },
    call:function(a,b,d){
        if((b=a.plugins[b])&&
            a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)
            }
        },
contains:function(a,b){
    return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)
    },
hasScroll:function(a,b){
    if(c(a).css("overflow")==="hidden")return false;
    b=b&&b==="left"?"scrollLeft":"scrollTop";
    var d=false;
    if(a[b]>0)return true;
    a[b]=1;
    d=a[b]>0;
    a[b]=0;
    return d
    },
isOverAxis:function(a,b,d){
    return a>b&&a<b+d
    },
isOver:function(a,b,d,e,h,i){
    return c.ui.isOverAxis(a,d,h)&&
    c.ui.isOverAxis(b,e,i)
    }
})
}
})(jQuery);
;/*!
 * jQuery UI Widget 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Widget
 */
(function(b,j){
    if(b.cleanData){
        var k=b.cleanData;
        b.cleanData=function(a){
            for(var c=0,d;(d=a[c])!=null;c++)try{
                b(d).triggerHandler("remove")
                }catch(e){}
                k(a)
            }
        }else{
    var l=b.fn.remove;
    b.fn.remove=function(a,c){
        return this.each(function(){
            if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){
                try{
                    b(this).triggerHandler("remove")
                    }catch(d){}
            });
        return l.call(b(this),a,c)
            })
    }
}
b.widget=function(a,c,d){
    var e=a.split(".")[0],f;
    a=a.split(".")[1];
    f=e+"-"+a;
    if(!d){
        d=c;
        c=b.Widget
        }
        b.expr[":"][f]=
    function(h){
        return!!b.data(h,a)
        };
        
    b[e]=b[e]||{};
    
    b[e][a]=function(h,g){
        arguments.length&&this._createWidget(h,g)
        };
        
    c=new c;
    c.options=b.extend(true,{},c.options);
    b[e][a].prototype=b.extend(true,c,{
        namespace:e,
        widgetName:a,
        widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,
        widgetBaseClass:f
    },d);
    b.widget.bridge(a,b[e][a])
    };
    
b.widget.bridge=function(a,c){
    b.fn[a]=function(d){
        var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;
        d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):
        d;
        if(e&&d.charAt(0)==="_")return h;
        e?this.each(function(){
            var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;
            if(i!==g&&i!==j){
                h=i;
                return false
                }
            }):this.each(function(){
        var g=b.data(this,a);
        g?g.option(d||{})._init():b.data(this,a,new c(d,this))
        });
    return h
    }
};

b.Widget=function(a,c){
    arguments.length&&this._createWidget(a,c)
    };
    
b.Widget.prototype={
    widgetName:"widget",
    widgetEventPrefix:"",
    options:{
        disabled:false
    },
    _createWidget:function(a,c){
        b.data(c,this.widgetName,this);
        this.element=b(c);
        this.options=
        b.extend(true,{},this.options,this._getCreateOptions(),a);
        var d=this;
        this.element.bind("remove."+this.widgetName,function(){
            d.destroy()
            });
        this._create();
        this._trigger("create");
        this._init()
        },
    _getCreateOptions:function(){
        return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]
        },
    _create:function(){},
    _init:function(){},
    destroy:function(){
        this.element.unbind("."+this.widgetName).removeData(this.widgetName);
        this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+
            "-disabled ui-state-disabled")
        },
    widget:function(){
        return this.element
        },
    option:function(a,c){
        var d=a;
        if(arguments.length===0)return b.extend({},this.options);
        if(typeof a==="string"){
            if(c===j)return this.options[a];
            d={};
            
            d[a]=c
            }
            this._setOptions(d);
        return this
        },
    _setOptions:function(a){
        var c=this;
        b.each(a,function(d,e){
            c._setOption(d,e)
            });
        return this
        },
    _setOption:function(a,c){
        this.options[a]=c;
        if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",
            c);
        return this
        },
    enable:function(){
        return this._setOption("disabled",false)
        },
    disable:function(){
        return this._setOption("disabled",true)
        },
    _trigger:function(a,c,d){
        var e=this.options[a];
        c=b.Event(c);
        c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();
        d=d||{};
        
        if(c.originalEvent){
            a=b.event.props.length;
            for(var f;a;){
                f=b.event.props[--a];
                c[f]=c.originalEvent[f]
                }
            }
            this.element.trigger(c,d);
    return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())
    }
}
})(jQuery);
;/*
 * jQuery UI Tabs 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Tabs
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
(function(d,p){
    function u(){
        return++v
        }
        function w(){
        return++x
        }
        var v=0,x=0;
    d.widget("ui.tabs",{
        options:{
            add:null,
            ajaxOptions:null,
            cache:false,
            cookie:null,
            collapsible:false,
            disable:null,
            disabled:[],
            enable:null,
            event:"click",
            fx:null,
            idPrefix:"ui-tabs-",
            load:null,
            panelTemplate:"<div></div>",
            remove:null,
            select:null,
            show:null,
            spinner:"<em>Loading&#8230;</em>",
            tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"
        },
        _create:function(){
            this._tabify(true)
            },
        _setOption:function(b,e){
            if(b=="selected")this.options.collapsible&&
                e==this.options.selected||this.select(e);
            else{
                this.options[b]=e;
                this._tabify()
                }
            },
    _tabId:function(b){
        return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()
        },
    _sanitizeSelector:function(b){
        return b.replace(/:/g,"\\:")
        },
    _cookie:function(){
        var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());
        return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))
        },
    _ui:function(b,e){
        return{
            tab:b,
            panel:e,
            index:this.anchors.index(b)
            }
        },
    _cleanup:function(){
        this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){
            var b=
            d(this);
            b.html(b.data("label.tabs")).removeData("label.tabs")
            })
        },
    _tabify:function(b){
        function e(g,f){
            g.css("display","");
            !d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")
            }
            var a=this,c=this.options,h=/^#.+/;
        this.list=this.element.find("ol,ul").eq(0);
        this.lis=d(" > li:has(a[href])",this.list);
        this.anchors=this.lis.map(function(){
            return d("a",this)[0]
            });
        this.panels=d([]);
        this.anchors.each(function(g,f){
            var i=d(f).attr("href"),l=i.split("#")[0],q;
            if(l&&(l===location.toString().split("#")[0]||
                (q=d("base")[0])&&l===q.href)){
                i=f.hash;
                f.href=i
                }
                if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));
            else if(i&&i!=="#"){
                d.data(f,"href.tabs",i);
                d.data(f,"load.tabs",i.replace(/#.*$/,""));
                i=a._tabId(f);
                f.href="#"+i;
                f=a.element.find("#"+i);
                if(!f.length){
                    f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);
                    f.data("destroy.tabs",true)
                    }
                    a.panels=a.panels.add(f)
                }else c.disabled.push(g)
                });
        if(b){
            this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
            this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");
            this.lis.addClass("ui-state-default ui-corner-top");
            this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");
            if(c.selected===p){
                location.hash&&this.anchors.each(function(g,f){
                    if(f.hash==location.hash){
                        c.selected=g;
                        return false
                        }
                    });
            if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);
            if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected=
                this.lis.index(this.lis.filter(".ui-tabs-selected"));
            c.selected=c.selected||(this.lis.length?0:-1)
            }else if(c.selected===null)c.selected=-1;
        c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;
        c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){
            return a.lis.index(g)
            }))).sort();
        d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);
        this.panels.addClass("ui-tabs-hide");
        this.lis.removeClass("ui-tabs-selected ui-state-active");
        if(c.selected>=0&&this.anchors.length){
            a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");
            this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");
            a.element.queue("tabs",function(){
                a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))
                });
            this.load(c.selected)
            }
            d(window).bind("unload",function(){
            a.lis.add(a.anchors).unbind(".tabs");
            a.lis=a.anchors=a.panels=null
            })
        }else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));
    this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");
    c.cookie&&this._cookie(c.selected,c.cookie);
    b=0;
    for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");
    c.cache===false&&this.anchors.removeData("cache.tabs");
    this.lis.add(this.anchors).unbind(".tabs");
    if(c.event!=="mouseover"){
        var k=function(g,f){
            f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)
            },n=function(g,f){
            f.removeClass("ui-state-"+
                g)
            };
            
        this.lis.bind("mouseover.tabs",function(){
            k("hover",d(this))
            });
        this.lis.bind("mouseout.tabs",function(){
            n("hover",d(this))
            });
        this.anchors.bind("focus.tabs",function(){
            k("focus",d(this).closest("li"))
            });
        this.anchors.bind("blur.tabs",function(){
            n("focus",d(this).closest("li"))
            })
        }
        var m,o;
    if(c.fx)if(d.isArray(c.fx)){
        m=c.fx[0];
        o=c.fx[1]
        }else m=o=c.fx;
    var r=o?function(g,f){
        d(g).closest("li").addClass("ui-tabs-selected ui-state-active");
        f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",
            function(){
                e(f,o);
                a._trigger("show",null,a._ui(g,f[0]))
                })
        }:function(g,f){
        d(g).closest("li").addClass("ui-tabs-selected ui-state-active");
        f.removeClass("ui-tabs-hide");
        a._trigger("show",null,a._ui(g,f[0]))
        },s=m?function(g,f){
        f.animate(m,m.duration||"normal",function(){
            a.lis.removeClass("ui-tabs-selected ui-state-active");
            f.addClass("ui-tabs-hide");
            e(f,m);
            a.element.dequeue("tabs")
            })
        }:function(g,f){
        a.lis.removeClass("ui-tabs-selected ui-state-active");
        f.addClass("ui-tabs-hide");
        a.element.dequeue("tabs")
        };
    this.anchors.bind(c.event+".tabs",function(){
        var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));
        if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){
            this.blur();
            return false
            }
            c.selected=a.anchors.index(this);
        a.abort();
        if(c.collapsible)if(f.hasClass("ui-tabs-selected")){
            c.selected=
            -1;
            c.cookie&&a._cookie(c.selected,c.cookie);
            a.element.queue("tabs",function(){
                s(g,i)
                }).dequeue("tabs");
            this.blur();
            return false
            }else if(!i.length){
            c.cookie&&a._cookie(c.selected,c.cookie);
            a.element.queue("tabs",function(){
                r(g,l)
                });
            a.load(a.anchors.index(this));
            this.blur();
            return false
            }
            c.cookie&&a._cookie(c.selected,c.cookie);
        if(l.length){
            i.length&&a.element.queue("tabs",function(){
                s(g,i)
                });
            a.element.queue("tabs",function(){
                r(g,l)
                });
            a.load(a.anchors.index(this))
            }else throw"jQuery UI Tabs: Mismatching fragment identifier.";
        d.browser.msie&&this.blur()
        });
    this.anchors.bind("click.tabs",function(){
        return false
        })
    },
_getIndex:function(b){
    if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));
    return b
    },
destroy:function(){
    var b=this.options;
    this.abort();
    this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");
    this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");
    this.anchors.each(function(){
        var e=
        d.data(this,"href.tabs");
        if(e)this.href=e;
        var a=d(this).unbind(".tabs");
        d.each(["href","load","cache"],function(c,h){
            a.removeData(h+".tabs")
            })
        });
    this.lis.unbind(".tabs").add(this.panels).each(function(){
        d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")
        });
    b.cookie&&this._cookie(null,b.cookie);
    return this
    },
add:function(b,
    e,a){
    if(a===p)a=this.anchors.length;
    var c=this,h=this.options;
    e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));
    b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);
    e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);
    var j=c.element.find("#"+b);
    j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));
    j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");
    if(a>=this.lis.length){
        e.appendTo(this.list);
        j.appendTo(this.list[0].parentNode)
        }else{
        e.insertBefore(this.lis[a]);
        j.insertBefore(this.panels[a])
        }
        h.disabled=d.map(h.disabled,function(k){
        return k>=a?++k:k
        });
    this._tabify();
    if(this.anchors.length==1){
        h.selected=0;
        e.addClass("ui-tabs-selected ui-state-active");
        j.removeClass("ui-tabs-hide");
        this.element.queue("tabs",function(){
            c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))
            });
        this.load(0)
        }
        this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));
    return this
    },
remove:function(b){
    b=this._getIndex(b);
    var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();
    if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1<this.anchors.length?1:-1));
    e.disabled=d.map(d.grep(e.disabled,function(h){
        return h!=b
        }),function(h){
        return h>=b?--h:h
        });
    this._tabify();
    this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));
    return this
    },
enable:function(b){
    b=this._getIndex(b);
    var e=this.options;
    if(d.inArray(b,e.disabled)!=-1){
        this.lis.eq(b).removeClass("ui-state-disabled");
        e.disabled=d.grep(e.disabled,function(a){
            return a!=b
            });
        this._trigger("enable",null,
            this._ui(this.anchors[b],this.panels[b]));
        return this
        }
    },
disable:function(b){
    b=this._getIndex(b);
    var e=this.options;
    if(b!=e.selected){
        this.lis.eq(b).addClass("ui-state-disabled");
        e.disabled.push(b);
        e.disabled.sort();
        this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))
        }
        return this
    },
select:function(b){
    b=this._getIndex(b);
    if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;
    this.anchors.eq(b).trigger(this.options.event+".tabs");
    return this
    },
load:function(b){
    b=this._getIndex(b);
    var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");
    this.abort();
    if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");
    else{
        this.lis.eq(b).addClass("ui-state-processing");
        if(a.spinner){
            var j=d("span",c);
            j.data("label.tabs",j.html()).html(a.spinner)
            }
            this.xhr=d.ajax(d.extend({},a.ajaxOptions,{
            url:h,
            success:function(k,n){
                e.element.find(e._sanitizeSelector(c.hash)).html(k);
                e._cleanup();
                a.cache&&d.data(c,
                    "cache.tabs",true);
                e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));
                try{
                    a.ajaxOptions.success(k,n)
                    }catch(m){}
            },
        error:function(k,n){
            e._cleanup();
            e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));
            try{
                a.ajaxOptions.error(k,n,b,c)
                }catch(m){}
        }
        }));
e.element.dequeue("tabs");
return this
}
},
abort:function(){
    this.element.queue([]);
    this.panels.stop(false,true);
    this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));
    if(this.xhr){
        this.xhr.abort();
        delete this.xhr
        }
        this._cleanup();
    return this
    },
url:function(b,e){
    this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);
    return this
    },
length:function(){
    return this.anchors.length
    }
});
d.extend(d.ui.tabs,{
    version:"1.8.16"
});
d.extend(d.ui.tabs.prototype,{
    rotation:null,
    rotate:function(b,e){
        var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){
            clearTimeout(a.rotation);
            a.rotation=setTimeout(function(){
                var k=c.selected;
                a.select(++k<a.anchors.length?k:0)
                },b);
            j&&j.stopPropagation()
            });
        e=a._unrotate||(a._unrotate=!e?function(j){
            j.clientX&&
            a.rotate(null)
            }:function(){
            t=c.selected;
            h()
            });
        if(b){
            this.element.bind("tabsshow",h);
            this.anchors.bind(c.event+".tabs",e);
            h()
            }else{
            clearTimeout(a.rotation);
            this.element.unbind("tabsshow",h);
            this.anchors.unbind(c.event+".tabs",e);
            delete this._rotate;
            delete this._unrotate
            }
            return this
        }
    })
})(jQuery);
;

/*
 * jQuery UI Accordion 1.8.11
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Accordion
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
(function(c){c.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");
a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion",
function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a=
this.options;if(a.icons){c("<span></span>").addClass("ui-icon "+a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex");
this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons();
b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target);
a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+
c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options;
if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(j,g,e,b,f);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);
if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(),
e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight||
e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false",
"aria-selected":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.11",
animations:{slide:function(a,b){a=c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/);
f[i]={value:j[1],unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide",
paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery);
;

/*
 * jQuery UI Effects 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/
 */
jQuery.effects||function(f,j){
    function m(c){
        var a;
        if(c&&c.constructor==Array&&c.length==3)return c;
        if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];
        if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];
        if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],
            16),parseInt(a[2],16),parseInt(a[3],16)];
        if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];
        if(/rgba\(0, 0, 0, 0\)/.exec(c))return n.transparent;
        return n[f.trim(c).toLowerCase()]
        }
        function s(c,a){
        var b;
        do{
            b=f.curCSS(c,a);
            if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;
            a="backgroundColor"
            }while(c=c.parentNode);
        return m(b)
        }
        function o(){
        var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
        a={},b,d;
        if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){
            b=c[e];
            if(typeof c[b]=="string"){
                d=b.replace(/\-(\w)/g,function(g,h){
                    return h.toUpperCase()
                    });
                a[d]=c[b]
                }
            }else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a
    }
    function p(c){
    var a,b;
    for(a in c){
        b=c[a];
        if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]
    }
    return c
    }
    function u(c,a){
    var b={
        _:0
    },d;
    for(d in a)if(c[d]!=a[d])b[d]=a[d];return b
    }
    function k(c,a,b,d){
    if(typeof c=="object"){
        d=
        a;
        b=null;
        a=c;
        c=a.effect
        }
        if(f.isFunction(a)){
        d=a;
        b=null;
        a={}
    }
    if(typeof a=="number"||f.fx.speeds[a]){
    d=b;
    b=a;
    a={}
}
if(f.isFunction(b)){
    d=b;
    b=null
    }
    a=a||{};

b=b||a.duration;
b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;
d=d||a.complete;
return[c,a,b,d]
}
function l(c){
    if(!c||typeof c==="number"||f.fx.speeds[c])return true;
    if(typeof c==="string"&&!f.effects[c])return true;
    return false
    }
    f.effects={};

f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor",
    "borderTopColor","borderColor","color","outlineColor"],function(c,a){
        f.fx.step[a]=function(b){
            if(!b.colorInit){
                b.start=s(b.elem,a);
                b.end=m(b.end);
                b.colorInit=true
                }
                b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"
            }
        });
var n={
    aqua:[0,255,255],
    azure:[240,255,255],
    beige:[245,245,220],
    black:[0,
    0,0],
    blue:[0,0,255],
    brown:[165,42,42],
    cyan:[0,255,255],
    darkblue:[0,0,139],
    darkcyan:[0,139,139],
    darkgrey:[169,169,169],
    darkgreen:[0,100,0],
    darkkhaki:[189,183,107],
    darkmagenta:[139,0,139],
    darkolivegreen:[85,107,47],
    darkorange:[255,140,0],
    darkorchid:[153,50,204],
    darkred:[139,0,0],
    darksalmon:[233,150,122],
    darkviolet:[148,0,211],
    fuchsia:[255,0,255],
    gold:[255,215,0],
    green:[0,128,0],
    indigo:[75,0,130],
    khaki:[240,230,140],
    lightblue:[173,216,230],
    lightcyan:[224,255,255],
    lightgreen:[144,238,144],
    lightgrey:[211,
    211,211],
    lightpink:[255,182,193],
    lightyellow:[255,255,224],
    lime:[0,255,0],
    magenta:[255,0,255],
    maroon:[128,0,0],
    navy:[0,0,128],
    olive:[128,128,0],
    orange:[255,165,0],
    pink:[255,192,203],
    purple:[128,0,128],
    violet:[128,0,128],
    red:[255,0,0],
    silver:[192,192,192],
    white:[255,255,255],
    yellow:[255,255,0],
    transparent:[255,255,255]
    },q=["add","remove","toggle"],t={
    border:1,
    borderBottom:1,
    borderColor:1,
    borderLeft:1,
    borderRight:1,
    borderTop:1,
    borderWidth:1,
    margin:1,
    padding:1
};

f.effects.animateClass=function(c,a,b,
    d){
    if(f.isFunction(b)){
        d=b;
        b=null
        }
        return this.queue(function(){
        var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("class");
        f.each(q,function(w,i){
            c[i]&&e[i+"Class"](c[i])
            });
        r=p(o.call(this));
        e.attr("class",v);
        e.animate(u(h,r),{
            queue:false,
            duration:a,
            easing:b,
            complete:function(){
                f.each(q,function(w,i){
                    c[i]&&e[i+"Class"](c[i])
                    });
                if(typeof e.attr("style")=="object"){
                    e.attr("style").cssText="";
                    e.attr("style").cssText=g
                    }else e.attr("style",g);
                d&&d.apply(this,arguments);
                f.dequeue(this)
                }
            })
    })
};
f.fn.extend({
    _addClass:f.fn.addClass,
    addClass:function(c,a,b,d){
        return a?f.effects.animateClass.apply(this,[{
            add:c
        },a,b,d]):this._addClass(c)
        },
    _removeClass:f.fn.removeClass,
    removeClass:function(c,a,b,d){
        return a?f.effects.animateClass.apply(this,[{
            remove:c
        },a,b,d]):this._removeClass(c)
        },
    _toggleClass:f.fn.toggleClass,
    toggleClass:function(c,a,b,d,e){
        return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{
            add:c
        }:{
            remove:c
        },b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,
            [{
                toggle:c
            },a,b,d])
        },
    switchClass:function(c,a,b,d,e){
        return f.effects.animateClass.apply(this,[{
            add:a,
            remove:c
        },b,d,e])
        }
    });
f.extend(f.effects,{
    version:"1.8.16",
    save:function(c,a){
        for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])
            },
    restore:function(c,a){
        for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))
            },
    setMode:function(c,a){
        if(a=="toggle")a=c.is(":hidden")?"show":"hide";
        return a
        },
    getBaseline:function(c,a){
        var b;
        switch(c[0]){
            case "top":
                b=
                0;
                break;
            case "middle":
                b=0.5;
                break;
            case "bottom":
                b=1;
                break;
            default:
                b=c[0]/a.height
                }
                switch(c[1]){
            case "left":
                c=0;
                break;
            case "center":
                c=0.5;
                break;
            case "right":
                c=1;
                break;
            default:
                c=c[1]/a.width
                }
                return{
            x:c,
            y:b
        }
    },
createWrapper:function(c){
    if(c.parent().is(".ui-effects-wrapper"))return c.parent();
    var a={
        width:c.outerWidth(true),
        height:c.outerHeight(true),
        "float":c.css("float")
        },b=f("<div></div>").addClass("ui-effects-wrapper").css({
        fontSize:"100%",
        background:"transparent",
        border:"none",
        margin:0,
        padding:0
    }),
    d=document.activeElement;
    c.wrap(b);
    if(c[0]===d||f.contains(c[0],d))f(d).focus();
    b=c.parent();
    if(c.css("position")=="static"){
        b.css({
            position:"relative"
        });
        c.css({
            position:"relative"
        })
        }else{
        f.extend(a,{
            position:c.css("position"),
            zIndex:c.css("z-index")
            });
        f.each(["top","left","bottom","right"],function(e,g){
            a[g]=c.css(g);
            if(isNaN(parseInt(a[g],10)))a[g]="auto"
                });
        c.css({
            position:"relative",
            top:0,
            left:0,
            right:"auto",
            bottom:"auto"
        })
        }
        return b.css(a).show()
    },
removeWrapper:function(c){
    var a,b=document.activeElement;
    if(c.parent().is(".ui-effects-wrapper")){
        a=c.parent().replaceWith(c);
        if(c[0]===b||f.contains(c[0],b))f(b).focus();
        return a
        }
        return c
    },
setTransition:function(c,a,b,d){
    d=d||{};
    
    f.each(a,function(e,g){
        unit=c.cssUnit(g);
        if(unit[0]>0)d[g]=unit[0]*b+unit[1]
            });
    return d
    }
});
f.fn.extend({
    effect:function(c){
        var a=k.apply(this,arguments),b={
            options:a[1],
            duration:a[2],
            callback:a[3]
            };
            
        a=b.options.mode;
        var d=f.effects[c];
        if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){
            b.callback&&b.callback.call(this)
            });
        return d.call(this,b)
        },
    _show:f.fn.show,
    show:function(c){
        if(l(c))return this._show.apply(this,arguments);
        else{
            var a=k.apply(this,arguments);
            a[1].mode="show";
            return this.effect.apply(this,a)
            }
        },
_hide:f.fn.hide,
hide:function(c){
    if(l(c))return this._hide.apply(this,arguments);
    else{
        var a=k.apply(this,arguments);
        a[1].mode="hide";
        return this.effect.apply(this,a)
        }
    },
__toggle:f.fn.toggle,
toggle:function(c){
    if(l(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);
    else{
        var a=k.apply(this,
            arguments);
        a[1].mode="toggle";
        return this.effect.apply(this,a)
        }
    },
cssUnit:function(c){
    var a=this.css(c),b=[];
    f.each(["em","px","%","pt"],function(d,e){
        if(a.indexOf(e)>0)b=[parseFloat(a),e]
            });
    return b
    }
});
f.easing.jswing=f.easing.swing;
f.extend(f.easing,{
    def:"easeOutQuad",
    swing:function(c,a,b,d,e){
        return f.easing[f.easing.def](c,a,b,d,e)
        },
    easeInQuad:function(c,a,b,d,e){
        return d*(a/=e)*a+b
        },
    easeOutQuad:function(c,a,b,d,e){
        return-d*(a/=e)*(a-2)+b
        },
    easeInOutQuad:function(c,a,b,d,e){
        if((a/=e/2)<1)return d/
            2*a*a+b;
        return-d/2*(--a*(a-2)-1)+b
        },
    easeInCubic:function(c,a,b,d,e){
        return d*(a/=e)*a*a+b
        },
    easeOutCubic:function(c,a,b,d,e){
        return d*((a=a/e-1)*a*a+1)+b
        },
    easeInOutCubic:function(c,a,b,d,e){
        if((a/=e/2)<1)return d/2*a*a*a+b;
        return d/2*((a-=2)*a*a+2)+b
        },
    easeInQuart:function(c,a,b,d,e){
        return d*(a/=e)*a*a*a+b
        },
    easeOutQuart:function(c,a,b,d,e){
        return-d*((a=a/e-1)*a*a*a-1)+b
        },
    easeInOutQuart:function(c,a,b,d,e){
        if((a/=e/2)<1)return d/2*a*a*a*a+b;
        return-d/2*((a-=2)*a*a*a-2)+b
        },
    easeInQuint:function(c,a,b,
        d,e){
        return d*(a/=e)*a*a*a*a+b
        },
    easeOutQuint:function(c,a,b,d,e){
        return d*((a=a/e-1)*a*a*a*a+1)+b
        },
    easeInOutQuint:function(c,a,b,d,e){
        if((a/=e/2)<1)return d/2*a*a*a*a*a+b;
        return d/2*((a-=2)*a*a*a*a+2)+b
        },
    easeInSine:function(c,a,b,d,e){
        return-d*Math.cos(a/e*(Math.PI/2))+d+b
        },
    easeOutSine:function(c,a,b,d,e){
        return d*Math.sin(a/e*(Math.PI/2))+b
        },
    easeInOutSine:function(c,a,b,d,e){
        return-d/2*(Math.cos(Math.PI*a/e)-1)+b
        },
    easeInExpo:function(c,a,b,d,e){
        return a==0?b:d*Math.pow(2,10*(a/e-1))+b
        },
    easeOutExpo:function(c,
        a,b,d,e){
        return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b
        },
    easeInOutExpo:function(c,a,b,d,e){
        if(a==0)return b;
        if(a==e)return b+d;
        if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;
        return d/2*(-Math.pow(2,-10*--a)+2)+b
        },
    easeInCirc:function(c,a,b,d,e){
        return-d*(Math.sqrt(1-(a/=e)*a)-1)+b
        },
    easeOutCirc:function(c,a,b,d,e){
        return d*Math.sqrt(1-(a=a/e-1)*a)+b
        },
    easeInOutCirc:function(c,a,b,d,e){
        if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;
        return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b
        },
    easeInElastic:function(c,a,b,
        d,e){
        c=1.70158;
        var g=0,h=d;
        if(a==0)return b;
        if((a/=e)==1)return b+d;
        g||(g=e*0.3);
        if(h<Math.abs(d)){
            h=d;
            c=g/4
            }else c=g/(2*Math.PI)*Math.asin(d/h);
        return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b
        },
    easeOutElastic:function(c,a,b,d,e){
        c=1.70158;
        var g=0,h=d;
        if(a==0)return b;
        if((a/=e)==1)return b+d;
        g||(g=e*0.3);
        if(h<Math.abs(d)){
            h=d;
            c=g/4
            }else c=g/(2*Math.PI)*Math.asin(d/h);
        return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b
        },
    easeInOutElastic:function(c,a,b,d,e){
        c=1.70158;
        var g=
        0,h=d;
        if(a==0)return b;
        if((a/=e/2)==2)return b+d;
        g||(g=e*0.3*1.5);
        if(h<Math.abs(d)){
            h=d;
            c=g/4
            }else c=g/(2*Math.PI)*Math.asin(d/h);
        if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;
        return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b
        },
    easeInBack:function(c,a,b,d,e,g){
        if(g==j)g=1.70158;
        return d*(a/=e)*a*((g+1)*a-g)+b
        },
    easeOutBack:function(c,a,b,d,e,g){
        if(g==j)g=1.70158;
        return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b
        },
    easeInOutBack:function(c,a,b,d,e,g){
        if(g==j)g=1.70158;
        if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;
        return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b
        },
    easeInBounce:function(c,a,b,d,e){
        return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b
        },
    easeOutBounce:function(c,a,b,d,e){
        return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b
        },
    easeInOutBounce:function(c,a,b,d,e){
        if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;
        return f.easing.easeOutBounce(c,
            a*2-e,0,d,e)*0.5+d*0.5+b
        }
    })
}(jQuery);
;/*
 * jQuery UI Effects Fade 1.8.16
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Fade
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(b){
    b.effects.fade=function(a){
        return this.queue(function(){
            var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");
            c.animate({
                opacity:d
            },{
                queue:false,
                duration:a.duration,
                easing:a.options.easing,
                complete:function(){
                    a.callback&&a.callback.apply(this,arguments);
                    c.dequeue()
                    }
                })
        })
    }
})(jQuery);
;

/* $$$$$$$$$$$$$$$$$$$$$$$ */
/* FIN JQUERY TABS */
/* $$$$$$$$$$$$$$$$$$$$$$$ */









// TOUTES NOS ACTIVITES
// ****************************************************************************
/* fonction pour gérer l'affichage du menu Toutes nos activités */
//function displaySmActivite(){
//    
//    var smContent = $("#display-menu").parent();
//    
//    $("#display-menu").css("display","block");
//    
//    $("#display-menu").toggle(function(){
//        $(smContent).addClass('displayed');
//        $(this).fadeOut(500, function(){
//            $(this).html("<small>Cliquez pour déverouiller le menu</small>").css({
//                "color":"black"
//            }).fadeIn();
//            $("#display-menu:hover").css("color","white");
//        });
//    }, function(){
//        $(smContent).removeClass('displayed');
//        $(this).fadeOut(500, function(){
//            $(this).html("<small>Cliquez pour verouiller le menu</small>").css("color","white").fadeIn();
//        });
//    });
//}

// // OPEN LIST
// ****************************************************************************
/*fonction pour afficher la globalité
d'une liste après click sur le lien
 ex: "Voir tous nos articles" */
function openList(){
    
    // nombre element affiché à l'ouverture de la page'
    var nbreElmtDefault = 3
    
    $(".bloc-list .dynamique").each(function(){
        
        // récup du nbre total de li
        var nbreElmtList = $("li", this).size();
        var elmtSup = $("li", this).slice(nbreElmtDefault, -1);
        // btn global list
        var listBtnLi = $(".link-global-list", this).parent("li");
        var listBtnA = $(".link-global-list", this);    
    
        if (nbreElmtList > (nbreElmtDefault+1)){   
            //efface les élement li > nbreElmtDefault et < dernier élément (btn affichage liste)
            $(elmtSup).css("display","none");
            $(listBtnA).css("display","block");
        }       
        
        // au click sur btn li a.link-global-list
        $(listBtnLi).click(function(event){ 
            event.preventDefault();
            $(elmtSup).fadeIn(900);
            $(listBtnA).parent(this).css("display","none");
        });

    });

}
// ****************************************************************************
// MANAGE COMMANDE - > page Centenaire du bureau
// ****************************************************************************
/* fonction pour afficher en tps réél le prix de la commande 
 * livre ou DVD centenaire du bureau + gestion bouton envoi
 * cf : page centenaire
 */
function manageCommande(pDvd,pLivre,messageNoElmt){
    
    
    var message = $('#warning-message');
    var total = 0 ;
    
    $('.field-commande select').live({
        change : function (){
            
            var nbreDvd = $('#dvd').val();
            var nbreLivre = $('#livre').val();
                
            total = ( nbreDvd * pDvd ) + ( nbreLivre *  pLivre) ;
            
            // actualise affichage du total 
            $("#total-display .prix-t").fadeOut(500, function(){        
                $(this).fadeIn().html(total);
            });
            // efface le message d'avertissement si celui est affiché
            if (( total > 0 ) && ( $(message).is(':visible')) ) {
                $(message).fadeOut(800);
            }       
            return total;             
        }            
    });
     
     
    // au click sur bouton d'envoi      
    $('.page.culture #send-btn').click( function() {
        
        if (total === 0 ){          
            $(message)
            .html(messageNoElmt)
            .css({
                 
                'color': '#AE371B',
                'font-weight':'bold',
                'text-align' : 'center',
                'font-size' : '0.9em'
            })
            //.slideDown('slow')
            .fadeIn(800);                
            return false;      
        } 
    });
  
}

// ****************************************************************************
// CHECK REQUIRED FIELDS
// ****************************************************************************
/* fonction pour vérifier le formulaire de pré insciption avant envoi
 * cf : page partir-inscription */

function checkFormField (){
    
    // txt qui s'affiche si champs requis pas rempli
    var txtRequiredField = "\
<p>Désolé nous ne pouvons pas envoyer le formulaire.<br />\n\
Un champs requis n'a pas été rempli.</p>"
    
    // init 
    $("#warning-message").fadeOut('slow');
    $(".required").removeClass("empty-field");
    
    // au click sur submit
    $("#send-btn").click(function(){
        
        // init au submit
        $(".required").removeClass("empty-field");
        $("#warning-message").fadeOut('slow');
        
        // def variable pour validation envoi
        // à true par défaut sauf si une condition vient la mettre à false
        valid = true ;
        
        // check des field avec class ".required"
        var fieldContent = $(".required").each(function(index, value){
            
            // récupération de la valeur du input
            var valueField = $(this).val();
            
            // si valeur vide
            if (valueField == ''){
                
                //ajout de class "empty-field"
                $(this).addClass("empty-field");
                // affchage du texte dans warning message
                $("#warning-message")
                    // ajoute le texte dans la div (voir def var txt en haut)
                    .html(txtRequiredField)
                    // du css
                    .css({
                    'color': '#AE371B',
                    'font-weight':'bold',
                    'text-align' : 'center',
                    'font-size' : '0.9em'
                }).
                    //fondu
                    fadeIn('slow');
                    
                // variable valid à false pour empecher l'envoi
                valid = false ; 
            
            } else {
                // si le champ est plein et dans le cas ou il ne l'était pas avant
                // on enlève la class empty-field'
                $(this).removeClass("empty-field");
            } 
        });
        
        // retour de la valeur définitive de valid
        return valid; 
    });
  
}

// ****************************************************************************
// LISTE DES GUIDES
// ****************************************************************************
/* fonction pour changer la bio des guides en fonction du nom cliqué
 * cf : page contact
 */
function listeGuide() {
    
    $('.portrait').css({
        "height":"auto", 
        "overflow":"hidden"
    });
    $('.portrait .bio').css("display", "none");
    $('.photo-famille').addClass('actif');
    $('.bio').css("margin-top","0px");
    
    $(".guide li").click(function(event){
        
        event.preventDefault();
        var refBase = $("a", this).attr('href').split('#');
        var ref = refBase[1];
        var refContent = $("#" + ref ); 
        
        // objet cliqué (span)
        var target = event.target ;
        // on remonte pour ne modifier que l'élément parent
        var targetPortrait = $(target).parents('.guide').next('.portrait').find('.actif');
        //console.log (target);
        //console.log (refContent);
        console.log (targetPortrait);
        
        $(targetPortrait).fadeOut(500, function(){
            $(this).removeClass('actif');
            $(refContent).addClass('actif').fadeIn(500); 
        });  
  
    });
    
    $( ".accordion" ).accordion({
			autoHeight: false,
			navigation: true,
                        collapsible: true,
                        active: false
		});
        
//    $('.portrait').css({
//        "height":"auto", 
//        "overflow":"hidden"
//    });
//    $('.portrait .bio').css("display", "none");
//    $('.photo-famille').addClass('actif');
//    $('.bio').css("margin-top","0px");
//    
//    $(".guide li").click(function(event){
//        
//        event.preventDefault();
//        var refBase = $("a", this).attr('href').split('#');
//        var ref = refBase[1];
//        var refContent = $("#" + ref ); 
//        
//        // objet cliqué (span)
//        var target = event.target ;
//        // on remonte pour ne modifier que l'élément parent
//        var targetPortrait = $(target).parents('.guide').next('.portrait').find('.actif');
//        //console.log (target);
//        //console.log (refContent);
//        console.log (targetPortrait);
//        
//        $(targetPortrait).fadeOut(500, function(){
//            $(this).removeClass('actif');
//            $(refContent).addClass('actif').fadeIn(500); 
//        });  
//  
//    });
    
}
// ****************************************************************************
// TABS FICHE PRODUIT DETAIL
// ****************************************************************************
/* Gestion des tabs sur la page produit, détail du produit
 */
function tabManagement(){
    // init CSS  
    $("#content").css({
        'overflow':'hidden',
        "height":"auto"
    });  
    $("#content .content").css('display','none');  
    $("#content .content.active").css('display', 'block');
    /*$(".tabs li").last().css('width','108px'); */
    
    $("#prod-detail .tabs li").click(function(event){
        
        var refBase = $("a", this).attr('href').split('#');
        var ref = refBase[1];
        var refContent = $("#" + ref ); 
        var elmtClicked = this ;
        var tab = $("#prod-detail .tabs li");
      
        $('.content.active').fadeOut(500, function(){
            $('.active').removeClass('active');
            $(elmtClicked).addClass('active');
            $(refContent).addClass('active').fadeIn(500);
        });    
        event.preventDefault(); 
    });
     
}
// ****************************************************************************
// IE ACCUEIL
// ****************************************************************************
/* Fonctions pour permettre l'affichage de bloc couleur sur accueil
 *  quand la fenêtre est réduite en hauteur
 */
function ieDebug(){
    
    //page accueil remplace le media query
    $(window).resize(function(){
        var largeurFenetre = $(window).width();
        var hauteurFenetre = $(window).height();
        
        $(".ie7 #main.accueil .bloc").css('background','none');
        
        if( hauteurFenetre < 900 ){
            $(".ie7 #main.accueil .bloc , .ie8 #main.accueil .bloc").css({
                'background':'#5896ad',
                'min-height':'265px'
            });
            $(".ie7 #main.accueil .bloc:first-child , .ie8 #main.accueil .bloc:first-child").css('margin-left','0');
        } else {
            $(".ie7 #main.accueil .bloc , .ie8 #main.accueil .bloc").css({
                'background':'none',
                'min-height':'265px'
            });           
        }
    });
    
    $(".ie7 #main-nav .standard,.ie7 #main-nav .activite").hover(function(){
        $(".ie7 #main-nav .standard > a span").css('visibility','hidden');
    }, function(){
        $(".ie7 #main-nav .standard > a span").css('visibility','visible');
    });
//    $(".ie7 .sm-label.bl:fisrt-child").hover(function(){
//        $(".ie7 .sm-sm").css('visibility','hidden');
//    }, function(){
//        $(".ie7 #main-nav .standard > a span").css('visibility','visible');
//    });
    
}
// ****************************************************************************
// AJAX classements des produits
// ****************************************************************************
/* Quand l'utilisateur sélectionne un classement (un select) on envoi de l'Ajax pour reclasser le tableau */

function changeSelect(){

      var a = window.location.href.split('.');
      var b = a[a.length-2].split('/');

      var page = b[1] || '';
      var info1 = b[2] || '';
      var info2 = b[3] || '';
      var info3 = b[4] || '';

      $.ajax({
         type: 'POST',
         data: $("#sort-bar").serialize(),
         url: "./php/ajaxProduit.php?page="+page+"&info1="+info1+"&info2="+info2+"&info3="+info3,
         success: function(zertyu){
            $("section#main").empty();
            $("section#main").append(zertyu);
            lancerTabs();
            $('#sort-bar-sub').css('display','none');
            },
         error: function(XMLHttpRequest, textStatus, errorThrown){
            alert(textStatus);
            }
       })

       return false;
}

// ****************************************************************************
// lancer Tabs
// ****************************************************************************

    function lancerTabs() {
        $( "#tabs" ).tabs(
        {
            fx: {
                opacity: 'toggle'
            }
        }
        );
    }


// ****************************************************************************
// DEBUG
// ****************************************************************************
/* Fonctions debug à enlever pour la prod
 */

function debug(){
    $(window).resize(function(){
        var largeurFenetre = $(window).width();
        var hauteurFenetre = $(window).height();
        console.log ("Largeur fenêtre = " + largeurFenetre );
        console.log ("Hauteur fenêtre = " + hauteurFenetre );
    }) 
}


// ****************************************************************************
// chargement des fonction quand le doc est prêt
$(document).ready(function(){		
    
    // page centenaire commande : affichage du total
    var pDvd = 15 ;
    var pLivre = 10 ;
    var messageNoElmt = "Pour envoyer votre demande, vous devez séléctionner une quantité de livre et/ou de DVD."
    
    // zoombox -> général
    $('.zoombox').zoombox();
    
    // gestion du menu toutes nos activités
//    displaySmActivite();
    
    // affiche le totalité d'une liste sur liste dynamique' -> général
    openList();
    
    // gestion formulaire d'envoi centenaire du bureau -> page centenaire
    manageCommande ( pDvd,pLivre,messageNoElmt );
    
    // liste des guide -> page contact
    listeGuide();
    
    // gestion des tabs pour détail fiche produit -> page produit
    tabManagement();
    
    // page d'accueil et gestion hauteur pour ie8 et ie7
    // remplacement des media queries'
    ieDebug();
    
    // debug - affiche des infos dans la console 
    debug();
    
    // tabs
    lancerTabs();
    
    // changement des select dans les produits
    $('#sort-bar-sub').css('display','none');
    $(".selectChange").live('change',function(){
         changeSelect();
      return false;
   });
    
});

