(function(){
    var W=this,ab,F=W.jQuery,S=W.$,T=W.jQuery=W.$=function(b,a){
        return new T.fn.init(b,a)
        },M=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,ac=/^.[^:#\[\.,]*$/;
    T.fn=T.prototype={
        init:function(e,b){
            e=e||document;
            if(e.nodeType){
                this[0]=e;
                this.length=1;
                this.context=e;
                return this
                }
                if(typeof e==="string"){
                var c=M.exec(e);
                if(c&&(c[1]||!b)){
                    if(c[1]){
                        e=T.clean([c[1]],b)
                        }else{
                        var a=document.getElementById(c[3]);
                        if(a&&a.id!=c[3]){
                            return T().find(e)
                            }
                            var d=T(a||[]);
                        d.context=document;
                        d.selector=e;
                        return d
                        }
                    }else{
                return T(b).find(e)
                }
            }else{
        if(T.isFunction(e)){
            return T(document).ready(e)
            }
        }
    if(e.selector&&e.context){
    this.selector=e.selector;
    this.context=e.context
    }
    return this.setArray(T.isArray(e)?e:T.makeArray(e))
    },
selector:"",
jquery:"1.3.2",
size:function(){
    return this.length
    },
get:function(a){
    return a===ab?Array.prototype.slice.call(this):this[a]
    },
pushStack:function(c,a,d){
    var b=T(c);
    b.prevObject=this;
    b.context=this.context;
    if(a==="find"){
        b.selector=this.selector+(this.selector?" ":"")+d
        }else{
        if(a){
            b.selector=this.selector+"."+a+"("+d+")"
            }
        }
    return b
},
setArray:function(a){
    this.length=0;
    Array.prototype.push.apply(this,a);
    return this
    },
each:function(a,b){
    return T.each(this,a,b)
    },
index:function(a){
    return T.inArray(a&&a.jquery?a[0]:a,this)
    },
attr:function(c,a,b){
    var d=c;
    if(typeof c==="string"){
        if(a===ab){
            return this[0]&&T[b||"attr"](this[0],c)
            }else{
            d={};

            d[c]=a
            }
        }
    return this.each(function(e){
    for(c in d){
        T.attr(b?this.style:this,c,T.prop(this,d[c],b,e,c))
        }
    })
},
css:function(b,a){
    if((b=="width"||b=="height")&&parseFloat(a)<0){
        a=ab
        }
        return this.attr(b,a,"curCSS")
    },
text:function(a){
    if(typeof a!=="object"&&a!=null){
        return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(a))
        }
        var b="";
    T.each(a||this,function(){
        T.each(this.childNodes,function(){
            if(this.nodeType!=8){
                b+=this.nodeType!=1?this.nodeValue:T.fn.text([this])
                }
            })
    });
return b
},
wrapAll:function(b){
    if(this[0]){
        var a=T(b,this[0].ownerDocument).clone();
        if(this[0].parentNode){
            a.insertBefore(this[0])
            }
            a.map(function(){
            var c=this;
            while(c.firstChild){
                c=c.firstChild
                }
                return c
            }).append(this)
        }
        return this
    },
wrapInner:function(a){
    return this.each(function(){
        T(this).contents().wrapAll(a)
        })
    },
wrap:function(a){
    return this.each(function(){
        T(this).wrapAll(a)
        })
    },
append:function(){
    return this.domManip(arguments,true,function(a){
        if(this.nodeType==1){
            this.appendChild(a)
            }
        })
},
prepend:function(){
    return this.domManip(arguments,true,function(a){
        if(this.nodeType==1){
            this.insertBefore(a,this.firstChild)
            }
        })
},
before:function(){
    return this.domManip(arguments,false,function(a){
        this.parentNode.insertBefore(a,this)
        })
    },
after:function(){
    return this.domManip(arguments,false,function(a){
        this.parentNode.insertBefore(a,this.nextSibling)
        })
    },
end:function(){
    return this.prevObject||T([])
    },
push:[].push,
sort:[].sort,
splice:[].splice,
find:function(b){
    if(this.length===1){
        var a=this.pushStack([],"find",b);
        a.length=0;
        T.find(b,this[0],a);
        return a
        }else{
        return this.pushStack(T.unique(T.map(this,function(c){
            return T.find(b,c)
            })),"find",b)
        }
    },
clone:function(b){
    var d=this.map(function(){
        if(!T.support.noCloneEvent&&!T.isXMLDoc(this)){
            var f=this.outerHTML;
            if(!f){
                var e=this.ownerDocument.createElement("div");
                e.appendChild(this.cloneNode(true));
                f=e.innerHTML
                }
                return T.clean([f.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]
            }else{
            return this.cloneNode(true)
            }
        });
if(b===true){
    var a=this.find("*").andSelf(),c=0;
    d.find("*").andSelf().each(function(){
        if(this.nodeName!==a[c].nodeName){
            return
        }
        var g=T.data(a[c],"events");
        for(var e in g){
            for(var f in g[e]){
                T.event.add(this,e,g[e][f],g[e][f].data)
                }
            }
            c++
    })
}
return d
},
filter:function(a){
    return this.pushStack(T.isFunction(a)&&T.grep(this,function(b,c){
        return a.call(b,c)
        })||T.multiFilter(a,T.grep(this,function(b){
        return b.nodeType===1
        })),"filter",a)
    },
closest:function(c){
    var a=T.expr.match.POS.test(c)?T(c):null,b=0;
    return this.map(function(){
        var d=this;
        while(d&&d.ownerDocument){
            if(a?a.index(d)>-1:T(d).is(c)){
                T.data(d,"closest",b);
                return d
                }
                d=d.parentNode;
            b++
        }
    })
},
not:function(b){
    if(typeof b==="string"){
        if(ac.test(b)){
            return this.pushStack(T.multiFilter(b,this,true),"not",b)
            }else{
            b=T.multiFilter(b,this)
            }
        }
    var a=b.length&&b[b.length-1]!==ab&&!b.nodeType;
return this.filter(function(){
    return a?T.inArray(this,b)<0:this!=b
    })
},
add:function(a){
    return this.pushStack(T.unique(T.merge(this.get(),typeof a==="string"?T(a):T.makeArray(a))))
    },
is:function(a){
    return !!a&&T.multiFilter(a,this).length>0
    },
hasClass:function(a){
    return !!a&&this.is("."+a)
    },
val:function(c){
    if(c===ab){
        var j=this[0];
        if(j){
            if(T.nodeName(j,"option")){
                return(j.attributes.value||{}).specified?j.value:j.text
                }
                if(T.nodeName(j,"select")){
                var e=j.selectedIndex,b=[],a=j.options,f=j.type=="select-one";
                if(e<0){
                    return null
                    }
                    for(var h=f?e:0,d=f?e+1:a.length;h<d;h++){
                    var g=a[h];
                    if(g.selected){
                        c=T(g).val();
                        if(f){
                            return c
                            }
                            b.push(c)
                        }
                    }
                return b
            }
            return(j.value||"").replace(/\r/g,"")
        }
        return ab
    }
    if(typeof c==="number"){
    c+=""
    }
    return this.each(function(){
    if(this.nodeType!=1){
        return
    }
    if(T.isArray(c)&&/radio|checkbox/.test(this.type)){
        this.checked=(T.inArray(this.value,c)>=0||T.inArray(this.name,c)>=0)
        }else{
        if(T.nodeName(this,"select")){
            var k=T.makeArray(c);
            T("option",this).each(function(){
                this.selected=(T.inArray(this.value,k)>=0||T.inArray(this.text,k)>=0)
                });
            if(!k.length){
                this.selectedIndex=-1
                }
            }else{
        this.value=c
        }
    }
})
},
html:function(a){
    return a===ab?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(a)
    },
replaceWith:function(a){
    return this.after(a).remove()
    },
eq:function(a){
    return this.slice(a,+a+1)
    },
slice:function(){
    return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))
    },
map:function(a){
    return this.pushStack(T.map(this,function(b,c){
        return a.call(b,c,b)
        }))
    },
andSelf:function(){
    return this.add(this.prevObject)
    },
domManip:function(d,a,b){
    if(this[0]){
        var e=(this[0].ownerDocument||this[0]).createDocumentFragment(),h=T.clean(d,(this[0].ownerDocument||this[0]),e),f=e.firstChild;
        if(f){
            for(var g=0,j=this.length;g<j;g++){
                b.call(c(this[g],f),this.length>1||g>0?e.cloneNode(true):e)
                }
            }
            if(h){
        T.each(h,E)
        }
    }
return this;
function c(l,k){
    return a&&T.nodeName(l,"table")&&T.nodeName(k,"tr")?(l.getElementsByTagName("tbody")[0]||l.appendChild(l.ownerDocument.createElement("tbody"))):l
    }
}
};

T.fn.init.prototype=T.fn;
function E(b,a){
    if(a.src){
        T.ajax({
            url:a.src,
            async:false,
            dataType:"script"
        })
        }else{
        T.globalEval(a.text||a.textContent||a.innerHTML||"")
        }
        if(a.parentNode){
        a.parentNode.removeChild(a)
        }
    }
function ad(){
    return +new Date
    }
    T.extend=T.fn.extend=function(){
    var c=arguments[0]||{},e=1,d=arguments.length,h=false,f;
    if(typeof c==="boolean"){
        h=c;
        c=arguments[1]||{};

        e=2
        }
        if(typeof c!=="object"&&!T.isFunction(c)){
        c={}
    }
    if(d==e){
    c=this;
    --e
    }
    for(;e<d;e++){
    if((f=arguments[e])!=null){
        for(var g in f){
            var b=c[g],a=f[g];
            if(c===a){
                continue
            }
            if(h&&a&&typeof a==="object"&&!a.nodeType){
                c[g]=T.extend(h,b||(a.length!=null?[]:{}),a)
                }else{
                if(a!==ab){
                    c[g]=a
                    }
                }
        }
        }
}
return c
};

var ag=/z-?index|font-?weight|opacity|zoom|line-?height/i,Q=document.defaultView||{},L=Object.prototype.toString;
T.extend({
    noConflict:function(a){
        W.$=S;
        if(a){
            W.jQuery=F
            }
            return T
        },
    isFunction:function(a){
        return L.call(a)==="[object Function]"
        },
    isArray:function(a){
        return L.call(a)==="[object Array]"
        },
    isXMLDoc:function(a){
        return a.nodeType===9&&a.documentElement.nodeName!=="HTML"||!!a.ownerDocument&&T.isXMLDoc(a.ownerDocument)
        },
    globalEval:function(a){
        if(a&&/\S/.test(a)){
            var b=document.getElementsByTagName("head")[0]||document.documentElement,c=document.createElement("script");
            c.type="text/javascript";
            if(T.support.scriptEval){
                c.appendChild(document.createTextNode(a))
                }else{
                c.text=a
                }
                b.insertBefore(c,b.firstChild);
            b.removeChild(c)
            }
        },
nodeName:function(a,b){
    return a.nodeName&&a.nodeName.toUpperCase()==b.toUpperCase()
    },
each:function(e,a,f){
    var g,d=0,c=e.length;
    if(f){
        if(c===ab){
            for(g in e){
                if(a.apply(e[g],f)===false){
                    break
                }
            }
            }else{
    for(;d<c;){
        if(a.apply(e[d++],f)===false){
            break
        }
    }
    }
}else{
    if(c===ab){
        for(g in e){
            if(a.call(e[g],g,e[g])===false){
                break
            }
        }
        }else{
    for(var b=e[0];d<c&&a.call(b,d,b)!==false;b=e[++d]){}
}
}
return e
},
prop:function(b,a,c,d,e){
    if(T.isFunction(a)){
        a=a.call(b,d)
        }
        return typeof a==="number"&&c=="curCSS"&&!ag.test(e)?a+"px":a
    },
className:{
    add:function(b,a){
        T.each((a||"").split(/\s+/),function(d,c){
            if(b.nodeType==1&&!T.className.has(b.className,c)){
                b.className+=(b.className?" ":"")+c
                }
            })
    },
remove:function(b,a){
    if(b.nodeType==1){
        b.className=a!==ab?T.grep(b.className.split(/\s+/),function(c){
            return !T.className.has(a,c)
            }).join(" "):""
        }
    },
has:function(a,b){
    return a&&T.inArray(b,(a.className||a).toString().split(/\s+/))>-1
    }
},
swap:function(b,c,a){
    var e={};

    for(var d in c){
        e[d]=b.style[d];
        b.style[d]=c[d]
        }
        a.call(b);
    for(var d in c){
        b.style[d]=e[d]
        }
    },
css:function(e,g,c,h){
    if(g=="width"||g=="height"){
        var a,f={
            position:"absolute",
            visibility:"hidden",
            display:"block"
        },b=g=="width"?["Left","Right"]:["Top","Bottom"];
        function d(){
            a=g=="width"?e.offsetWidth:e.offsetHeight;
            if(h==="border"){
                return
            }
            T.each(b,function(){
                if(!h){
                    a-=parseFloat(T.curCSS(e,"padding"+this,true))||0
                    }
                    if(h==="margin"){
                    a+=parseFloat(T.curCSS(e,"margin"+this,true))||0
                    }else{
                    a-=parseFloat(T.curCSS(e,"border"+this+"Width",true))||0
                    }
                })
        }
        if(e.offsetWidth!==0){
        d()
        }else{
        T.swap(e,f,d)
        }
        return Math.max(0,Math.round(a))
    }
    return T.curCSS(e,g,c)
},
curCSS:function(e,h,g){
    var b,j=e.style;
    if(h=="opacity"&&!T.support.opacity){
        b=T.attr(j,"opacity");
        return b==""?"1":b
        }
        if(h.match(/float/i)){
        h=H
        }
        if(!g&&j&&j[h]){
        b=j[h]
        }else{
        if(Q.getComputedStyle){
            if(h.match(/float/i)){
                h="float"
                }
                h=h.replace(/([A-Z])/g,"-$1").toLowerCase();
            var a=Q.getComputedStyle(e,null);
            if(a){
                b=a.getPropertyValue(h)
                }
                if(h=="opacity"&&b==""){
                b="1"
                }
            }else{
        if(e.currentStyle){
            var d=h.replace(/\-(\w)/g,function(l,k){
                return k.toUpperCase()
                });
            b=e.currentStyle[h]||e.currentStyle[d];
            if(!/^\d+(px)?$/i.test(b)&&/^\d/.test(b)){
                var f=j.left,c=e.runtimeStyle.left;
                e.runtimeStyle.left=e.currentStyle.left;
                j.left=b||0;
                b=j.pixelLeft+"px";
                j.left=f;
                e.runtimeStyle.left=c
                }
            }
    }
}
return b
},
clean:function(g,b,d){
    b=b||document;
    if(typeof b.createElement==="undefined"){
        b=b.ownerDocument||b[0]&&b[0].ownerDocument||document
        }
        if(!d&&g.length===1&&typeof g[0]==="string"){
        var e=/^<(\w+)\s*\/?>$/.exec(g[0]);
        if(e){
            return[b.createElement(e[1])]
            }
        }
    var f=[],h=[],a=b.createElement("div");
T.each(g,function(m,j){
    if(typeof j==="number"){
        j+=""
        }
        if(!j){
        return
    }
    if(typeof j==="string"){
        j=j.replace(/(<(\w+)[^>]*?)\/>/g,function(r,q,t){
            return t.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?r:q+"></"+t+">"
            });
        var n=j.replace(/^\s+/,"").substring(0,10).toLowerCase();
        var l=!n.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!n.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||n.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!n.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!n.indexOf("<td")||!n.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!n.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!T.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];
        a.innerHTML=l[1]+j+l[2];
        while(l[0]--){
            a=a.lastChild
            }
            if(!T.support.tbody){
            var k=/<tbody/i.test(j),o=!n.indexOf("<table")&&!k?a.firstChild&&a.firstChild.childNodes:l[1]=="<table>"&&!k?a.childNodes:[];
            for(var p=o.length-1;p>=0;--p){
                if(T.nodeName(o[p],"tbody")&&!o[p].childNodes.length){
                    o[p].parentNode.removeChild(o[p])
                    }
                }
            }
        if(!T.support.leadingWhitespace&&/^\s/.test(j)){
    a.insertBefore(b.createTextNode(j.match(/^\s*/)[0]),a.firstChild)
    }
    j=T.makeArray(a.childNodes)
    }
    if(j.nodeType){
    f.push(j)
    }else{
    f=T.merge(f,j)
    }
});
if(d){
    for(var c=0;f[c];c++){
        if(T.nodeName(f[c],"script")&&(!f[c].type||f[c].type.toLowerCase()==="text/javascript")){
            h.push(f[c].parentNode?f[c].parentNode.removeChild(f[c]):f[c])
            }else{
            if(f[c].nodeType===1){
                f.splice.apply(f,[c+1,0].concat(T.makeArray(f[c].getElementsByTagName("script"))))
                }
                d.appendChild(f[c])
            }
        }
    return h
}
return f
},
attr:function(c,f,b){
    if(!c||c.nodeType==3||c.nodeType==8){
        return ab
        }
        var e=!T.isXMLDoc(c),a=b!==ab;
    f=e&&T.props[f]||f;
    if(c.tagName){
        var g=/href|src|style/.test(f);
        if(f=="selected"&&c.parentNode){
            c.parentNode.selectedIndex
            }
            if(f in c&&e&&!g){
            if(a){
                if(f=="type"&&T.nodeName(c,"input")&&c.parentNode){
                    throw"type property can't be changed"
                    }
                    c[f]=b
                }
                if(T.nodeName(c,"form")&&c.getAttributeNode(f)){
                return c.getAttributeNode(f).nodeValue
                }
                if(f=="tabIndex"){
                var d=c.getAttributeNode("tabIndex");
                return d&&d.specified?d.value:c.nodeName.match(/(button|input|object|select|textarea)/i)?0:c.nodeName.match(/^(a|area)$/i)&&c.href?0:ab
                }
                return c[f]
            }
            if(!T.support.style&&e&&f=="style"){
            return T.attr(c.style,"cssText",b)
            }
            if(a){
            c.setAttribute(f,""+b)
            }
            var h=!T.support.hrefNormalized&&e&&g?c.getAttribute(f,2):c.getAttribute(f);
        return h===null?ab:h
        }
        if(!T.support.opacity&&f=="opacity"){
        if(a){
            c.zoom=1;
            c.filter=(c.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(b)+""=="NaN"?"":"alpha(opacity="+b*100+")")
            }
            return c.filter&&c.filter.indexOf("opacity=")>=0?(parseFloat(c.filter.match(/opacity=([^)]*)/)[1])/100)+"":""
        }
        f=f.replace(/-([a-z])/ig,function(k,j){
        return j.toUpperCase()
        });
    if(a){
        c[f]=b
        }
        return c[f]
    },
trim:function(a){
    return(a||"").replace(/^\s+|\s+$/g,"")
    },
makeArray:function(a){
    var c=[];
    if(a!=null){
        var b=a.length;
        if(b==null||typeof a==="string"||T.isFunction(a)||a.setInterval){
            c[0]=a
            }else{
            while(b){
                c[--b]=a[b]
                }
            }
    }
return c
},
inArray:function(b,a){
    for(var d=0,c=a.length;d<c;d++){
        if(a[d]===b){
            return d
            }
        }
    return -1
},
merge:function(b,e){
    var d=0,c,a=b.length;
    if(!T.support.getAll){
        while((c=e[d++])!=null){
            if(c.nodeType!=8){
                b[a++]=c
                }
            }
    }else{
    while((c=e[d++])!=null){
        b[a++]=c
        }
    }
return b
},
unique:function(a){
    var f=[],g={};

    try{
        for(var e=0,d=a.length;e<d;e++){
            var b=T.data(a[e]);
            if(!g[b]){
                g[b]=true;
                f.push(a[e])
                }
            }
        }catch(c){
    f=a
    }
    return f
},
grep:function(e,a,f){
    var d=[];
    for(var c=0,b=e.length;c<b;c++){
        if(!f!=!a(e[c],c)){
            d.push(e[c])
            }
        }
    return d
},
map:function(f,a){
    var e=[];
    for(var d=0,c=f.length;d<c;d++){
        var b=a(f[d],d);
        if(b!=null){
            e[e.length]=b
            }
        }
    return e.concat.apply([],e)
}
});
var O=navigator.userAgent.toLowerCase();
T.browser={
    version:(O.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],
    safari:/webkit/.test(O),
    opera:/opera/.test(O),
    msie:/msie/.test(O)&&!/opera/.test(O),
    mozilla:/mozilla/.test(O)&&!/(compatible|webkit)/.test(O)
    };

T.each({
    parent:function(a){
        return a.parentNode
        },
    parents:function(a){
        return T.dir(a,"parentNode")
        },
    next:function(a){
        return T.nth(a,2,"nextSibling")
        },
    prev:function(a){
        return T.nth(a,2,"previousSibling")
        },
    nextAll:function(a){
        return T.dir(a,"nextSibling")
        },
    prevAll:function(a){
        return T.dir(a,"previousSibling")
        },
    siblings:function(a){
        return T.sibling(a.parentNode.firstChild,a)
        },
    children:function(a){
        return T.sibling(a.firstChild)
        },
    contents:function(a){
        return T.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:T.makeArray(a.childNodes)
        }
    },function(b,a){
    T.fn[b]=function(d){
        var c=T.map(this,a);
        if(d&&typeof d=="string"){
            c=T.multiFilter(d,c)
            }
            return this.pushStack(T.unique(c),b,d)
        }
    });
T.each({
    appendTo:"append",
    prependTo:"prepend",
    insertBefore:"before",
    insertAfter:"after",
    replaceAll:"replaceWith"
},function(b,a){
    T.fn[b]=function(h){
        var e=[],c=T(h);
        for(var d=0,g=c.length;d<g;d++){
            var f=(d>0?this.clone(true):this).get();
            T.fn[a].apply(T(c[d]),f);
            e=e.concat(f)
            }
            return this.pushStack(e,b,h)
        }
    });
T.each({
    removeAttr:function(a){
        T.attr(this,a,"");
        if(this.nodeType==1){
            this.removeAttribute(a)
            }
        },
addClass:function(a){
    T.className.add(this,a)
    },
removeClass:function(a){
    T.className.remove(this,a)
    },
toggleClass:function(a,b){
    if(typeof b!=="boolean"){
        b=!T.className.has(this,a)
        }
        T.className[b?"add":"remove"](this,a)
    },
remove:function(a){
    if(!a||T.filter(a,[this]).length){
        T("*",this).add([this]).each(function(){
            T.event.remove(this);
            T.removeData(this)
            });
        if(this.parentNode){
            this.parentNode.removeChild(this)
            }
        }
},
empty:function(){
    T(this).children().remove();
    while(this.firstChild){
        this.removeChild(this.firstChild)
        }
    }
},function(b,a){
    T.fn[b]=function(){
        return this.each(a,arguments)
        }
    });
function Y(b,a){
    return b[0]&&parseInt(T.curCSS(b[0],a,true),10)||0
    }
    var aa="jQuery"+ad(),I=0,R={};

T.extend({
    cache:{},
    data:function(c,d,b){
        c=c==W?R:c;
        var a=c[aa];
        if(!a){
            a=c[aa]=++I
            }
            if(d&&!T.cache[a]){
            T.cache[a]={}
        }
        if(b!==ab){
        T.cache[a][d]=b
        }
        return d?T.cache[a][d]:a
    },
removeData:function(c,d){
    c=c==W?R:c;
    var a=c[aa];
    if(d){
        if(T.cache[a]){
            delete T.cache[a][d];
            d="";
            for(d in T.cache[a]){
                break
            }
            if(!d){
                T.removeData(c)
                }
            }
    }else{
    try{
        delete c[aa]
    }catch(b){
        if(c.removeAttribute){
            c.removeAttribute(aa)
            }
        }
    delete T.cache[a]
}
},
queue:function(c,d,a){
    if(c){
        d=(d||"fx")+"queue";
        var b=T.data(c,d);
        if(!b||T.isArray(a)){
            b=T.data(c,d,T.makeArray(a))
            }else{
            if(a){
                b.push(a)
                }
            }
    }
return b
},
dequeue:function(a,b){
    var d=T.queue(a,b),c=d.shift();
    if(!b||b==="fx"){
        c=d[0]
        }
        if(c!==ab){
        c.call(a)
        }
    }
});
T.fn.extend({
    data:function(d,b){
        var a=d.split(".");
        a[1]=a[1]?"."+a[1]:"";
        if(b===ab){
            var c=this.triggerHandler("getData"+a[1]+"!",[a[0]]);
            if(c===ab&&this.length){
                c=T.data(this[0],d)
                }
                return c===ab&&a[1]?this.data(a[0]):c
            }else{
            return this.trigger("setData"+a[1]+"!",[a[0],b]).each(function(){
                T.data(this,d,b)
                })
            }
        },
removeData:function(a){
    return this.each(function(){
        T.removeData(this,a)
        })
    },
queue:function(b,a){
    if(typeof b!=="string"){
        a=b;
        b="fx"
        }
        if(a===ab){
        return T.queue(this[0],b)
        }
        return this.each(function(){
        var c=T.queue(this,b,a);
        if(b=="fx"&&c.length==1){
            c[0].call(this)
            }
        })
},
dequeue:function(a){
    return this.each(function(){
        T.dequeue(this,a)
        })
    }
});
(function(){
    var b=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,h=0,m=Object.prototype.toString;
    var o=function(t,x,ak,aj){
        ak=ak||[];
        x=x||document;
        if(x.nodeType!==1&&x.nodeType!==9){
            return[]
            }
            if(!t||typeof t!=="string"){
            return ak
            }
            var r=[],v,C,z,y,ai,w,u=true;
        b.lastIndex=0;
        while((v=b.exec(t))!==null){
            r.push(v[1]);
            if(v[2]){
                w=RegExp.rightContext;
                break
            }
        }
        if(r.length>1&&g.exec(t)){
        if(r.length===2&&l.relative[r[0]]){
            C=k(r[0]+r[1],x)
            }else{
            C=l.relative[r[0]]?[x]:o(r.shift(),x);
            while(r.length){
                t=r.shift();
                if(l.relative[t]){
                    t+=r.shift()
                    }
                    C=k(t,C)
                }
            }
    }else{
    var D=aj?{
        expr:r.pop(),
        set:p(aj)
        }:o.find(r.pop(),r.length===1&&x.parentNode?x.parentNode:x,c(x));
    C=o.filter(D.expr,D.set);
    if(r.length>0){
        z=p(C)
        }else{
        u=false
        }while(r.length){
        var A=r.pop(),B=A;
        if(!l.relative[A]){
            A=""
            }else{
            B=r.pop()
            }
            if(B==null){
            B=x
            }
            l.relative[A](z,B,c(x))
        }
    }
if(!z){
    z=C
    }
    if(!z){
    throw"Syntax error, unrecognized expression: "+(A||t)
    }
    if(m.call(z)==="[object Array]"){
    if(!u){
        ak.push.apply(ak,z)
        }else{
        if(x.nodeType===1){
            for(var q=0;z[q]!=null;q++){
                if(z[q]&&(z[q]===true||z[q].nodeType===1&&j(x,z[q]))){
                    ak.push(C[q])
                    }
                }
            }else{
    for(var q=0;z[q]!=null;q++){
        if(z[q]&&z[q].nodeType===1){
            ak.push(C[q])
            }
        }
    }
}
}else{
    p(z,ak)
    }
    if(w){
    o(w,x,ak,aj);
    if(n){
        hasDuplicate=false;
        ak.sort(n);
        if(hasDuplicate){
            for(var q=1;q<ak.length;q++){
                if(ak[q]===ak[q-1]){
                    ak.splice(q--,1)
                    }
                }
            }
    }
}
return ak
};

o.matches=function(r,q){
    return o(r,null,null,q)
    };

o.find=function(q,y,z){
    var r,u;
    if(!q){
        return[]
        }
        for(var v=0,w=l.order.length;v<w;v++){
        var t=l.order[v],u;
        if((u=l.match[t].exec(q))){
            var x=RegExp.leftContext;
            if(x.substr(x.length-1)!=="\\"){
                u[1]=(u[1]||"").replace(/\\/g,"");
                r=l.find[t](u,y,z);
                if(r!=null){
                    q=q.replace(l.match[t],"");
                    break
                }
            }
        }
    }
if(!r){
    r=y.getElementsByTagName("*")
    }
    return{
    set:r,
    expr:q
}
};

o.filter=function(ai,aj,B,v){
    var w=ai,z=[],q=aj,t,y,r=aj&&aj[0]&&c(aj[0]);
    while(ai&&aj.length){
        for(var ak in l.filter){
            if((t=l.match[ak].exec(ai))!=null){
                var x=l.filter[ak],A,C;
                y=false;
                if(q==z){
                    z=[]
                    }
                    if(l.preFilter[ak]){
                    t=l.preFilter[ak](t,q,B,z,v,r);
                    if(!t){
                        y=A=true
                        }else{
                        if(t===true){
                            continue
                        }
                    }
                }
            if(t){
            for(var u=0;(C=q[u])!=null;u++){
                if(C){
                    A=x(C,t,u,q);
                    var D=v^!!A;
                    if(B&&A!=null){
                        if(D){
                            y=true
                            }else{
                            q[u]=false
                            }
                        }else{
                    if(D){
                        z.push(C);
                        y=true
                        }
                    }
            }
        }
        }
    if(A!==ab){
    if(!B){
        q=z
        }
        ai=ai.replace(l.match[ak],"");
    if(!y){
        return[]
        }
        break
}
}
}
if(ai==w){
    if(y==null){
        throw"Syntax error, unrecognized expression: "+ai
        }else{
        break
    }
}
w=ai
}
return q
};

var l=o.selectors={
    order:["ID","NAME","TAG"],
    match:{
        ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
        CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
        NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,
        ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
        TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,
        CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
        POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
        PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/
    },
    attrMap:{
        "class":"className",
        "for":"htmlFor"
    },
    attrHandle:{
        href:function(q){
            return q.getAttribute("href")
            }
        },
relative:{
    "+":function(q,y,r){
        var u=typeof y==="string",z=u&&!/\W/.test(y),t=u&&!z;
        if(z&&!r){
            y=y.toUpperCase()
            }
            for(var v=0,w=q.length,x;v<w;v++){
            if((x=q[v])){
                while((x=x.previousSibling)&&x.nodeType!==1){}
                q[v]=t||x&&x.nodeName===y?x||false:x===y
                }
            }
        if(t){
        o.filter(y,q,true)
        }
    },
">":function(w,t,v){
    var y=typeof t==="string";
    if(y&&!/\W/.test(t)){
        t=v?t:t.toUpperCase();
        for(var r=0,u=w.length;r<u;r++){
            var x=w[r];
            if(x){
                var q=x.parentNode;
                w[r]=q.nodeName===t?q:false
                }
            }
        }else{
    for(var r=0,u=w.length;r<u;r++){
        var x=w[r];
        if(x){
            w[r]=y?x.parentNode:x.parentNode===t
            }
        }
    if(y){
    o.filter(t,w,true)
    }
}
},
"":function(q,t,v){
    var r=h++,u=a;
    if(!t.match(/\W/)){
        var w=t=v?t:t.toUpperCase();
        u=d
        }
        u("parentNode",t,r,q,w,v)
    },
"~":function(q,t,v){
    var r=h++,u=a;
    if(typeof t==="string"&&!t.match(/\W/)){
        var w=t=v?t:t.toUpperCase();
        u=d
        }
        u("previousSibling",t,r,q,w,v)
    }
},
find:{
    ID:function(t,r,q){
        if(typeof r.getElementById!=="undefined"&&!q){
            var u=r.getElementById(t[1]);
            return u?[u]:[]
            }
        },
NAME:function(r,w,v){
    if(typeof w.getElementsByName!=="undefined"){
        var t=[],x=w.getElementsByName(r[1]);
        for(var q=0,u=x.length;q<u;q++){
            if(x[q].getAttribute("name")===r[1]){
                t.push(x[q])
                }
            }
        return t.length===0?null:t
    }
},
TAG:function(r,q){
    return q.getElementsByTagName(r[1])
    }
},
preFilter:{
    CLASS:function(q,t,r,u,w,v){
        q=" "+q[1].replace(/\\/g,"")+" ";
        if(v){
            return q
            }
            for(var y=0,x;(x=t[y])!=null;y++){
            if(x){
                if(w^(x.className&&(" "+x.className+" ").indexOf(q)>=0)){
                    if(!r){
                        u.push(x)
                        }
                    }else{
                if(r){
                    t[y]=false
                    }
                }
        }
    }
return false
},
ID:function(q){
    return q[1].replace(/\\/g,"")
    },
TAG:function(r,t){
    for(var q=0;t[q]===false;q++){}
    return t[q]&&c(t[q])?r[1]:r[1].toUpperCase()
    },
CHILD:function(r){
    if(r[1]=="nth"){
        var q=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(r[2]=="even"&&"2n"||r[2]=="odd"&&"2n+1"||!/\D/.test(r[2])&&"0n+"+r[2]||r[2]);
        r[2]=(q[1]+(q[2]||1))-0;
        r[3]=q[3]-0
    }
    r[0]=h++;
    return r
    },
ATTR:function(x,t,r,u,w,v){
    var q=x[1].replace(/\\/g,"");
    if(!v&&l.attrMap[q]){
        x[1]=l.attrMap[q]
        }
        if(x[2]==="~="){
        x[4]=" "+x[4]+" "
        }
        return x
    },
PSEUDO:function(w,t,r,u,v){
    if(w[1]==="not"){
        if(w[3].match(b).length>1||/^\w/.test(w[3])){
            w[3]=o(w[3],null,null,t)
            }else{
            var q=o.filter(w[3],t,r,true^v);
            if(!r){
                u.push.apply(u,q)
                }
                return false
            }
        }else{
    if(l.match.POS.test(w[0])||l.match.CHILD.test(w[0])){
        return true
        }
    }
return w
},
POS:function(q){
    q.unshift(true);
    return q
    }
},
filters:{
    enabled:function(q){
        return q.disabled===false&&q.type!=="hidden"
        },
    disabled:function(q){
        return q.disabled===true
        },
    checked:function(q){
        return q.checked===true
        },
    selected:function(q){
        q.parentNode.selectedIndex;
        return q.selected===true
        },
    parent:function(q){
        return !!q.firstChild
        },
    empty:function(q){
        return !q.firstChild
        },
    has:function(q,r,t){
        return !!o(t[3],q).length
        },
    header:function(q){
        return/h\d/i.test(q.nodeName)
        },
    text:function(q){
        return"text"===q.type
        },
    radio:function(q){
        return"radio"===q.type
        },
    checkbox:function(q){
        return"checkbox"===q.type
        },
    file:function(q){
        return"file"===q.type
        },
    password:function(q){
        return"password"===q.type
        },
    submit:function(q){
        return"submit"===q.type
        },
    image:function(q){
        return"image"===q.type
        },
    reset:function(q){
        return"reset"===q.type
        },
    button:function(q){
        return"button"===q.type||q.nodeName.toUpperCase()==="BUTTON"
        },
    input:function(q){
        return/input|select|textarea|button/i.test(q.nodeName)
        }
    },
setFilters:{
    first:function(q,r){
        return r===0
        },
    last:function(r,t,u,q){
        return t===q.length-1
        },
    even:function(q,r){
        return r%2===0
        },
    odd:function(q,r){
        return r%2===1
        },
    lt:function(q,r,t){
        return r<t[3]-0
        },
    gt:function(q,r,t){
        return r>t[3]-0
        },
    nth:function(q,r,t){
        return t[3]-0==r
        },
    eq:function(q,r,t){
        return t[3]-0==r
        }
    },
filter:{
    PSEUDO:function(w,r,q,v){
        var t=r[1],y=l.filters[t];
        if(y){
            return y(w,q,r,v)
            }else{
            if(t==="contains"){
                return(w.textContent||w.innerText||"").indexOf(r[3])>=0
                }else{
                if(t==="not"){
                    var x=r[3];
                    for(var q=0,u=x.length;q<u;q++){
                        if(x[q]===w){
                            return false
                            }
                        }
                    return true
                }
            }
    }
},
CHILD:function(y,v){
    var r=v[1],x=y;
    switch(r){
        case"only":case"first":
            while(x=x.previousSibling){
            if(x.nodeType===1){
                return false
                }
            }
        if(r=="first"){
            return true
            }
            x=y;
    case"last":
        while(x=x.nextSibling){
        if(x.nodeType===1){
            return false
            }
        }
    return true;
case"nth":
    var w=v[2],z=v[3];
    if(w==1&&z==0){
    return true
    }
    var t=v[0],A=y.parentNode;
if(A&&(A.sizcache!==t||!y.nodeIndex)){
    var u=0;
    for(x=A.firstChild;x;x=x.nextSibling){
        if(x.nodeType===1){
            x.nodeIndex=++u
            }
        }
    A.sizcache=t
}
var q=y.nodeIndex-z;
if(w==0){
    return q==0
    }else{
    return(q%w==0&&q/w>=0)
    }
}
},
ID:function(q,r){
    return q.nodeType===1&&q.getAttribute("id")===r
    },
TAG:function(q,r){
    return(r==="*"&&q.nodeType===1)||q.nodeName===r
    },
CLASS:function(q,r){
    return(" "+(q.className||q.getAttribute("class"))+" ").indexOf(r)>-1
    },
ATTR:function(w,q){
    var r=q[1],u=l.attrHandle[r]?l.attrHandle[r](w):w[r]!=null?w[r]:w.getAttribute(r),v=u+"",x=q[2],t=q[4];
    return u==null?x==="!=":x==="="?v===t:x==="*="?v.indexOf(t)>=0:x==="~="?(" "+v+" ").indexOf(t)>=0:!t?v&&u!==false:x==="!="?v!=t:x==="^="?v.indexOf(t)===0:x==="$="?v.substr(v.length-t.length)===t:x==="|="?v===t||v.substr(0,t.length+1)===t+"-":false
    },
POS:function(w,t,r,v){
    var u=t[2],q=l.setFilters[u];
    if(q){
        return q(w,r,t,v)
        }
    }
}
};

var g=l.match.POS;
for(var e in l.match){
    l.match[e]=RegExp(l.match[e].source+/(?![^\[]*\])(?![^\(]*\))/.source)
    }
    var p=function(q,r){
    q=Array.prototype.slice.call(q);
    if(r){
        r.push.apply(r,q);
        return r
        }
        return q
    };

try{
    Array.prototype.slice.call(document.documentElement.childNodes)
    }catch(f){
    p=function(v,q){
        var t=q||[];
        if(m.call(v)==="[object Array]"){
            Array.prototype.push.apply(t,v)
            }else{
            if(typeof v.length==="number"){
                for(var r=0,u=v.length;r<u;r++){
                    t.push(v[r])
                    }
                }else{
            for(var r=0;v[r];r++){
                t.push(v[r])
                }
            }
        }
return t
}
}
var n;
if(document.documentElement.compareDocumentPosition){
    n=function(r,t){
        var q=r.compareDocumentPosition(t)&4?-1:r===t?0:1;
        if(q===0){
            hasDuplicate=true
            }
            return q
        }
    }else{
    if("sourceIndex" in document.documentElement){
        n=function(r,t){
            var q=r.sourceIndex-t.sourceIndex;
            if(q===0){
                hasDuplicate=true
                }
                return q
            }
        }else{
    if(document.createRange){
        n=function(q,t){
            var r=q.ownerDocument.createRange(),u=t.ownerDocument.createRange();
            r.selectNode(q);
            r.collapse(true);
            u.selectNode(t);
            u.collapse(true);
            var v=r.compareBoundaryPoints(Range.START_TO_END,u);
            if(v===0){
                hasDuplicate=true
                }
                return v
            }
        }
}
}(function(){
    var r=document.createElement("form"),q="script"+(new Date).getTime();
    r.innerHTML="<input name='"+q+"'/>";
    var t=document.documentElement;
    t.insertBefore(r,t.firstChild);
    if(!!document.getElementById(q)){
        l.find.ID=function(x,w,v){
            if(typeof w.getElementById!=="undefined"&&!v){
                var u=w.getElementById(x[1]);
                return u?u.id===x[1]||typeof u.getAttributeNode!=="undefined"&&u.getAttributeNode("id").nodeValue===x[1]?[u]:ab:[]
                }
            };

    l.filter.ID=function(v,u){
        var w=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");
        return v.nodeType===1&&w&&w.nodeValue===u
        }
    }
t.removeChild(r)
})();
(function(){
    var q=document.createElement("div");
    q.appendChild(document.createComment(""));
    if(q.getElementsByTagName("*").length>0){
        l.find.TAG=function(u,v){
            var w=v.getElementsByTagName(u[1]);
            if(u[1]==="*"){
                var r=[];
                for(var t=0;w[t];t++){
                    if(w[t].nodeType===1){
                        r.push(w[t])
                        }
                    }
                w=r
            }
            return w
        }
    }
q.innerHTML="<a href='#'></a>";
if(q.firstChild&&typeof q.firstChild.getAttribute!=="undefined"&&q.firstChild.getAttribute("href")!=="#"){
    l.attrHandle.href=function(r){
        return r.getAttribute("href",2)
        }
    }
})();
if(document.querySelectorAll){
    (function(){
        var r=o,q=document.createElement("div");
        q.innerHTML="<p class='TEST'></p>";
        if(q.querySelectorAll&&q.querySelectorAll(".TEST").length===0){
            return
        }
        o=function(w,x,u,t){
            x=x||document;
            if(!t&&x.nodeType===9&&!c(x)){
                try{
                    return p(x.querySelectorAll(w),u)
                    }catch(v){}
            }
            return r(w,x,u,t)
        };

    o.find=r.find;
    o.filter=r.filter;
    o.selectors=r.selectors;
    o.matches=r.matches
    })()
}
if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){
    (function(){
        var q=document.createElement("div");
        q.innerHTML="<div class='test e'></div><div class='test'></div>";
        if(q.getElementsByClassName("e").length===0){
            return
        }
        q.lastChild.className="e";
        if(q.getElementsByClassName("e").length===1){
            return
        }
        l.order.splice(1,0,"CLASS");
        l.find.CLASS=function(u,t,r){
            if(typeof t.getElementsByClassName!=="undefined"&&!r){
                return t.getElementsByClassName(u[1])
                }
            }
    })()
}
function d(x,r,t,z,q,A){
    var B=x=="previousSibling"&&!A;
    for(var v=0,w=z.length;v<w;v++){
        var y=z[v];
        if(y){
            if(B&&y.nodeType===1){
                y.sizcache=t;
                y.sizset=v
                }
                y=y[x];
            var u=false;
            while(y){
                if(y.sizcache===t){
                    u=z[y.sizset];
                    break
                }
                if(y.nodeType===1&&!A){
                    y.sizcache=t;
                    y.sizset=v
                    }
                    if(y.nodeName===r){
                    u=y;
                    break
                }
                y=y[x]
                }
                z[v]=u
            }
        }
    }
function a(x,r,t,z,q,A){
    var B=x=="previousSibling"&&!A;
    for(var v=0,w=z.length;v<w;v++){
        var y=z[v];
        if(y){
            if(B&&y.nodeType===1){
                y.sizcache=t;
                y.sizset=v
                }
                y=y[x];
            var u=false;
            while(y){
                if(y.sizcache===t){
                    u=z[y.sizset];
                    break
                }
                if(y.nodeType===1){
                    if(!A){
                        y.sizcache=t;
                        y.sizset=v
                        }
                        if(typeof r!=="string"){
                        if(y===r){
                            u=true;
                            break
                        }
                    }else{
                    if(o.filter(r,[y]).length>0){
                        u=y;
                        break
                    }
                }
            }
        y=y[x]
    }
    z[v]=u
    }
}
}
var j=document.compareDocumentPosition?function(q,r){
    return q.compareDocumentPosition(r)&16
    }:function(q,r){
    return q!==r&&(q.contains?q.contains(r):true)
    };

var c=function(q){
    return q.nodeType===9&&q.documentElement.nodeName!=="HTML"||!!q.ownerDocument&&c(q.ownerDocument)
    };

var k=function(u,w){
    var q=[],y="",x,r=w.nodeType?[w]:w;
    while((x=l.match.PSEUDO.exec(u))){
        y+=x[0];
        u=u.replace(l.match.PSEUDO,"")
        }
        u=l.relative[u]?u+"*":u;
    for(var v=0,t=r.length;v<t;v++){
        o(u,r[v],q)
        }
        return o.filter(y,q)
    };

T.find=o;
T.filter=o.filter;
T.expr=o.selectors;
T.expr[":"]=T.expr.filters;
o.selectors.filters.hidden=function(q){
    return q.offsetWidth===0||q.offsetHeight===0
    };

o.selectors.filters.visible=function(q){
    return q.offsetWidth>0||q.offsetHeight>0
    };

o.selectors.filters.animated=function(q){
    return T.grep(T.timers,function(r){
        return q===r.elem
        }).length
    };

T.multiFilter=function(q,t,r){
    if(r){
        q=":not("+q+")"
        }
        return o.matches(q,t)
    };

T.dir=function(r,t){
    var u=[],q=r[t];
    while(q&&q!=document){
        if(q.nodeType==1){
            u.push(q)
            }
            q=q[t]
        }
        return u
    };

T.nth=function(v,u,r,q){
    u=u||1;
    var t=0;
    for(;v;v=v[r]){
        if(v.nodeType==1&&++t==u){
            break
        }
    }
    return v
};

T.sibling=function(q,r){
    var t=[];
    for(;q;q=q.nextSibling){
        if(q.nodeType==1&&q!=r){
            t.push(q)
            }
        }
    return t
};

return;
W.Sizzle=o
})();
T.event={
    add:function(c,f,d,a){
        if(c.nodeType==3||c.nodeType==8){
            return
        }
        if(c.setInterval&&c!=W){
            c=W
            }
            if(!d.guid){
            d.guid=this.guid++
        }
        if(a!==ab){
            var e=d;
            d=this.proxy(e);
            d.data=a
            }
            var g=T.data(c,"events")||T.data(c,"events",{}),b=T.data(c,"handle")||T.data(c,"handle",function(){
            return typeof T!=="undefined"&&!T.event.triggered?T.event.handle.apply(arguments.callee.elem,arguments):ab
            });
        b.elem=c;
        T.each(f.split(/\s+/),function(l,k){
            var j=k.split(".");
            k=j.shift();
            d.type=j.slice().sort().join(".");
            var h=g[k];
            if(T.event.specialAll[k]){
                T.event.specialAll[k].setup.call(c,a,j)
                }
                if(!h){
                h=g[k]={};

                if(!T.event.special[k]||T.event.special[k].setup.call(c,a,j)===false){
                    if(c.addEventListener){
                        c.addEventListener(k,b,false)
                        }else{
                        if(c.attachEvent){
                            c.attachEvent("on"+k,b)
                            }
                        }
                }
        }
        h[d.guid]=d;
    T.event.global[k]=true
    });
c=null
},
guid:1,
global:{},
remove:function(b,e,c){
    if(b.nodeType==3||b.nodeType==8){
        return
    }
    var f=T.data(b,"events"),g,h;
    if(f){
        if(e===ab||(typeof e==="string"&&e.charAt(0)==".")){
            for(var d in f){
                this.remove(b,d+(e||""))
                }
            }else{
        if(e.type){
            c=e.handler;
            e=e.type
            }
            T.each(e.split(/\s+/),function(n,l){
            var j=l.split(".");
            l=j.shift();
            var m=RegExp("(^|\\.)"+j.slice().sort().join(".*\\.")+"(\\.|$)");
            if(f[l]){
                if(c){
                    delete f[l][c.guid]
                }else{
                    for(var k in f[l]){
                        if(m.test(f[l][k].type)){
                            delete f[l][k]
                        }
                    }
                    }
                    if(T.event.specialAll[l]){
            T.event.specialAll[l].teardown.call(b,j)
            }
            for(g in f[l]){
            break
        }
        if(!g){
            if(!T.event.special[l]||T.event.special[l].teardown.call(b,j)===false){
                if(b.removeEventListener){
                    b.removeEventListener(l,T.data(b,"handle"),false)
                    }else{
                    if(b.detachEvent){
                        b.detachEvent("on"+l,T.data(b,"handle"))
                        }
                    }
            }
        g=null;
        delete f[l]
    }
}
})
}
for(g in f){
    break
}
if(!g){
    var a=T.data(b,"handle");
    if(a){
        a.elem=null
        }
        T.removeData(b,"events");
    T.removeData(b,"handle")
    }
}
},
trigger:function(d,b,e,h){
    var f=d.type||d;
    if(!h){
        d=typeof d==="object"?d[aa]?d:T.extend(T.Event(f),d):T.Event(f);
        if(f.indexOf("!")>=0){
            d.type=f=f.slice(0,-1);
            d.exclusive=true
            }
            if(!e){
            d.stopPropagation();
            if(this.global[f]){
                T.each(T.cache,function(){
                    if(this.events&&this.events[f]){
                        T.event.trigger(d,b,this.handle.elem)
                        }
                    })
            }
        }
    if(!e||e.nodeType==3||e.nodeType==8){
    return ab
    }
    d.result=ab;
d.target=e;
b=T.makeArray(b);
b.unshift(d)
}
d.currentTarget=e;
var c=T.data(e,"handle");
if(c){
    c.apply(e,b)
    }
    if((!e[f]||(T.nodeName(e,"a")&&f=="click"))&&e["on"+f]&&e["on"+f].apply(e,b)===false){
    d.result=false
    }
    if(!h&&e[f]&&!d.isDefaultPrevented()&&!(T.nodeName(e,"a")&&f=="click")){
    this.triggered=true;
    try{
        e[f]()
        }catch(a){}
}
this.triggered=false;
if(!d.isPropagationStopped()){
    var g=e.parentNode||e.ownerDocument;
    if(g){
        T.event.trigger(d,b,g,true)
        }
    }
},
handle:function(b){
    var c,h;
    b=arguments[0]=T.event.fix(b||W.event);
    b.currentTarget=this;
    var a=b.type.split(".");
    b.type=a.shift();
    c=!a.length&&!b.exclusive;
    var d=RegExp("(^|\\.)"+a.slice().sort().join(".*\\.")+"(\\.|$)");
    h=(T.data(this,"events")||{})[b.type];
    for(var f in h){
        var e=h[f];
        if(c||d.test(e.type)){
            b.handler=e;
            b.data=e.data;
            var g=e.apply(this,arguments);
            if(g!==ab){
                b.result=g;
                if(g===false){
                    b.preventDefault();
                    b.stopPropagation()
                    }
                }
            if(b.isImmediatePropagationStopped()){
            break
        }
    }
    }
},
props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(c){
    if(c[aa]){
        return c
        }
        var e=c;
    c=T.Event(e);
    for(var d=this.props.length,a;d;){
        a=this.props[--d];
        c[a]=e[a]
        }
        if(!c.target){
        c.target=c.srcElement||document
        }
        if(c.target.nodeType==3){
        c.target=c.target.parentNode
        }
        if(!c.relatedTarget&&c.fromElement){
        c.relatedTarget=c.fromElement==c.target?c.toElement:c.fromElement
        }
        if(c.pageX==null&&c.clientX!=null){
        var b=document.documentElement,f=document.body;
        c.pageX=c.clientX+(b&&b.scrollLeft||f&&f.scrollLeft||0)-(b.clientLeft||0);
        c.pageY=c.clientY+(b&&b.scrollTop||f&&f.scrollTop||0)-(b.clientTop||0)
        }
        if(!c.which&&((c.charCode||c.charCode===0)?c.charCode:c.keyCode)){
        c.which=c.charCode||c.keyCode
        }
        if(!c.metaKey&&c.ctrlKey){
        c.metaKey=c.ctrlKey
        }
        if(!c.which&&c.button){
        c.which=(c.button&1?1:(c.button&2?3:(c.button&4?2:0)))
        }
        return c
    },
proxy:function(a,b){
    b=b||function(){
        return a.apply(this,arguments)
        };

    b.guid=a.guid=a.guid||b.guid||this.guid++;
    return b
    },
special:{
    ready:{
        setup:P,
        teardown:function(){}
    }
},
specialAll:{
    live:{
        setup:function(b,a){
            T.event.add(this,a[0],af)
            },
        teardown:function(a){
            if(a.length){
                var c=0,b=RegExp("(^|\\.)"+a[0]+"(\\.|$)");
                T.each((T.data(this,"events").live||{}),function(){
                    if(b.test(this.type)){
                        c++
                    }
                });
            if(c<1){
                T.event.remove(this,a[0],af)
                }
            }
    }
}
}
};

T.Event=function(a){
    if(!this.preventDefault){
        return new T.Event(a)
        }
        if(a&&a.type){
        this.originalEvent=a;
        this.type=a.type
        }else{
        this.type=a
        }
        this.timeStamp=ad();
    this[aa]=true
    };

function X(){
    return false
    }
    function J(){
    return true
    }
    T.Event.prototype={
    preventDefault:function(){
        this.isDefaultPrevented=J;
        var a=this.originalEvent;
        if(!a){
            return
        }
        if(a.preventDefault){
            a.preventDefault()
            }
            a.returnValue=false
        },
    stopPropagation:function(){
        this.isPropagationStopped=J;
        var a=this.originalEvent;
        if(!a){
            return
        }
        if(a.stopPropagation){
            a.stopPropagation()
            }
            a.cancelBubble=true
        },
    stopImmediatePropagation:function(){
        this.isImmediatePropagationStopped=J;
        this.stopPropagation()
        },
    isDefaultPrevented:X,
    isPropagationStopped:X,
    isImmediatePropagationStopped:X
};

var ah=function(b){
    var c=b.relatedTarget;
    while(c&&c!=this){
        try{
            c=c.parentNode
            }catch(a){
            c=this
            }
        }
    if(c!=this){
    b.type=b.data;
    T.event.handle.apply(this,arguments)
    }
};

T.each({
    mouseover:"mouseenter",
    mouseout:"mouseleave"
},function(a,b){
    T.event.special[b]={
        setup:function(){
            T.event.add(this,a,ah,b)
            },
        teardown:function(){
            T.event.remove(this,a,ah)
            }
        }
});
T.fn.extend({
    bind:function(b,a,c){
        return b=="unload"?this.one(b,a,c):this.each(function(){
            T.event.add(this,b,c||a,c&&a)
            })
        },
    one:function(b,a,c){
        var d=T.event.proxy(c||a,function(e){
            T(this).unbind(e,d);
            return(c||a).apply(this,arguments)
            });
        return this.each(function(){
            T.event.add(this,b,d,c&&a)
            })
        },
    unbind:function(a,b){
        return this.each(function(){
            T.event.remove(this,a,b)
            })
        },
    trigger:function(b,a){
        return this.each(function(){
            T.event.trigger(b,a,this)
            })
        },
    triggerHandler:function(c,a){
        if(this[0]){
            var b=T.Event(c);
            b.preventDefault();
            b.stopPropagation();
            T.event.trigger(b,a,this[0]);
            return b.result
            }
        },
toggle:function(a){
    var c=arguments,b=1;
    while(b<c.length){
        T.event.proxy(a,c[b++])
        }
        return this.click(T.event.proxy(a,function(d){
        this.lastToggle=(this.lastToggle||0)%b;
        d.preventDefault();
        return c[this.lastToggle++].apply(this,arguments)||false
        }))
    },
hover:function(b,a){
    return this.mouseenter(b).mouseleave(a)
    },
ready:function(a){
    P();
    if(T.isReady){
        a.call(document,T)
        }else{
        T.readyList.push(a)
        }
        return this
    },
live:function(a,b){
    var c=T.event.proxy(b);
    c.guid+=this.selector+a;
    T(document).bind(Z(a,this.selector),this.selector,c);
    return this
    },
die:function(a,b){
    T(document).unbind(Z(a,this.selector),b?{
        guid:b.guid+this.selector+a
        }:null);
    return this
    }
});
function af(a){
    var d=RegExp("(^|\\.)"+a.type+"(\\.|$)"),b=true,c=[];
    T.each(T.data(this,"events").live||[],function(g,f){
        if(d.test(f.type)){
            var e=T(a.target).closest(f.data)[0];
            if(e){
                c.push({
                    elem:e,
                    fn:f
                })
                }
            }
    });
c.sort(function(e,f){
    return T.data(e.elem,"closest")-T.data(f.elem,"closest")
    });
T.each(c,function(){
    if(this.fn.call(this.elem,a,this.fn.data)===false){
        return(b=false)
        }
    });
return b
}
function Z(a,b){
    return["live",a,b.replace(/\./g,"`").replace(/ /g,"|")].join(".")
    }
    T.extend({
    isReady:false,
    readyList:[],
    ready:function(){
        if(!T.isReady){
            T.isReady=true;
            if(T.readyList){
                T.each(T.readyList,function(){
                    this.call(document,T)
                    });
                T.readyList=null
                }
                T(document).triggerHandler("ready")
            }
        }
});
var G=false;
function P(){
    if(G){
        return
    }
    G=true;
    if(document.addEventListener){
        document.addEventListener("DOMContentLoaded",function(){
            document.removeEventListener("DOMContentLoaded",arguments.callee,false);
            T.ready()
            },false)
        }else{
        if(document.attachEvent){
            document.attachEvent("onreadystatechange",function(){
                if(document.readyState==="complete"){
                    document.detachEvent("onreadystatechange",arguments.callee);
                    T.ready()
                    }
                });
        if(document.documentElement.doScroll&&W==W.top){
            (function(){
                if(T.isReady){
                    return
                }
                try{
                    document.documentElement.doScroll("left")
                    }catch(a){
                    setTimeout(arguments.callee,0);
                    return
                }
                T.ready()
                })()
            }
        }
}
T.event.add(W,"load",T.ready)
}
T.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(a,b){
    T.fn[b]=function(c){
        return c?this.bind(b,c):this.trigger(b)
        }
    });
T(W).bind("unload",function(){
    for(var a in T.cache){
        if(a!=1&&T.cache[a].handle){
            T.event.remove(T.cache[a].handle.elem)
            }
        }
    });
(function(){
    T.support={};

    var f=document.documentElement,e=document.createElement("script"),a=document.createElement("div"),b="script"+(new Date).getTime();
    a.style.display="none";
    a.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';
    var d=a.getElementsByTagName("*"),g=a.getElementsByTagName("a")[0];
    if(!d||!d.length||!g){
        return
    }
    T.support={
        leadingWhitespace:a.firstChild.nodeType==3,
        tbody:!a.getElementsByTagName("tbody").length,
        objectAll:!!a.getElementsByTagName("object")[0].getElementsByTagName("*").length,
        htmlSerialize:!!a.getElementsByTagName("link").length,
        style:/red/.test(g.getAttribute("style")),
        hrefNormalized:g.getAttribute("href")==="/a",
        opacity:g.style.opacity==="0.5",
        cssFloat:!!g.style.cssFloat,
        scriptEval:false,
        noCloneEvent:true,
        boxModel:null
    };

    e.type="text/javascript";
    try{
        e.appendChild(document.createTextNode("window."+b+"=1;"))
        }catch(c){}
    f.insertBefore(e,f.firstChild);
    if(W[b]){
        T.support.scriptEval=true;
        delete W[b]
    }
    f.removeChild(e);
    if(a.attachEvent&&a.fireEvent){
        a.attachEvent("onclick",function(){
            T.support.noCloneEvent=false;
            a.detachEvent("onclick",arguments.callee)
            });
        a.cloneNode(true).fireEvent("onclick")
        }
        T(function(){
        var h=document.createElement("div");
        h.style.width=h.style.paddingLeft="1px";
        document.body.appendChild(h);
        T.boxModel=T.support.boxModel=h.offsetWidth===2;
        document.body.removeChild(h).style.display="none"
        })
    })();
var H=T.support.cssFloat?"cssFloat":"styleFloat";
T.props={
    "for":"htmlFor",
    "class":"className",
    "float":H,
    cssFloat:H,
    styleFloat:H,
    readonly:"readOnly",
    maxlength:"maxLength",
    cellspacing:"cellSpacing",
    rowspan:"rowSpan",
    tabindex:"tabIndex"
};

T.fn.extend({
    _load:T.fn.load,
    load:function(e,b,a){
        if(typeof e!=="string"){
            return this._load(e)
            }
            var c=e.indexOf(" ");
        if(c>=0){
            var g=e.slice(c,e.length);
            e=e.slice(0,c)
            }
            var d="GET";
        if(b){
            if(T.isFunction(b)){
                a=b;
                b=null
                }else{
                if(typeof b==="object"){
                    b=T.param(b);
                    d="POST"
                    }
                }
        }
    var f=this;
T.ajax({
    url:e,
    type:d,
    dataType:"html",
    data:b,
    complete:function(j,h){
        if(h=="success"||h=="notmodified"){
            f.html(g?T("<div/>").append(j.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(g):j.responseText)
            }
            if(a){
            f.each(a,[j.responseText,h,j])
            }
        }
});
return this
},
serialize:function(){
    return T.param(this.serializeArray())
    },
serializeArray:function(){
    return this.map(function(){
        return this.elements?T.makeArray(this.elements):this
        }).filter(function(){
        return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))
        }).map(function(c,b){
        var a=T(this).val();
        return a==null?null:T.isArray(a)?T.map(a,function(d,e){
            return{
                name:b.name,
                value:d
            }
        }):{
        name:b.name,
        value:a
    }
    }).get()
}
});
T.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(b,a){
    T.fn[a]=function(c){
        return this.bind(a,c)
        }
    });
var N=ad();
T.extend({
    get:function(d,b,a,c){
        if(T.isFunction(b)){
            a=b;
            b=null
            }
            return T.ajax({
            type:"GET",
            url:d,
            data:b,
            success:a,
            dataType:c
        })
        },
    getScript:function(b,a){
        return T.get(b,null,a,"script")
        },
    getJSON:function(c,b,a){
        return T.get(c,b,a,"json")
        },
    post:function(d,b,a,c){
        if(T.isFunction(b)){
            a=b;
            b={}
        }
        return T.ajax({
        type:"POST",
        url:d,
        data:b,
        success:a,
        dataType:c
    })
    },
ajaxSetup:function(a){
    T.extend(T.ajaxSettings,a)
    },
ajaxSettings:{
    url:location.href,
    global:true,
    type:"GET",
    contentType:"application/x-www-form-urlencoded",
    processData:true,
    async:true,
    xhr:function(){
        return W.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()
        },
    accepts:{
        xml:"application/xml, text/xml",
        html:"text/html",
        script:"text/javascript, application/javascript",
        json:"application/json, text/javascript",
        text:"text/plain",
        _default:"*/*"
    }
},
lastModified:{},
ajax:function(l){
    l=T.extend(true,l,T.extend(true,{},T.ajaxSettings,l));
    var a,t=/=\?(&|$)/g,f,b,r=l.type.toUpperCase();
    if(l.data&&l.processData&&typeof l.data!=="string"){
        l.data=T.param(l.data)
        }
        if(l.dataType=="jsonp"){
        if(r=="GET"){
            if(!l.url.match(t)){
                l.url+=(l.url.match(/\?/)?"&":"?")+(l.jsonp||"callback")+"=?"
                }
            }else{
        if(!l.data||!l.data.match(t)){
            l.data=(l.data?l.data+"&":"")+(l.jsonp||"callback")+"=?"
            }
        }
    l.dataType="json"
}
if(l.dataType=="json"&&(l.data&&l.data.match(t)||l.url.match(t))){
    a="jsonp"+N++;
    if(l.data){
        l.data=(l.data+"").replace(t,"="+a+"$1")
        }
        l.url=l.url.replace(t,"="+a+"$1");
    l.dataType="script";
    W[a]=function(w){
        b=w;
        p();
        m();
        W[a]=ab;
        try{
            delete W[a]
        }catch(v){}
        if(q){
            q.removeChild(d)
            }
        }
}
if(l.dataType=="script"&&l.cache==null){
    l.cache=false
    }
    if(l.cache===false&&r=="GET"){
    var u=ad();
    var c=l.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+u+"$2");
    l.url=c+((c==l.url)?(l.url.match(/\?/)?"&":"?")+"_="+u:"")
    }
    if(l.data&&r=="GET"){
    l.url+=(l.url.match(/\?/)?"&":"?")+l.data;
    l.data=null
    }
    if(l.global&&!T.active++){
    T.event.trigger("ajaxStart")
    }
    var g=/^(\w+:)?\/\/([^\/?#]+)/.exec(l.url);
if(l.dataType=="script"&&r=="GET"&&g&&(g[1]&&g[1]!=location.protocol||g[2]!=location.host)){
    var q=document.getElementsByTagName("head")[0];
    var d=document.createElement("script");
    d.src=l.url;
    if(l.scriptCharset){
        d.charset=l.scriptCharset
        }
        if(!a){
        var j=false;
        d.onload=d.onreadystatechange=function(){
            if(!j&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){
                j=true;
                p();
                m();
                d.onload=d.onreadystatechange=null;
                q.removeChild(d)
                }
            }
    }
q.appendChild(d);
return ab
}
var n=false;
var o=l.xhr();
if(l.username){
    o.open(r,l.url,l.async,l.username,l.password)
    }else{
    o.open(r,l.url,l.async)
    }
    try{
    if(l.data){
        o.setRequestHeader("Content-Type",l.contentType)
        }
        if(l.ifModified){
        o.setRequestHeader("If-Modified-Since",T.lastModified[l.url]||"Thu, 01 Jan 1970 00:00:00 GMT")
        }
        o.setRequestHeader("X-Requested-With","XMLHttpRequest");
    o.setRequestHeader("Accept",l.dataType&&l.accepts[l.dataType]?l.accepts[l.dataType]+", */*":l.accepts._default)
    }catch(e){}
if(l.beforeSend&&l.beforeSend(o,l)===false){
    if(l.global&&!--T.active){
        T.event.trigger("ajaxStop")
        }
        o.abort();
    return false
    }
    if(l.global){
    T.event.trigger("ajaxSend",[o,l])
    }
    var k=function(x){
    if(o.readyState==0){
        if(h){
            clearInterval(h);
            h=null;
            if(l.global&&!--T.active){
                T.event.trigger("ajaxStop")
                }
            }
    }else{
    if(!n&&o&&(o.readyState==4||x=="timeout")){
        n=true;
        if(h){
            clearInterval(h);
            h=null
            }
            f=x=="timeout"?"timeout":!T.httpSuccess(o)?"error":l.ifModified&&T.httpNotModified(o,l.url)?"notmodified":"success";
        if(f=="success"){
            try{
                b=T.httpData(o,l.dataType,l)
                }catch(v){
                f="parsererror"
                }
            }
        if(f=="success"){
        var w;
        try{
            w=o.getResponseHeader("Last-Modified")
            }catch(v){}
        if(l.ifModified&&w){
            T.lastModified[l.url]=w
            }
            if(!a){
            p()
            }
        }else{
    T.handleError(l,o,f)
    }
    m();
if(x){
    o.abort()
    }
    if(l.async){
    o=null
    }
}
}
};

if(l.async){
    var h=setInterval(k,13);
    if(l.timeout>0){
        setTimeout(function(){
            if(o&&!n){
                k("timeout")
                }
            },l.timeout)
    }
}
try{
    o.send(l.data)
    }catch(e){
    T.handleError(l,o,null,e)
    }
    if(!l.async){
    k()
    }
    function p(){
    if(l.success){
        l.success(b,f)
        }
        if(l.global){
        T.event.trigger("ajaxSuccess",[o,l])
        }
    }
function m(){
    if(l.complete){
        l.complete(o,f)
        }
        if(l.global){
        T.event.trigger("ajaxComplete",[o,l])
        }
        if(l.global&&!--T.active){
        T.event.trigger("ajaxStop")
        }
    }
return o
},
handleError:function(c,a,d,b){
    if(c.error){
        c.error(a,d,b)
        }
        if(c.global){
        T.event.trigger("ajaxError",[a,c,b])
        }
    },
active:0,
httpSuccess:function(a){
    try{
        return !a.status&&location.protocol=="file:"||(a.status>=200&&a.status<300)||a.status==304||a.status==1223
        }catch(b){}
    return false
    },
httpNotModified:function(b,d){
    try{
        var a=b.getResponseHeader("Last-Modified");
        return b.status==304||a==T.lastModified[d]
        }catch(c){}
    return false
    },
httpData:function(a,c,d){
    var e=a.getResponseHeader("content-type"),f=c=="xml"||!c&&e&&e.indexOf("xml")>=0,b=f?a.responseXML:a.responseText;
    if(f&&b.documentElement.tagName=="parsererror"){
        throw"parsererror"
        }
        if(d&&d.dataFilter){
        b=d.dataFilter(b,c)
        }
        if(typeof b==="string"){
        if(c=="script"){
            T.globalEval(b)
            }
            if(c=="json"){
            b=W["eval"]("("+b+")")
            }
        }
    return b
},
param:function(d){
    var b=[];
    function a(f,e){
        b[b.length]=encodeURIComponent(f)+"="+encodeURIComponent(e)
        }
        if(T.isArray(d)||d.jquery){
        T.each(d,function(){
            a(this.name,this.value)
            })
        }else{
        for(var c in d){
            if(T.isArray(d[c])){
                T.each(d[c],function(){
                    a(c,this)
                    })
                }else{
                a(c,T.isFunction(d[c])?d[c]():d[c])
                }
            }
        }
        return b.join("&").replace(/%20/g,"+")
}
});
var V={},U,ae=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];
function K(b,c){
    var a={};

    T.each(ae.concat.apply([],ae.slice(0,c)),function(){
        a[this]=b
        });
    return a
    }
    T.fn.extend({
    show:function(c,a){
        if(c){
            return this.animate(K("show",3),c,a)
            }else{
            for(var e=0,g=this.length;e<g;e++){
                var h=T.data(this[e],"olddisplay");
                this[e].style.display=h||"";
                if(T.css(this[e],"display")==="none"){
                    var f=this[e].tagName,b;
                    if(V[f]){
                        b=V[f]
                        }else{
                        var d=T("<"+f+" />").appendTo("body");
                        b=d.css("display");
                        if(b==="none"){
                            b="block"
                            }
                            d.remove();
                        V[f]=b
                        }
                        T.data(this[e],"olddisplay",b)
                    }
                }
            for(var e=0,g=this.length;e<g;e++){
            this[e].style.display=T.data(this[e],"olddisplay")||""
            }
            return this
        }
    },
hide:function(b,a){
    if(b){
        return this.animate(K("hide",3),b,a)
        }else{
        for(var c=0,d=this.length;c<d;c++){
            var e=T.data(this[c],"olddisplay");
            if(!e&&e!=="none"){
                T.data(this[c],"olddisplay",T.css(this[c],"display"))
                }
            }
        for(var c=0,d=this.length;c<d;c++){
        this[c].style.display="none"
        }
        return this
    }
},
_toggle:T.fn.toggle,
toggle:function(a,b){
    var c=typeof a==="boolean";
    return T.isFunction(a)&&T.isFunction(b)?this._toggle.apply(this,arguments):a==null||c?this.each(function(){
        var d=c?a:T(this).is(":hidden");
        T(this)[d?"show":"hide"]()
        }):this.animate(K("toggle",3),a,b)
    },
fadeTo:function(c,a,b){
    return this.animate({
        opacity:a
    },c,b)
    },
animate:function(a,d,b,c){
    var e=T.speed(d,b,c);
    return this[e.queue===false?"each":"queue"](function(){
        var g=T.extend({},e),j,f=this.nodeType==1&&T(this).is(":hidden"),h=this;
        for(j in a){
            if(a[j]=="hide"&&f||a[j]=="show"&&!f){
                return g.complete.call(this)
                }
                if((j=="height"||j=="width")&&this.style){
                g.display=T.css(this,"display");
                g.overflow=this.style.overflow
                }
            }
        if(g.overflow!=null){
        this.style.overflow="hidden"
        }
        g.curAnim=T.extend({},a);
        T.each(a,function(p,l){
        var m=new T.fx(h,g,p);
        if(/toggle|show|hide/.test(l)){
            m[l=="toggle"?f?"show":"hide":l](a)
            }else{
            var n=l.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),k=m.cur(true)||0;
            if(n){
                var q=parseFloat(n[2]),o=n[3]||"px";
                if(o!="px"){
                    h.style[p]=(q||1)+o;
                    k=((q||1)/m.cur(true))*k;
                    h.style[p]=k+o
                    }
                    if(n[1]){
                    q=((n[1]=="-="?-1:1)*q)+k
                    }
                    m.custom(k,q,o)
                }else{
                m.custom(k,l,"")
                }
            }
    });
return true
})
},
stop:function(b,c){
    var a=T.timers;
    if(b){
        this.queue([])
        }
        this.each(function(){
        for(var d=a.length-1;d>=0;d--){
            if(a[d].elem==this){
                if(c){
                    a[d](true)
                    }
                    a.splice(d,1)
                }
            }
        });
if(!c){
    this.dequeue()
    }
    return this
}
});
T.each({
    slideDown:K("show",1),
    slideUp:K("hide",1),
    slideToggle:K("toggle",1),
    fadeIn:{
        opacity:"show"
    },
    fadeOut:{
        opacity:"hide"
    }
},function(b,a){
    T.fn[b]=function(d,c){
        return this.animate(a,d,c)
        }
    });
T.extend({
    speed:function(b,a,c){
        var d=typeof b==="object"?b:{
            complete:c||!c&&a||T.isFunction(b)&&b,
            duration:b,
            easing:c&&a||a&&!T.isFunction(a)&&a
            };

        d.duration=T.fx.off?0:typeof d.duration==="number"?d.duration:T.fx.speeds[d.duration]||T.fx.speeds._default;
        d.old=d.complete;
        d.complete=function(){
            if(d.queue!==false){
                T(this).dequeue()
                }
                if(T.isFunction(d.old)){
                d.old.call(this)
                }
            };

    return d
    },
easing:{
    linear:function(b,a,d,c){
        return d+c*b
        },
    swing:function(b,a,d,c){
        return((-Math.cos(b*Math.PI)/2)+0.5)*c+d
        }
    },
timers:[],
fx:function(b,c,a){
    this.options=c;
    this.elem=b;
    this.prop=a;
    if(!c.orig){
        c.orig={}
    }
}
});
T.fx.prototype={
    update:function(){
        if(this.options.step){
            this.options.step.call(this.elem,this.now,this)
            }(T.fx.step[this.prop]||T.fx.step._default)(this);
        if((this.prop=="height"||this.prop=="width")&&this.elem.style){
            this.elem.style.display="block"
            }
        },
cur:function(a){
    if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){
        return this.elem[this.prop]
        }
        var b=parseFloat(T.css(this.elem,this.prop,a));
    return b&&b>-10000?b:parseFloat(T.curCSS(this.elem,this.prop))||0
    },
custom:function(a,b,c){
    this.startTime=ad();
    this.start=a;
    this.end=b;
    this.unit=c||this.unit||"px";
    this.now=this.start;
    this.pos=this.state=0;
    var e=this;
    function d(f){
        return e.step(f)
        }
        d.elem=this.elem;
    if(d()&&T.timers.push(d)&&!U){
        U=setInterval(function(){
            var f=T.timers;
            for(var g=0;g<f.length;g++){
                if(!f[g]()){
                    f.splice(g--,1)
                    }
                }
            if(!f.length){
            clearInterval(U);
            U=ab
            }
        },13)
}
},
show:function(){
    this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);
    this.options.show=true;
    this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());
    T(this.elem).show()
    },
hide:function(){
    this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);
    this.options.hide=true;
    this.custom(this.cur(),0)
    },
step:function(c){
    var d=ad();
    if(c||d>=this.options.duration+this.startTime){
        this.now=this.end;
        this.pos=this.state=1;
        this.update();
        this.options.curAnim[this.prop]=true;
        var f=true;
        for(var e in this.options.curAnim){
            if(this.options.curAnim[e]!==true){
                f=false
                }
            }
        if(f){
        if(this.options.display!=null){
            this.elem.style.overflow=this.options.overflow;
            this.elem.style.display=this.options.display;
            if(T.css(this.elem,"display")=="none"){
                this.elem.style.display="block"
                }
            }
        if(this.options.hide){
        T(this.elem).hide()
        }
        if(this.options.hide||this.options.show){
        for(var b in this.options.curAnim){
            T.attr(this.elem.style,b,this.options.orig[b])
            }
        }
        this.options.complete.call(this.elem)
}
return false
}else{
    var a=d-this.startTime;
    this.state=a/this.options.duration;
    this.pos=T.easing[this.options.easing||(T.easing.swing?"swing":"linear")](this.state,a,0,1,this.options.duration);
    this.now=this.start+((this.end-this.start)*this.pos);
    this.update()
    }
    return true
}
};

T.extend(T.fx,{
    speeds:{
        slow:600,
        fast:200,
        _default:400
    },
    step:{
        opacity:function(a){
            T.attr(a.elem.style,"opacity",a.now)
            },
        _default:function(a){
            if(a.elem.style&&a.elem.style[a.prop]!=null){
                a.elem.style[a.prop]=a.now+a.unit
                }else{
                a.elem[a.prop]=a.now
                }
            }
    }
});
if(document.documentElement.getBoundingClientRect){
    T.fn.offset=function(){
        if(!this[0]){
            return{
                top:0,
                left:0
            }
        }
        if(this[0]===this[0].ownerDocument.body){
        return T.offset.bodyOffset(this[0])
        }
        var f=this[0].getBoundingClientRect(),c=this[0].ownerDocument,g=c.body,h=c.documentElement,a=h.clientTop||g.clientTop||0,b=h.clientLeft||g.clientLeft||0,d=f.top+(self.pageYOffset||T.boxModel&&h.scrollTop||g.scrollTop)-a,e=f.left+(self.pageXOffset||T.boxModel&&h.scrollLeft||g.scrollLeft)-b;
    return{
        top:d,
        left:e
    }
}
}else{
    T.fn.offset=function(){
        if(!this[0]){
            return{
                top:0,
                left:0
            }
        }
        if(this[0]===this[0].ownerDocument.body){
        return T.offset.bodyOffset(this[0])
        }
        T.offset.initialized||T.offset.initialize();
    var f=this[0],j=f.offsetParent,k=f,a=f.ownerDocument,c,h=a.documentElement,e=a.body,d=a.defaultView,l=d.getComputedStyle(f,null),b=f.offsetTop,g=f.offsetLeft;
    while((f=f.parentNode)&&f!==e&&f!==h){
        c=d.getComputedStyle(f,null);
        b-=f.scrollTop,g-=f.scrollLeft;
        if(f===j){
            b+=f.offsetTop,g+=f.offsetLeft;
            if(T.offset.doesNotAddBorder&&!(T.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(f.tagName))){
                b+=parseInt(c.borderTopWidth,10)||0,g+=parseInt(c.borderLeftWidth,10)||0
                }
                k=j,j=f.offsetParent
            }
            if(T.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"){
            b+=parseInt(c.borderTopWidth,10)||0,g+=parseInt(c.borderLeftWidth,10)||0
            }
            l=c
        }
        if(l.position==="relative"||l.position==="static"){
        b+=e.offsetTop,g+=e.offsetLeft
        }
        if(l.position==="fixed"){
        b+=Math.max(h.scrollTop,e.scrollTop),g+=Math.max(h.scrollLeft,e.scrollLeft)
        }
        return{
        top:b,
        left:g
    }
}
}
T.offset={
    initialize:function(){
        if(this.initialized){
            return
        }
        var c=document.body,j=document.createElement("div"),g,h,a,f,b,k,e=c.style.marginTop,d='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';
        b={
            position:"absolute",
            top:0,
            left:0,
            margin:0,
            border:0,
            width:"1px",
            height:"1px",
            visibility:"hidden"
        };

        for(k in b){
            j.style[k]=b[k]
            }
            j.innerHTML=d;
        c.insertBefore(j,c.firstChild);
        g=j.firstChild,h=g.firstChild,f=g.nextSibling.firstChild.firstChild;
        this.doesNotAddBorder=(h.offsetTop!==5);
        this.doesAddBorderForTableAndCells=(f.offsetTop===5);
        g.style.overflow="hidden",g.style.position="relative";
        this.subtractsBorderForOverflowNotVisible=(h.offsetTop===-5);
        c.style.marginTop="1px";
        this.doesNotIncludeMarginInBodyOffset=(c.offsetTop===0);
        c.style.marginTop=e;
        c.removeChild(j);
        this.initialized=true
        },
    bodyOffset:function(c){
        T.offset.initialized||T.offset.initialize();
        var a=c.offsetTop,b=c.offsetLeft;
        if(T.offset.doesNotIncludeMarginInBodyOffset){
            a+=parseInt(T.curCSS(c,"marginTop",true),10)||0,b+=parseInt(T.curCSS(c,"marginLeft",true),10)||0
            }
            return{
            top:a,
            left:b
        }
    }
};

T.fn.extend({
    position:function(){
        var b=0,c=0,e;
        if(this[0]){
            var d=this.offsetParent(),a=this.offset(),f=/^body|html$/i.test(d[0].tagName)?{
                top:0,
                left:0
            }:d.offset();
            a.top-=Y(this,"marginTop");
            a.left-=Y(this,"marginLeft");
            f.top+=Y(d,"borderTopWidth");
            f.left+=Y(d,"borderLeftWidth");
            e={
                top:a.top-f.top,
                left:a.left-f.left
                }
            }
        return e
    },
offsetParent:function(){
    var a=this[0].offsetParent||document.body;
    while(a&&(!/^body|html$/i.test(a.tagName)&&T.css(a,"position")=="static")){
        a=a.offsetParent
        }
        return T(a)
    }
});
T.each(["Left","Top"],function(b,c){
    var a="scroll"+c;
    T.fn[a]=function(d){
        if(!this[0]){
            return null
            }
            return d!==ab?this.each(function(){
            this==W||this==document?W.scrollTo(!b?d:T(W).scrollLeft(),b?d:T(W).scrollTop()):this[a]=d
            }):this[0]==W||this[0]==document?self[b?"pageYOffset":"pageXOffset"]||T.boxModel&&document.documentElement[a]||document.body[a]:this[0][a]
        }
    });
T.each(["Height","Width"],function(b,d){
    var f=b?"Left":"Top",c=b?"Right":"Bottom",e=d.toLowerCase();
    T.fn["inner"+d]=function(){
        return this[0]?T.css(this[0],e,false,"padding"):null
        };

    T.fn["outer"+d]=function(g){
        return this[0]?T.css(this[0],e,false,g?"margin":"border"):null
        };

    var a=d.toLowerCase();
    T.fn[a]=function(g){
        return this[0]==W?document.compatMode=="CSS1Compat"&&document.documentElement["client"+d]||document.body["client"+d]:this[0]==document?Math.max(document.documentElement["client"+d],document.body["scroll"+d],document.documentElement["scroll"+d],document.body["offset"+d],document.documentElement["offset"+d]):g===ab?(this.length?T.css(this[0],a):null):this.css(a,typeof g==="string"?g:g+"px")
        }
    })
})();
new function(e){
    var d=e.separator||"&";
    var c=e.spaces===false?false:true;
    var a=e.suffix===false?"":"[]";
    var g=e.prefix===false?false:true;
    var b=g?e.hash===true?"#":"?":"";
    var f=e.numbers===false?false:true;
    jQuery.query=new function(){
        var h=function(n,m){
            return n!=undefined&&n!==null&&(!!m?n.constructor==m:true)
            };

        var j=function(t){
            var n,r=/\[([^[]*)\]/g,o=/^(\S+?)(\[\S*\])?$/.exec(t),p=o[1],q=[];
            while(n=r.exec(o[2])){
                q.push(n[1])
                }
                return[p,q]
            };

        var l=function(u,t,r){
            var v,q=t.shift();
            if(typeof u!="object"){
                u=null
                }
                if(q===""){
                if(!u){
                    u=[]
                    }
                    if(h(u,Array)){
                    u.push(t.length==0?r:l(null,t.slice(0),r))
                    }else{
                    if(h(u,Object)){
                        var p=0;
                        while(u[p++]!=null){}
                        u[--p]=t.length==0?r:l(u[p],t.slice(0),r)
                        }else{
                        u=[];
                        u.push(t.length==0?r:l(null,t.slice(0),r))
                        }
                    }
            }else{
        if(q&&q.match(/^\s*[0-9]+\s*$/)){
            var n=parseInt(q,10);
            if(!u){
                u=[]
                }
                u[n]=t.length==0?r:l(u[n],t.slice(0),r)
            }else{
            if(q){
                var n=q.replace(/^\s*|\s*$/g,"");
                if(!u){
                    u={}
                }
                if(h(u,Array)){
                var m={};

                for(var p=0;p<u.length;++p){
                    m[p]=u[p]
                    }
                    u=m
                }
                u[n]=t.length==0?r:l(u[n],t.slice(0),r)
            }else{
            return r
            }
        }
}
return u
};

var k=function(m){
    var n=this;
    n.keys={};

    if(m.queryObject){
        jQuery.each(m.get(),function(o,p){
            n.SET(o,p)
            })
        }else{
        jQuery.each(arguments,function(){
            var o=""+this;
            o=o.replace(/^[?#]/,"");
            o=o.replace(/[;&]$/,"");
            if(c){
                o=o.replace(/[+]/g," ")
                }
                jQuery.each(o.split(/[&;]/),function(){
                var p=this.split("=")[0];
                var q=this.split("=")[1];
                if(!p){
                    return
                }
                if(f){
                    if(/^[+-]?[0-9]+\.[0-9]*$/.test(q)){
                        q=parseFloat(q)
                        }else{
                        if(/^[+-]?[0-9]+$/.test(q)){
                            q=parseInt(q,10)
                            }
                        }
                }
            q=(!q&&q!==0)?true:q;
            if(q!==false&&q!==true&&typeof q!="number"){
                q=decodeURIComponent(q)
                }
                n.SET(p,q)
            })
        })
}
return n
};

k.prototype={
    queryObject:true,
    has:function(m,n){
        var o=this.get(m);
        return h(o,n)
        },
    GET:function(n){
        if(!h(n)){
            return this.keys
            }
            var m=j(n),o=m[0],q=m[1];
        var p=this.keys[o];
        while(p!=null&&q.length!=0){
            p=p[q.shift()]
            }
            return typeof p=="number"?p:p||""
        },
    get:function(m){
        var n=this.GET(m);
        if(h(n,Object)){
            return jQuery.extend(true,{},n)
            }else{
            if(h(n,Array)){
                return n.slice(0)
                }
            }
        return n
    },
SET:function(n,t){
    var p=!h(t)?null:t;
    var m=j(n),o=m[0],r=m[1];
    var q=this.keys[o];
    this.keys[o]=l(q,r.slice(0),p);
    return this
    },
set:function(m,n){
    return this.copy().SET(m,n)
    },
REMOVE:function(m){
    return this.SET(m,null).COMPACT()
    },
remove:function(m){
    return this.copy().REMOVE(m)
    },
EMPTY:function(){
    var m=this;
    jQuery.each(m.keys,function(n,o){
        delete m.keys[n]
    });
    return m
    },
load:function(m){
    var o=m.replace(/^.*?[#](.+?)(?:\?.+)?$/,"$1");
    var n=m.replace(/^.*?[?](.+?)(?:#.+)?$/,"$1");
    return new k(m.length==n.length?"":n,m.length==o.length?"":o)
    },
empty:function(){
    return this.copy().EMPTY()
    },
copy:function(){
    return new k(this)
    },
COMPACT:function(){
    function m(p){
        var o=typeof p=="object"?h(p,Array)?[]:{}:p;
        if(typeof p=="object"){
            function n(t,q,r){
                if(h(t,Array)){
                    t.push(r)
                    }else{
                    t[q]=r
                    }
                }
            jQuery.each(p,function(q,r){
            if(!h(r)){
                return true
                }
                n(o,q,m(r))
            })
        }
        return o
    }
    this.keys=m(this.keys);
return this
},
compact:function(){
    return this.copy().COMPACT()
    },
toString:function(){
    var o=0,r=[],q=[],n=this;
    var m=function(t,u,v){
        if(!h(v)||v===false){
            return
        }
        var w=[u];
        if(v!==true){
            w.push("=");
            w.push(encodeURIComponent(v))
            }
            t.push(w.join(""))
        };

    var p=function(u,t){
        var v=function(w){
            return !t||t==""?[w].join(""):[t,"[",w,"]"].join("")
            };

        jQuery.each(u,function(w,x){
            if(typeof x=="object"){
                p(x,v(w))
                }else{
                m(q,v(w),x)
                }
            })
    };

p(this.keys);
if(q.length>0){
    r.push(b)
    }
    r.push(q.join(d));
return r.join("")
}
};

return new k(location.search,location.hash)
}
}(jQuery.query||{});
(function(a){
    a.fn.popup_links=function(b){
        b=a.extend({},a.PopupLink.defaults,b);
        return this.each(function(){
            new a.PopupLink(this,b)
            })
        };

    a.PopupLink=function(d,t){
        a(d).prepend('<div class="graybox"></div>').next(t.popup_selector).prepend(a(d).html()).append('<div class="arrow"></div>');
        t=a.extend({},a.PopupLink.defaults,t);
        var q,o,g,e;
        var f=function(u){
            q=u.pageX;
            o=u.pageY
            };

        var c=function(v,u){
            u.hoverIntent_t=clearTimeout(u.hoverIntent_t);
            if((Math.abs(g-q)+Math.abs(e-o))<t.sensitivity){
                a(u).unbind("mousemove",f);
                u.hoverIntent_s=1;
                a(t.popup_selector).hide();
                m(v,u);
                a(document).bind("mousemove",r)
                }else{
                g=q;
                e=o;
                u.hoverIntent_t=setTimeout(function(){
                    c(v,u)
                    },t.interval)
                }
            };

    var m=function(y,x){
        var w=a(x).next(t.popup_selector);
        var B=(parseInt(j(y)-t.offset_x-t.offset_x));
        if((B+w.width())>a("body").width()-p()-t.offset_x){
            B=a("body").width()-p()-w.width()-t.offset_x
            }
            var v=a(x).offset().top-(a(x).height()/2);
        if(a(x).children("span").length>0){
            a(x).children().each(function(){
                if(a(this).offset().left<=j(y)&&j(y)<=(a(this).offset().left+a(this).width())){
                    return v=a(this).offset().top-(a(this).height()/2)
                    }
                })
        }
        var A=(v-t.offset_y-w.height());
    if(!t.lock_y){
        A=(parseInt(h(y)-t.offset_y-w.height()-n()))
        }
        w.attr("style","display:block;visible:true;top:"+A+"px;left:"+B+"px");
    var z=w.find(".arrow");
    var u=(j(y)-B);
    u=u-t.offset_x;
    if(u>(w.width()-z.width())){
        u=w.width()-z.width()
        }
        z.attr("style","left:"+u+"px;")
    };

var l=function(v,u){
    u.hoverIntent_t=clearTimeout(u.hoverIntent_t);
    u.hoverIntent_s=0;
    return a(u).next(t.popup_selector).attr("style","display:none;")
    };

var b=function(y){
    var x=(y.type=="mouseover"?y.fromElement:y.toElement)||y.relatedTarget;
    while(x&&x!=this){
        try{
            x=x.parentNode
            }catch(y){
            x=this
            }
        }
    if(x==this){
    return false
    }
    var w=a.extend({},y);
    var v=this;
    var u=a(v).find(t.graybox);
    if(v.hoverIntent_t){
    v.hoverIntent_t=clearTimeout(v.hoverIntent_t)
    }
    if(y.type=="mouseover"){
    g=j(w);
    e=h(w);
    a(v).bind("mousemove",f);
    if(v.hoverIntent_s!=1){
        v.hoverIntent_t=setTimeout(function(){
            c(w,v)
            },t.interval)
        }
        u.fadeTo(0,0).hide()
    }else{
    a(v).unbind("mousemove",f);
    if(t.allowRollOver){
        a(document).unbind("mousemove",r)
        }
        if(v.hoverIntent_s==1){
        v.hoverIntent_t=setTimeout(function(){
            l(w,v);
            a(document).unbind("mousemove",r)
            },t.timeout)
        }
        u.show().fadeTo(0,0.5)
    }
};

var k=function(x){
    var w=(x.type=="mouseover"?x.fromElement:x.toElement)||x.relatedTarget;
    while(w&&w!=this){
        try{
            w=w.parentNode
            }catch(x){
            w=this
            }
        }
    if(w==this){
    return false
    }
    var v=jQuery.extend({},x);
if(d.hoverIntent_t){
    d.hoverIntent_t=clearTimeout(d.hoverIntent_t)
    }
    d.hoverIntent_s=0;
var u=a(d).find(t.graybox);
u.fadeTo(0,0).hide();
if(x.type=="mouseout"){
    u.show().fadeTo(0,0.5);
    return a(this).attr("style","display:none;")
    }
};

function r(u){
    var v=a(t.popup_selector+":visible").prev(t.link_selector);
    m(u,v)
    }
    function j(u){
    if(!u){
        u=window.event
        }
        if(u.pageX){
        return u.pageX
        }else{
        if(u.clientX){
            return u.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft)
            }else{
            return 0
            }
        }
}
function h(u){
    if(!u){
        u=window.event
        }
        if(u.pageY){
        return u.pageY
        }else{
        if(u.clientY){
            return u.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)
            }else{
            return 0
            }
        }
}
function p(){
    var u=(a(document.body).width()-a("div#content").width())/2;
    return(u<0)?0:u
    }
    function n(){
    var u=(a(document.body).height()-a("div#content").height())/2;
    return(u<0)?0:u
    }
    if(t.allowRollOver){
    a(d).next().mouseover(k).mouseout(k)
    }
    return a(d).mouseover(b).mouseout(b)
};

a.PopupLink.defaults={
    link_selector:"a.popup",
    popup_selector:"div.popup",
    graybox:"div.graybox",
    lock_x:false,
    lock_y:true,
    offset_x:25,
    offset_y:0,
    sensitivity:7,
    allowRollOver:true,
    interval:50,
    timeout:200
}
})(jQuery);
jQuery.ui||(function(p){
    var j=p.fn.remove,o=p.browser.mozilla&&(parseFloat(p.browser.version)<1.9);
    p.ui={
        version:"1.7.1",
        plugin:{
            add:function(c,b,e){
                var a=p.ui[c].prototype;
                for(var d in e){
                    a.plugins[d]=a.plugins[d]||[];
                    a.plugins[d].push([b,e[d]])
                    }
                },
        call:function(d,b,c){
            var e=d.plugins[b];
            if(!e||!d.element[0].parentNode){
                return
            }
            for(var a=0;a<e.length;a++){
                if(d.options[e[a][0]]){
                    e[a][1].apply(d.element,c)
                    }
                }
            }
    },
contains:function(a,b){
    return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)
    },
hasScroll:function(a,c){
    if(p(a).css("overflow")=="hidden"){
        return false
        }
        var d=(c&&c=="left")?"scrollLeft":"scrollTop",b=false;
    if(a[d]>0){
        return true
        }
        a[d]=1;
    b=(a[d]>0);
    a[d]=0;
    return b
    },
isOverAxis:function(b,c,a){
    return(b>c)&&(b<(c+a))
    },
isOver:function(e,c,f,a,d,b){
    return p.ui.isOverAxis(e,f,d)&&p.ui.isOverAxis(c,a,b)
    },
keyCode:{
    BACKSPACE:8,
    CAPS_LOCK:20,
    COMMA:188,
    CONTROL:17,
    DELETE:46,
    DOWN:40,
    END:35,
    ENTER:13,
    ESCAPE:27,
    HOME:36,
    INSERT:45,
    LEFT:37,
    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
}
};

if(o){
    var m=p.attr,n=p.fn.removeAttr,k="http://www.w3.org/2005/07/aaa",r=/^aria-/,q=/^wairole:/;
    p.attr=function(c,d,b){
        var a=b!==undefined;
        return(d=="role"?(a?m.call(this,c,d,"wairole:"+b):(m.apply(this,arguments)||"").replace(q,"")):(r.test(d)?(a?c.setAttributeNS(k,d.replace(r,"aaa:"),b):m.call(this,c,d.replace(r,"aaa:"))):m.apply(this,arguments)))
        };

    p.fn.removeAttr=function(a){
        return(r.test(a)?this.each(function(){
            this.removeAttributeNS(k,a.replace(r,""))
            }):n.call(this,a))
        }
    }
p.fn.extend({
    remove:function(){
        p("*",this).add(this).each(function(){
            p(this).triggerHandler("remove")
            });
        return j.apply(this,arguments)
        },
    enableSelection:function(){
        return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")
        },
    disableSelection:function(){
        return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){
            return false
            })
        },
    scrollParent:function(){
        var a;
        if((p.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){
            a=this.parents().filter(function(){
                return(/(relative|absolute|fixed)/).test(p.curCSS(this,"position",1))&&(/(auto|scroll)/).test(p.curCSS(this,"overflow",1)+p.curCSS(this,"overflow-y",1)+p.curCSS(this,"overflow-x",1))
                }).eq(0)
            }else{
            a=this.parents().filter(function(){
                return(/(auto|scroll)/).test(p.curCSS(this,"overflow",1)+p.curCSS(this,"overflow-y",1)+p.curCSS(this,"overflow-x",1))
                }).eq(0)
            }
            return(/fixed/).test(this.css("position"))||!a.length?p(document):a
        }
    });
p.extend(p.expr[":"],{
    data:function(a,b,c){
        return !!p.data(a,c[3])
        },
    focusable:function(b){
        var a=b.nodeName.toLowerCase(),c=p.attr(b,"tabindex");
        return(/input|select|textarea|button|object/.test(a)?!b.disabled:"a"==a||"area"==a?b.href||!isNaN(c):!isNaN(c))&&!p(b)["area"==a?"parents":"closest"](":hidden").length
        },
    tabbable:function(a){
        var b=p.attr(a,"tabindex");
        return(isNaN(b)||b>=0)&&p(a).is(":focusable")
        }
    });
function l(a,f,e,b){
    function c(g){
        var h=p[a][f][g]||[];
        return(typeof h=="string"?h.split(/,?\s+/):h)
        }
        var d=c("getter");
    if(b.length==1&&typeof b[0]=="string"){
        d=d.concat(c("getterSetter"))
        }
        return(p.inArray(e,d)!=-1)
    }
    p.widget=function(b,c){
    var a=b.split(".")[0];
    b=b.split(".")[1];
    p.fn[b]=function(e){
        var g=(typeof e=="string"),f=Array.prototype.slice.call(arguments,1);
        if(g&&e.substring(0,1)=="_"){
            return this
            }
            if(g&&l(a,b,e,f)){
            var d=p.data(this[0],b);
            return(d?d[e].apply(d,f):undefined)
            }
            return this.each(function(){
            var h=p.data(this,b);
            (!h&&!g&&p.data(this,b,new p[a][b](this,e))._init());
            (h&&g&&p.isFunction(h[e])&&h[e].apply(h,f))
            })
        };

    p[a]=p[a]||{};

    p[a][b]=function(e,f){
        var d=this;
        this.namespace=a;
        this.widgetName=b;
        this.widgetEventPrefix=p[a][b].eventPrefix||b;
        this.widgetBaseClass=a+"-"+b;
        this.options=p.extend({},p.widget.defaults,p[a][b].defaults,p.metadata&&p.metadata.get(e)[b],f);
        this.element=p(e).bind("setData."+b,function(h,t,g){
            if(h.target==e){
                return d._setData(t,g)
                }
            }).bind("getData."+b,function(g,h){
        if(g.target==e){
            return d._getData(h)
            }
        }).bind("remove",function(){
    return d.destroy()
    })
};

p[a][b].prototype=p.extend({},p.widget.prototype,c);
p[a][b].getterSetter="option"
};

p.widget.prototype={
    _init:function(){},
    destroy:function(){
        this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")
        },
    option:function(b,a){
        var c=b,d=this;
        if(typeof b=="string"){
            if(a===undefined){
                return this._getData(b)
                }
                c={};

            c[b]=a
            }
            p.each(c,function(f,e){
            d._setData(f,e)
            })
        },
    _getData:function(a){
        return this.options[a]
        },
    _setData:function(b,a){
        this.options[b]=a;
        if(b=="disabled"){
            this.element[a?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",a)
            }
        },
enable:function(){
    this._setData("disabled",false)
    },
disable:function(){
    this._setData("disabled",true)
    },
_trigger:function(b,a,g){
    var e=this.options[b],d=(b==this.widgetEventPrefix?b:this.widgetEventPrefix+b);
    a=p.Event(a);
    a.type=d;
    if(a.originalEvent){
        for(var c=p.event.props.length,f;c;){
            f=p.event.props[--c];
            a[f]=a.originalEvent[f]
            }
        }
        this.element.trigger(a,g);
return !(p.isFunction(e)&&e.call(this.element[0],a,g)===false||a.isDefaultPrevented())
}
};

p.widget.defaults={
    disabled:false
};

p.ui.mouse={
    _mouseInit:function(){
        var a=this;
        this.element.bind("mousedown."+this.widgetName,function(b){
            return a._mouseDown(b)
            }).bind("click."+this.widgetName,function(b){
            if(a._preventClickEvent){
                a._preventClickEvent=false;
                b.stopImmediatePropagation();
                return false
                }
            });
    if(p.browser.msie){
        this._mouseUnselectable=this.element.attr("unselectable");
        this.element.attr("unselectable","on")
        }
        this.started=false
    },
_mouseDestroy:function(){
    this.element.unbind("."+this.widgetName);
    (p.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))
    },
_mouseDown:function(b){
    b.originalEvent=b.originalEvent||{};

    if(b.originalEvent.mouseHandled){
        return
    }(this._mouseStarted&&this._mouseUp(b));
    this._mouseDownEvent=b;
    var c=this,a=(b.which==1),d=(typeof this.options.cancel=="string"?p(b.target).parents().add(b.target).filter(this.options.cancel).length:false);
    if(!a||d||!this._mouseCapture(b)){
        return true
        }
        this.mouseDelayMet=!this.options.delay;
    if(!this.mouseDelayMet){
        this._mouseDelayTimer=setTimeout(function(){
            c.mouseDelayMet=true
            },this.options.delay)
        }
        if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){
        this._mouseStarted=(this._mouseStart(b)!==false);
        if(!this._mouseStarted){
            b.preventDefault();
            return true
            }
        }
    this._mouseMoveDelegate=function(e){
    return c._mouseMove(e)
    };

this._mouseUpDelegate=function(e){
    return c._mouseUp(e)
    };

p(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);
(p.browser.safari||b.preventDefault());
b.originalEvent.mouseHandled=true;
return true
},
_mouseMove:function(a){
    if(p.browser.msie&&!a.button){
        return this._mouseUp(a)
        }
        if(this._mouseStarted){
        this._mouseDrag(a);
        return a.preventDefault()
        }
        if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){
        this._mouseStarted=(this._mouseStart(this._mouseDownEvent,a)!==false);
        (this._mouseStarted?this._mouseDrag(a):this._mouseUp(a))
        }
        return !this._mouseStarted
    },
_mouseUp:function(a){
    p(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
    if(this._mouseStarted){
        this._mouseStarted=false;
        this._preventClickEvent=(a.target==this._mouseDownEvent.target);
        this._mouseStop(a)
        }
        return false
    },
_mouseDistanceMet:function(a){
    return(Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance)
    },
_mouseDelayMet:function(a){
    return this.mouseDelayMet
    },
_mouseStart:function(a){},
_mouseDrag:function(a){},
_mouseStop:function(a){},
_mouseCapture:function(a){
    return true
    }
};

p.ui.mouse.defaults={
    cancel:null,
    distance:1,
    delay:0
}
})(jQuery);
(function(b){
    b.widget("ui.slider",b.extend({},b.ui.mouse,{
        _init:function(){
            var a=this,d=this.options;
            this._keySliding=false;
            this._handleIndex=null;
            this._detectOrientation();
            this._mouseInit();
            this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");
            this.range=b([]);
            if(d.range){
                if(d.range===true){
                    this.range=b("<div></div>");
                    if(!d.values){
                        d.values=[this._valueMin(),this._valueMin()]
                        }
                        if(d.values.length&&d.values.length!=2){
                        d.values=[d.values[0],d.values[0]]
                        }
                    }else{
                this.range=b("<div></div>")
                }
                this.range.appendTo(this.element).addClass("ui-slider-range");
            if(d.range=="min"||d.range=="max"){
                this.range.addClass("ui-slider-range-"+d.range)
                }
                this.range.addClass("ui-widget-header")
            }
            if(b(".ui-slider-handle",this.element).length==0){
            b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")
            }
            if(d.values&&d.values.length){
            while(b(".ui-slider-handle",this.element).length<d.values.length){
                b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")
                }
            }
        this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");
        this.handle=this.handles.eq(0);
        this.handles.add(this.range).filter("a").click(function(c){
        c.preventDefault()
        }).hover(function(){
        b(this).addClass("ui-state-hover")
        },function(){
        b(this).removeClass("ui-state-hover")
        }).focus(function(){
        b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");
        b(this).addClass("ui-state-focus")
        }).blur(function(){
        b(this).removeClass("ui-state-focus")
        });
    this.handles.each(function(c){
        b(this).data("index.ui-slider-handle",c)
        });
    this.handles.keydown(function(c){
        var l=true;
        var m=b(this).data("index.ui-slider-handle");
        if(a.options.disabled){
            return
        }
        switch(c.keyCode){
            case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:
                l=false;
                if(!a._keySliding){
                a._keySliding=true;
                b(this).addClass("ui-state-active");
                a._start(c,m)
                }
                break
            }
            var k,n,j=a._step();
        if(a.options.values&&a.options.values.length){
            k=n=a.values(m)
            }else{
            k=n=a.value()
            }
            switch(c.keyCode){
            case b.ui.keyCode.HOME:
                n=a._valueMin();
                break;
            case b.ui.keyCode.END:
                n=a._valueMax();
                break;
            case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:
                if(k==a._valueMax()){
                return
            }
            n=k+j;
            break;
            case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:
                if(k==a._valueMin()){
                return
            }
            n=k-j;
            break
            }
            a._slide(c,m,n);
        return l
        }).keyup(function(c){
        var f=b(this).data("index.ui-slider-handle");
        if(a._keySliding){
            a._stop(c,f);
            a._change(c,f);
            a._keySliding=false;
            b(this).removeClass("ui-state-active")
            }
        });
    this._refreshValue()
        },
    destroy:function(){
        this.handles.remove();
        this.range.remove();
        this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
        this._mouseDestroy()
        },
    _mouseCapture:function(r){
        var q=this.options;
        if(q.disabled){
            return false
            }
            this.elementSize={
            width:this.element.outerWidth(),
            height:this.element.outerHeight()
            };

        this.elementOffset=this.element.offset();
        var n={
            x:r.pageX,
            y:r.pageY
            };

        var l=this._normValueFromMouse(n);
        var t=this._valueMax()-this._valueMin()+1,p;
        var a=this,m;
        this.handles.each(function(d){
            var c=Math.abs(l-a.values(d));
            if(t>c){
                t=c;
                p=b(this);
                m=d
                }
            });
    if(q.range==true&&this.values(1)==q.min){
        p=b(this.handles[++m])
        }
        this._start(r,m);
    a._handleIndex=m;
    p.addClass("ui-state-active").focus();
    var o=p.offset();
    var u=!b(r.target).parents().andSelf().is(".ui-slider-handle");
    this._clickOffset=u?{
        left:0,
        top:0
    }:{
        left:r.pageX-o.left-(p.width()/2),
        top:r.pageY-o.top-(p.height()/2)-(parseInt(p.css("borderTopWidth"),10)||0)-(parseInt(p.css("borderBottomWidth"),10)||0)+(parseInt(p.css("marginTop"),10)||0)
        };

    l=this._normValueFromMouse(n);
    this._slide(r,m,l);
    return true
    },
_mouseStart:function(a){
    return true
    },
_mouseDrag:function(e){
    var a={
        x:e.pageX,
        y:e.pageY
        };

    var f=this._normValueFromMouse(a);
    this._slide(e,this._handleIndex,f);
    return false
    },
_mouseStop:function(a){
    this.handles.removeClass("ui-state-active");
    this._stop(a,this._handleIndex);
    this._change(a,this._handleIndex);
    this._handleIndex=null;
    this._clickOffset=null;
    return false
    },
_detectOrientation:function(){
    this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"
    },
_normValueFromMouse:function(o){
    var p,k;
    if("horizontal"==this.orientation){
        p=this.elementSize.width;
        k=o.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)
        }else{
        p=this.elementSize.height;
        k=o.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)
        }
        var m=(k/p);
    if(m>1){
        m=1
        }
        if(m<0){
        m=0
        }
        if("vertical"==this.orientation){
        m=1-m
        }
        var n=this._valueMax()-this._valueMin(),j=m*n,a=j%this.options.step,l=this._valueMin()+j-a;
    if(a>(this.options.step/2)){
        l+=this.options.step
        }
        return parseFloat(l.toFixed(5))
    },
_start:function(e,f){
    var a={
        handle:this.handles[f],
        value:this.value()
        };

    if(this.options.values&&this.options.values.length){
        a.value=this.values(f);
        a.values=this.values()
        }
        this._trigger("start",e,a)
    },
_slide:function(l,m,n){
    var k=this.handles[m];
    if(this.options.values&&this.options.values.length){
        var a=this.values(m?0:1);
        if((m==0&&n>=a)||(m==1&&n<=a)){
            n=a
            }
            if(n!=this.values(m)){
            var o=this.values();
            o[m]=n;
            var j=this._trigger("slide",l,{
                handle:this.handles[m],
                value:n,
                values:o
            });
            var a=this.values(m?0:1);
            if(j!==false){
                this.values(m,n,(l.type=="mousedown"&&this.options.animate),true)
                }
            }
    }else{
    if(n!=this.value()){
        var j=this._trigger("slide",l,{
            handle:this.handles[m],
            value:n
        });
        if(j!==false){
            this._setData("value",n,(l.type=="mousedown"&&this.options.animate))
            }
        }
}
},
_stop:function(e,f){
    var a={
        handle:this.handles[f],
        value:this.value()
        };

    if(this.options.values&&this.options.values.length){
        a.value=this.values(f);
        a.values=this.values()
        }
        this._trigger("stop",e,a)
    },
_change:function(e,f){
    var a={
        handle:this.handles[f],
        value:this.value()
        };

    if(this.options.values&&this.options.values.length){
        a.value=this.values(f);
        a.values=this.values()
        }
        this._trigger("change",e,a)
    },
value:function(a){
    if(arguments.length){
        this._setData("value",a);
        this._change(null,0)
        }
        return this._value()
    },
values:function(a,f,h,g){
    if(arguments.length>1){
        this.options.values[a]=f;
        this._refreshValue(h);
        if(!g){
            this._change(null,a)
            }
        }
    if(arguments.length){
    if(this.options.values&&this.options.values.length){
        return this._values(a)
        }else{
        return this.value()
        }
    }else{
    return this._values()
    }
},
_setData:function(a,e,f){
    b.widget.prototype._setData.apply(this,arguments);
    switch(a){
        case"orientation":
            this._detectOrientation();
            this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);
            this._refreshValue(f);
            break;
        case"value":
            this._refreshValue(f);
            break
            }
        },
_step:function(){
    var a=this.options.step;
    return a
    },
_value:function(){
    var a=this.options.value;
    if(a<this._valueMin()){
        a=this._valueMin()
        }
        if(a>this._valueMax()){
        a=this._valueMax()
        }
        return a
    },
_values:function(a){
    if(arguments.length){
        var d=this.options.values[a];
        if(d<this._valueMin()){
            d=this._valueMin()
            }
            if(d>this._valueMax()){
            d=this._valueMax()
            }
            return d
        }else{
        return this.options.values
        }
    },
_valueMin:function(){
    var a=this.options.min;
    return a
    },
_valueMax:function(){
    var a=this.options.max;
    return a
    },
_refreshValue:function(v){
    var r=this.options.range,u=this.options,a=this;
    if(this.options.values&&this.options.values.length){
        var o,p;
        this.handles.each(function(d,f){
            var e=(a.values(d)-a._valueMin())/(a._valueMax()-a._valueMin())*100;
            var c={};

            c[a.orientation=="horizontal"?"left":"bottom"]=e+"%";
            b(this).stop(1,1)[v?"animate":"css"](c,u.animate);
            if(a.options.range===true){
                if(a.orientation=="horizontal"){
                    (d==0)&&a.range.stop(1,1)[v?"animate":"css"]({
                        left:e+"%"
                        },u.animate);
                    (d==1)&&a.range[v?"animate":"css"]({
                        width:(e-lastValPercent)+"%"
                        },{
                        queue:false,
                        duration:u.animate
                        })
                    }else{
                    (d==0)&&a.range.stop(1,1)[v?"animate":"css"]({
                        bottom:(e)+"%"
                        },u.animate);
                    (d==1)&&a.range[v?"animate":"css"]({
                        height:(e-lastValPercent)+"%"
                        },{
                        queue:false,
                        duration:u.animate
                        })
                    }
                }
            lastValPercent=e
        })
    }else{
    var n=this.value(),q=this._valueMin(),m=this._valueMax(),t=m!=q?(n-q)/(m-q)*100:0;
    var w={};

    w[a.orientation=="horizontal"?"left":"bottom"]=t+"%";
    this.handle.stop(1,1)[v?"animate":"css"](w,u.animate);
    (r=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[v?"animate":"css"]({
        width:t+"%"
        },u.animate);
    (r=="max")&&(this.orientation=="horizontal")&&this.range[v?"animate":"css"]({
        width:(100-t)+"%"
        },{
        queue:false,
        duration:u.animate
        });
    (r=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[v?"animate":"css"]({
        height:t+"%"
        },u.animate);
    (r=="max")&&(this.orientation=="vertical")&&this.range[v?"animate":"css"]({
        height:(100-t)+"%"
        },{
        queue:false,
        duration:u.animate
        })
    }
}
}));
b.extend(b.ui.slider,{
    getter:"value values",
    version:"1.7.1",
    eventPrefix:"slide",
    defaults:{
        animate:false,
        delay:0,
        distance:0,
        max:100,
        min:0,
        orientation:"horizontal",
        range:false,
        step:1,
        value:0,
        values:null
    }
})
})(jQuery);
RBConfig={
    transparent_img:"/cs/RedBull/images/transparent.gif",
    video_player_swf:"/cs/RedBull/flash/RBPlayer.swf",
    install_player_swf:"/cs/RedBull/flash/expressInstall.swf",
    event_search_url:'if(document.getElementById("sectionevent_Url")){document.getElementById("sectionevent_Url").value;}',
    blue_marker:"/cs/RedBull/images/marker-blue.png",
    cross_promo_url:'if(document.getElementById("cross_Promo_URL")){document.getElementById("cross_Promo_URL").value;}',
    copy_swf:"/cs/RedBull/javascripts/clipboard.swf",
    site_Name:'document.getElementById("input_siteName").value.toString().indexOf("air")'
};

function validateSearchForm(a){
    if(document.getElementById("search-form-search")){
        var b=a.elements.search.value;
        var c=a.elements.searchkey.value;
        if(b==""||b==c){
            return false
            }else{
            return true
            }
        }
}
var page="";
var onlyonce="false";
var onlyonceembed="false";
var onlyonceparam="false";
(function(a){
    a(document).ready(function(){
        a("#rsvp .styled").each(function(c){
            if(this.checked){
                var d="X"
                }else{
                var d="&nbsp;"
                }
                a(this).css("display","none").siblings("label").prepend('<span class="radio-box">'+d+"</span>");
            a(this.parentNode).mouseup(function(){
                var e=a(this).children("input")[0];
                e.checked=true;
                a(e).change()
                });
            a(this).change(function(){
                a("#rsvp input.styled").siblings("label").children("span").html("&nbsp;");
                a("#rsvp input.styled:checked").siblings("label").children("span").html("X")
                })
            });
        if(a("#content-selector").length>0){
            contentSelector()
            }
            a("#contact-form, #comment-form").each(function(c){
            validateForm(this)
            });
        if(a("#company_Prod_Contact").length>0){
            a("BODY").append('<div id="body_overlay"></div>');
            a("#body_overlay").css({
                position:"absolute",
                zIndex:99998,
                top:"0px",
                left:"0px",
                width:"100%",
                height:a(window).height()+"px",
                background:"#000",
                opacity:0.5,
                display:"none"
            });
            a('<input type="button" class="redButton" value="'+translate("cancel")+'" />').appendTo(a("#company_Prod_Contact").find("div.submit")).bind("click",function(){
                a("#company_Prod_Contact").find('#contact-form input:hidden[name="isErr"]').attr("value","null");
                a("#body_overlay, #company_Prod_Contact").hide()
                });
            a(".product-nav:last").find("li .contactUS_Link").click(function(){
                a("#body_overlay").css("height",a("body").height()+"px");
                a("#company_Prod_Contact").css({
                    left:(a(window).width()-700)/2+"px"
                    });
                a("#body_overlay, #company_Prod_Contact").show();
                return false
                });
            if(a('#contact-form input:hidden[name="isErr"]').attr("value")=="true"){
                a("#company_Prod_Contact").css({
                    left:(a(window).width()-700)/2+"px"
                    });
                a("#body_overlay, #company_Prod_Contact").show()
                }
            }
        if(a("#contact-form .usCategorySelect").find("option:selected").attr("value")=="General"){
        a("#contact-form").find(".field:not(.generalCat, .usCategorySelectCont, .submit, #recaptcha_widget)").hide()
        }
        a("#contact-form .usCategorySelect").bind("change",usFormCategoryChange);
        a(".SelectDestinationBlock, .selectDestList_Cont").hover(function(){
        a(".SelectDestinationBlock").addClass("country_Hover")
        },function(){
        a(".SelectDestinationBlock").removeClass("country_Hover")
        });
    usFormCategoryChange();
        var b=document.createElement("iframe");
        b.setAttribute("id","framediv");
        b.setAttribute("src","/cs/RedBull/images/transparent.gif");
        b.setAttribute("ALLOWTRANSPARENCY","true");
        b.style.display="none";
        b.style.scrolling="no";
        b.style.frameBorder="0";
        a(b).insertBefore(a(".SelectDestinationBlock"));
        a("#framediv").css({
        width:"417px",
        height:"200px",
        position:"absolute",
        top:"23px",
        left:"0px",
        "z-index":999
    });
    a(".SelectDestinationBlock").click(function(){
        a("#framediv, .selectDestList_Cont").toggle()
        });
    a(".selectDestList_Cont .selectDestList, .field_SelectDestination").bind("mouseleave",function(){
        a("#framediv").hide();
        a(".selectDestList_Cont").hide()
        });
    a(".selectDestList_Cont .selectDestList a").bind("click",function(){
        if(a(this).attr("href")=="#"){
            var c=a(this).text();
            c=a.trim(c);
            a("#countryCodeHidden").val(cntryCodeArr[c]);
            if(a("#contact-state")[0]){
                a(a("#contact-state").find("option")[0]).attr("value","NONE");
                a(a("#contact-state")[0]).attr("disabled","disabled")
                }
                a("#selectedCountry").attr("value",c);
            a(".SelectDestinationBlock label").html(c);
            a("#framediv, .selectDestList_Cont").hide();
            return false
            }else{
            a("#countryCodeHidden").val("")
            }
        });
    if(!a("#main-content ul#category-navigation li")[0]){
        a("#main-content #category-navigation").hide()
        }
        a("#comments_Container").find("a.abuseLink").live("click",function(){
        _this=a(this);
        _this.hide();
        a('<div class="preloaderSmall"></div>').insertBefore(_this);
        a.ajax({
            type:"GET",
            url:_this.attr("rel"),
            success:function(c){
                _this.prev().remove();
                _this.replaceWith('<span class="flagged">'+c+"</span>")
                }
            });
    return false
    });
if(document.getElementById("permalink-code")){
    if(!document.getElementById("image")){
        a("#permalink-code").val(window.location)
        }
    }
a("#permalink-code, #embed-code").each(function(c){
    inputCopy(this)
    });
a(".facebook a").each(function(){
    addShareLink(this)
    });
if(a("#article .action-list-inline").length>0){
    addPrintLink()
    }
    if(a(".event-lists").length>0){
    eventTabs()
    }
    a("#country-selector, #language-selector").each(function(c){
    replaceSelect(this);
    a(this).find("select").change(function(){})
    });
a(".external-link").click(function(){
    window.open(this.href);
    return false
    });
a("#mosaic_Cont img#mosaicImg").each(function(){
    mosaic_Create.init()
    });
if(a("#featured-content .featured-item").length>0){
    featuredSlider()
    }else{
    a("#featured-content").find(".gallery-control").hide()
    }
	if (a(".cross-promo").length > 0) {
		CrossPromo.init();
	}
	if (a("span.randomizer").length > 0) {
		CrossPromo.initRandomizer();
	}
    a(".getCaptchaLink").show();
    a("table").each(function(){
    a(this).find("tr:even").addClass("odd")
    });
a("table tr").find("span").filter("span[class='redbull-Row_Highlight']").parent().parent().addClass("row_Highlight");
    a("table tr").find("span").filter("span[class='redbull-Table_Head']").parent().parent().addClass("table_Head");
    a("#comment-body").bind("keydown keyup blur",setMax_Length);

if(a("#events-map").length>0){
    EventMap.init()
    }
})
})(jQuery);

function translate(a){
    if(typeof(phrases)!="undefined"&&typeof(phrases[a])!="undefined"){
        return phrases[a]
        }
        return a
    }
    function contentSelector(){
    var a=this;
    a.links=$("#content-selector li:not(.rss)");
    a.sections=$(".content-section");
    a.productImages=$("#product-images .main-image");
    links.each(function(b){
        $(this).click(function(c){
            a.setAddress(a.sections.eq(b).attr("id"));
            c.preventDefault();
            return false
            })
        });
    if(a.sections.length>0&&$("#product").length>0){
        $("#"+$(a.sections[0]).attr("id")).css("display","block")
        }
        a.setAddress=function(c){
        var b=$("#"+c);
        SWFAddress.setValue(c)
        };

    a.onAddressChange=function(d){
        var f=d.path.split("/");
        var e=false;
        if(!f[1]){
            return
        }
        var c=$("#"+f[1]);
        if(c&&c.css("display")!="block"){
            a.sections.hide();
            c.show();
            var b=c.prevAll(".content-section").length;
            a.links.removeClass("on");
            $("#content-selector > ul li").each(function(){
                var g=$(this).find("a").attr("href").split("#");
                if(g[g.length-1]==f[1]){
                    $(this).addClass("on");
                    if(c.find("h4").length==0&&c.parents("#feed-content").length>0){
                        Feed.showMore("",f[1])
                        }
                        e=true
                    }
                });
        if(!e){
            $("#content-selector a[href='#"+f[1]+"']").parent().addClass("on")
            }
            if(a.productImages.length){
            a.productImages.hide();
            a.productImages.eq(b).css("display","block")
            }
        }
    $("#body_overlay").css("height",$("body").height()+"px")
};

SWFAddress.addEventListener(SWFAddressEvent.CHANGE,a.onAddressChange)
}
function validateCaptcha(b,a){
    if(a=="true"){
        b=$(b);
        b.prepend("<div class='error-explanation' style='display:none;'><p>"+translate("invalidcaptcha")+"</p></div>");
        errors=b.find(".error-explanation")[0];
        errors=$(errors);
        fields=b.find(".field");
        $("#recaptcha_response_field").parent(".field").addClass("field-with-errors");
        errors.fadeIn()
        }else{
        return
    }
}
function validateForm(a){
    a=$(a);
    a.prepend("<div class='error-explanation' style='display:none;'></div>");
    errors=a.find(".error-explanation")[0];
    errors=$(errors);
    fields=a.find(".field");
    submitButton=a.find("#submit");
    inputs=a.find("input,textarea");
    a.submit(function(){
        cancelSubmit=false;
        errors.hide();
        if($(".error-explanation").length>0){
            $(".error-explanation").hide()
            }
            errors.html("");
        fields.each(function(){
            $(this).removeClass("field-with-errors")
            });
        $(".field_SelectDestination").removeClass("field-with-errors");
        if($("#contactUs_US")[0]){
            a.find("input:visible,textarea:visible, .requiredSelect:visible").not(".notRequired").each(function(b){
                if($(this).not(".requiredSelect").val()==""){
                    $(this).val("");
                    errors.fadeIn();
                    if($(this).parent(".field").find("label").length>0){
                        errorFieldName=$(this).parent(".field").find("label").text().split(":")
                        }
                        errorFieldName=errorFieldName[0];
                    errors.append("<p>"+translate("pleaseenter")+" "+translate(errorFieldName)+"</p>");
                    $(this).parent(".field").addClass("field-with-errors");
                    cancelSubmit=true
                    }else{
                    if($(this).hasClass("requiredSelect")&&(($(this).find("option:selected").attr("value")=="")||($(this).find("option:selected").attr("value")=="none")||($(this).find("option:selected").length<0))){
                        errors.fadeIn();
                        if($(this).parent(".field").find("label").length>0){
                            errorFieldName=$(this).parent(".field").find("label").text().split(":")
                            }
                            errorFieldName=errorFieldName[0];
                        errors.append("<p>"+translate("pleaseenter")+" "+translate(errorFieldName)+"</p>");
                        $(this).parent(".field").addClass("field-with-errors");
                        cancelSubmit=true
                        }
                    }
                page="Contact us"
            })
        }else{
        a.find("input:visible,textarea:visible, .SelectDestinationBlock").each(function(b){
            if($(this).hasClass("SelectDestinationBlock")){
                var SelectedCountry=document.getElementById("selectedCountry");
                if ((SelectedCountry.value==null)||(SelectedCountry.value=="")||(SelectedCountry.value=="Select")||(SelectedCountry.value=="select")){
                    errors.fadeIn();
                    errors.append("<p>"+translate("pleaseenter")+" Country</p>");
                    $(this).parent().addClass("field-with-errors");
                    cancelSubmit=true
                    }
                }else{
            if(($(this).val()=="")||(($(this).attr("id")=="comment-name")&&($(this).val()==translate("Your full name.")))||(($(this).attr("id")=="comment-body")&&($(this).val()==translate("No HTML please.")))){
                $(this).val("");
                errors.fadeIn();
                if($(this).parent(".field").find("label").length>0){
                    errorFieldName=$(this).parent(".field").find("label").text().split(":")
                    }
                    errorFieldName=errorFieldName[0];
                errors.append("<p>"+translate("pleaseenter")+" "+translate(errorFieldName)+"</p>");
                $(this).parent(".field").addClass("field-with-errors");
                cancelSubmit=true
                }
            }
        if($("#contact-us")[0]){
            page="Contact us"
            }else{
            page="Comments"
            }
        })
}
if(cancelSubmit){
    return false
    }else{
        return true
    }
})
}
var copyClip=null;
function inputCopy(a){
    a=$(a);
    a.click(function(){
        a.focus().select()
        });
    copyClip=new ZeroClipboard.Client();
    copyClip.setHandCursor(true);
    var b=a.get(0).id+"-copy-btn";
    copyClip.addEventListener("onMouseDown",function(c){
        $("#"+b).parent().prev().focus().select()
        });
    a.after('<div class="copy-container"><div id="'+b+'" class="copy-code">'+translate("copy")+"</div></div>");
    $("#"+b).click(function(){
        $(this).prev().focus().select()
        });
    copyClip.setText(a.get(0).value);
    copyClip.glue(b)
    }
    function addPrintLink(){
    $("#article .action-list-inline li").remove("first");
    $("#article .action-list-inline").prepend('<li class="print first"><a onclick="window.print();return false;" href="#">'+translate("print article")+"</a></li>")
    }
    function addShareLink(a){
    $(a).click(function(){
        var b=location.href;
        var c=document.title;
        window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent(b)+"&t="+encodeURIComponent(c),"sharer","toolbar=0,status=0,width=626,height=436");
        return false
        })
    }
    function eventTabs(){
    if($("html").attr("dir")=="rtl"){
        return
    }
    $(".event-lists").addClass("tabbed");
    $(".upcoming-events").before('<ul class="tab-control"><li class="upcoming-header"><a href="#upcoming-events-list">'+translate("Upcoming Events")+'</a></li><li class="past-header"><a href="#past-events-list">'+translate("Past Events")+"</a></li></ul>");
    upcomingList=$(".upcoming-events");
    upcomingListEvents=upcomingList.find(".event-list");
    upcomingListHeader=$(".upcoming-header");
    pastList=$(".past-events");
    pastListEvents=pastList.find(".event-list");
    pastListHeader=$(".past-header");
    upcomingList.addClass("on");
    upcomingListHeader.addClass("on");
    upcomingHdr=upcomingListHeader.click(function(){
        pastList.removeClass("on");
        pastListHeader.removeClass("on");
        upcomingList.addClass("on");
        upcomingListHeader.addClass("on");
        pastListEvents.hide();
        upcomingListEvents.show();
        this.blur();
        return false
        });
    pastHdr=pastListHeader.click(function(){
        upcomingList.removeClass("on");
        upcomingListHeader.removeClass("on");
        pastList.addClass("on");
        pastListHeader.addClass("on");
        upcomingListEvents.hide();
        pastListEvents.show();
        this.blur();
        return false
        })
    }
    function replaceSelect(c){
    c=$(c);
    c.append("<h5></h5><ul class='select' id='"+c.attr("id")+"-list'></ul>");
    var b=c.find("ul");
    var d=c.find("h5");
    select=c.find("select");
    options=select.find("option");
    options.each(function(e){
        selected="";
        if($(this).attr("selected")){
            selected="class = 'selected'";
            d.text($(this).text())
            }
            b.append("<li "+selected+">"+$(this).text()+"</li>")
        });
    var a=b.find("li");
    select.hide();
    b.hide();
    if(b.height()>250){
        b.height(250)
        }
        d.click(function(){
        b.show()
        });
    b.bind("mouseleave",function(){
        b.hide()
        });
    $("#footer #selectors").bind("mouseleave",function(){
        b.hide()
        });
    a.hover(function(){
        $(this).addClass("hover")
        },function(){
        $(this).removeClass("hover")
        });
    a.click(function(){
        a.removeClass("selected");
        $(this).addClass("selected");
        d.text($(this).text());
        b.hide();
        var e=$(this).parent().siblings("select").get(0);
        e.selectedIndex=$(this).prevAll("li").length;
        $(e).change()
        })
    }
    function featuredSlider(){
    wrapper=$("#featured-content").addClass("slider");
    items=wrapper.find(".featured-item");
    items.eq(0).show();
    if(eval(RBConfig.site_Name)!=-1){
        var wrapperHeight=397;
        }else{
        var wrapperHeight=447; /* old 413 */
        }
        if((items.eq(0).hasClass("featured-article-item")||items.eq(0).hasClass("featured-video-item")||items.eq(0).hasClass("featured-event-item"))&&(items.eq(0).outerHeight()>wrapperHeight)){
        wrapper.css("margin-bottom",items.eq(0).outerHeight())
        }else{
        wrapper.css("margin-bottom",wrapperHeight)
        }
        curI=0;
    nextI=1;
    prevI=items.length-1;
    next=$("ul.gallery-control li.next a");
    prev=$("ul.gallery-control li.previous a");
    prev.addClass("disabled");
    if(items.length<2){
        next.css("display","none");
        prev.css("display","none")
        }
        next.click(function(event){
        if($(this).hasClass("disabled")){
            return false
            }
            prev.removeClass("disabled");
        next.removeClass("disabled");
        if((items.eq(nextI).hasClass("featured-article-item")||items.eq(nextI).hasClass("featured-video-item")||items.eq(0).hasClass("featured-event-item"))&&(items.eq(nextI).outerHeight()>wrapperHeight)){
            wrapper.css("margin-bottom",items.eq(nextI).outerHeight())
            }else{
            wrapper.css("margin-bottom",wrapperHeight)
            }
            items.eq(curI).fadeOut();
        items.eq(nextI).fadeIn();
        (curI==items.length-1)?curI=0:curI++;
        (nextI==items.length-1)?nextI=0:nextI++;
        (prevI==items.length-1)?prevI=0:prevI++;
        if(nextI==0){
            next.addClass("disabled")
            }
            if(curI==0){
            prev.addClass("disabled")
            }
            event.preventDefault()
        });
    prev.click(function(event){
        if($(this).hasClass("disabled")){
            return false
            }
            prev.removeClass("disabled");
        next.removeClass("disabled");
        if((items.eq(prevI).hasClass("featured-article-item")||items.eq(prevI).hasClass("featured-video-item")||items.eq(0).hasClass("featured-event-item"))&&(items.eq(prevI).outerHeight()>wrapperHeight)){
            wrapper.css("margin-bottom",items.eq(prevI).outerHeight())
            }else{
            wrapper.css("margin-bottom",wrapperHeight)
            }
            items.eq(curI).fadeOut();
        items.eq(prevI).fadeIn();
        (curI==0)?curI=items.length-1:curI--;
        (nextI==0)?nextI=items.length-1:nextI--;
        (prevI==0)?prevI=items.length-1:prevI--;
        if(prevI==items.length-1){
            prev.addClass("disabled")
            }
            if(curI==items.length-1){
            next.addClass("disabled")
            }
            event.preventDefault()
        })
    }
    var CrossPromo={
		init:function(){
			if ($(".cross-promo[rel]").length > 0) {
				CrossPromo.promoHolders=$(".cross-promo[rel]");
				$.getJSON($(".cross-promo[rel]").attr("rel"),function(a){
					CrossPromo.promos=a;
					CrossPromo.setup();
				})
			}
		},
		initRandomizer:function(){
			var spans = $("span.randomizer");
			for (var i = 0; i < spans.length; i ++) {
				if (0 < $(spans[i]).children(".cross-promo").length) {
					$(spans[i]).children(".cross-promo").hide();
					var index = Math.round(Math.random() * ($(spans[i]).children(".cross-promo").length - 1));
					$($(spans[i]).children(".cross-promo")[index]).show();
				}
			}
		},
    setup:function(){
        CrossPromo.promoHolders.each(function(c){
            if(CrossPromo.promos.promos.length){
                CrossPromo.promos.promos.sort(function(){
                    return 0.5-Math.random()
                    });
                currentPromo=CrossPromo.promos.promos.pop();
                if(currentPromo.flash){
                    try{
                        $(this).append('<div id="cross-promo-flash-'+c+'"></div>');
                        var d={
                            wmode:"transparent"
                        };

                        var a="140";
                        if(currentPromo.height){
                            a=currentPromo.height
                            }
                            swfobject.embedSWF(currentPromo.flash,"cross-promo-flash-"+c,"340",a,"9.0.115",false,false,d)
                        }catch(b){}
                }else{
                if(currentPromo.isExternalUrl){
                    titleString='<h4><a target="_blank" href="'+currentPromo.link+'">'+currentPromo.title+"</a>"
                    }else{
                    titleString='<h4><a href="'+currentPromo.link+'">'+currentPromo.title+"</a>"
                    }
                    if(currentPromo.date){
                    titleString+=' <span class="date">'+currentPromo.date+"</span>"
                    }
                    titleString+="</h4>";
                $(this).html(titleString);
                if(currentPromo.isExternalUrl){
                    $(this).append('<a target="_blank" href="'+currentPromo.link+'"><img src="'+currentPromo.img+'" width="340" alt="'+currentPromo.title+'" title="'+currentPromo.title+'" /></a>')
                    }else{
                    $(this).append('<a href="'+currentPromo.link+'"><img src="'+currentPromo.img+'" width="340" alt="'+currentPromo.title+'" title="'+currentPromo.title+'" /></a>')
                    }
                }
        }else{
        $(this).remove()
        }
    })
}
};

var EventMap={
    init:function(){
        EventMap.map=new GMap2(document.getElementById("map"));
        EventMap.map.addControl(new GSmallZoomControl3D());
        EventMap.map.clearOverlays();
        EventMap.map.setCenter(new GLatLng(40.624722,-73.952222),2);
        EventMap.plot()
        },
    plot:function(){
        if(EventMap.map===undefined){
            return
        }
        if(EventMap.manager!==undefined){
            EventMap.manager.clearMarkers();
            EventMap.manager.refresh()
            }
            EventMap.map.clearOverlays();
        EventMap.events=$(".event");
        EventMap.markers=[];
        EventMap.eventData=[];
        EventMap.events.each(function(e){
            var a=new GLatLng(EventMap.events.eq(e).find("span.latitude").text(),EventMap.events.eq(e).find("span.longitude").text());
            if(EventMap.events.eq(e).find("a.event-thumb").length){
                var c=EventMap.events.eq(e).find("a.event-thumb")
                }else{
                var c=EventMap.events.eq(e).find("a.featured")
                }
                var f="<h3>"+EventMap.events.eq(e).find("h3").html()+"</h3><a class='thumb' href='"+c.attr("href")+"'>"+c.html()+"</a><p>"+EventMap.events.eq(e).find("dd.date").html()+"</p><p>"+EventMap.events.eq(e).find("dd.location").html()+"</p><p><a href='"+EventMap.events.eq(e).find("a.icon-link").attr("href")+"' class='icon-link'>"+EventMap.events.eq(e).find("a.icon-link").html()+"</a></p>";
            EventMap.eventData.push(f);
            var d="";
            if(this.className.indexOf("past")>=0){
                var b=new GIcon(G_DEFAULT_ICON);
                b.image=RBConfig.blue_marker;
                d={
                    icon:b
                }
            }
            EventMap.markers.push(new GMarker(a,d))
            });
    EventMap.manager="";
    EventMap.manager=new MarkerManager(EventMap.map);
    EventMap.manager.clearMarkers();
    EventMap.manager.addMarkers(EventMap.markers,1);
    EventMap.manager.refresh();
    EventMap.mapSpace=new GLatLngBounds;
    for(i=0;i<EventMap.markers.length;i++){
        EventMap.mapSpace.extend(EventMap.markers[i].getLatLng());
        GEvent.addListener(EventMap.markers[i],"click",function(){
            this.openInfoWindow("<div class='balloon' style='width: 260px; height: 110px; overflow:hidden;'>"+EventMap.eventData[jQuery.inArray(this,EventMap.markers)]+"</div>")
            })
        }
        EventMap.newZoom=EventMap.map.getBoundsZoomLevel(EventMap.mapSpace);
    if(EventMap.newZoom>14){
        EventMap.newZoom=5
        }
        if(EventMap.newZoom<1){
        EventMap.newZoom=1
        }
        EventMap.newCenter=EventMap.mapSpace.getCenter();
    EventMap.map.setZoom(EventMap.newZoom);
    EventMap.map.setCenter(EventMap.newCenter)
    }
};

function usFormCategoryChange(){
    var a=$('#contact-form .usCategorySelect').find("option:selected").text();
    if(a=="General"){
        $("#contact-form").find(".field:not(.generalCat, .usCategorySelectCont, .submit, #recaptcha_widget)").hide();
        $("#contact-form").find(".field.generalCat").show();
        $("#contact-telephone").addClass("notRequired").prev().find("span").remove();
        $(".input_RecordType").attr("value","General")
        }else{
        if(a=="Event Support Requests"){
            $("#contact-form").find(".field:not(.generalCat, .usCategorySelectCont, .submit, #recaptcha_widget)").hide();
            $("#contact-form").find(".field.generalCat").show();
            $("#contact-telephone").addClass("notRequired").prev().find("span").remove();
            $(".input_RecordType").attr("value","Event")
            }else{
            if(a=="Athlete Support Requests"){
                $("#contact-form").find(".field:not(.generalCat, .usCategorySelectCont, .submit, #recaptcha_widget)").hide();
                $("#contact-form").find(".field.generalCat").show();
                $("#contact-telephone").addClass("notRequired").prev().find("span").remove();
                $(".input_RecordType").attr("value","Sponsorship")
                }else{
                if(a=="Sales Requests"){
                    $("#contact-form").find(".field:not(.salesCat, .usCategorySelectCont, .submit, #recaptcha_widget)").hide();
                    $("#contact-form").find(".field.salesCat").show();
                    $("#contact-telephone").addClass("notRequired").prev().find("span").remove();
                    $(".input_RecordType").attr("value","Sales")
                    }else{
                    if(a=="Media Inquiries"){
                        $("#contact-form").find(".field:not(.mediaCat, .usCategorySelectCont, .submit, #recaptcha_widget)").hide();
                        $("#contact-form").find(".field.mediaCat").show();
                        $("#contact-telephone").removeClass("notRequired").prev().replaceWith('<label for="contact-telephone">Phone<span class="required">*</span> :</label>');
                        $(".input_RecordType").attr("value","Media")
                        }else{
                        if(a=="Employment"){
                            window.location="https://redbull.taleo.net/careersection/jobboard_us/jobsearch.ftl?lang=en"
                            }
                        }
                }
        }
}
}
}
function setMax_Length(){
    var a=parseInt($(this).attr("maxlength"));
    if($(this).val().length>a){
        $(this).val($(this).val().substring(0,a));
        alert(translate("commentbodylimit"))
        }
    }
function firstFloatFix(){
    firstItems=$("#subcategory-photos .subcategory-item.first,#subcategory-videos .subcategory-item.first,#subcategory-events #other-events .event.first,#subcategory-games .game.first,#subcategory-participants #other-participants .profile.first,#subcategory-tables #featured-tables .table.first,.profile-content .profile-item.first");
    firstItems.each(function(){
        $(this).before('<br class="clear"/>')
        })
    }
    var mosaic_Create={
    init:function(){
        _this=mosaic_Create;
        _this.mosaic_Cont=$($("#mosaic_Cont"));
        _this.mosaicImg=_this.mosaic_Cont.find("img#mosaicImg");
        _this.mosaicImg_H=341;
        _this.mosaicImg_W=335;
        _this.Cols=11;
        _this.Rows=Math.floor(_this.mosaicImg_H/31);
        _this.mapAreaCount=_this.Cols*_this.Rows;
        _this.setup_ImageMap()
        },
    setup_ImageMap:function(){
        _this.mapAreaTagArr=_this.mosaic_Cont.find("map .mosaicMapArea");
        _this.changeLinkURLs();
        _this.getJSON();
        _this.mosaic_Cont.find("map .mosaicMapArea").bind("mouseenter",_this.createPopup);
        _this.mosaic_Cont.find("map .mosaicMapArea").bind("mouseout",_this.hidePopup);
        $(".grayBox_Cont .grayBox").bind("mouseover",_this.handleGrayBox)
        },
    getJSON:function(){
        _this.AssetDataArr=redBull_Mosaic_JSON_Arr;
        _this.setupMosaicOverlay()
        },
    setupMosaicOverlay:function(){
        _this.mosaic_Cont.append('<div class="popup"></div>');
        _this.popup_Cont=$($(".popup")[0]);
        _this.mosaic_Cont.find(".popup, .popup").live("mouseover",function(){
            clearTimeout(_this.setTime);
            $(".grayBox_Cont .grayBox").eq(_this.mapAreaTagArr.index(_this.currentThumb)).fadeTo(0,0).hide();
            $(this).css("display","block")
            });
        _this.mosaic_Cont.find(".popup").bind("mouseout",_this.hidePopup);
        _this.popup_Cont.append('<a href="#">								<img title="" alt="" src="/cs/RedBull/images/common/loader.gif" class="image" />								<img style="display: none;" title="" alt="" src="" class="image thumb" />								<span class="icon-link">Read Article</span>							</a>							<div class="text">								<h4></h4>								<p></p>								<span class="comments-views">0 Comment</span>							</div>							<div class="arrow"></div>')
        },
    showPopup:function(a){
        _this.popup_Cont.css({
            display:"block"
        })
        },
    hidePopup:function(a){
        var b=(a.type=="mouseover"?a.fromElement:a.toElement)||a.relatedTarget;
        while(b&&b!=this){
            try{
                b=b.parentNode
                }catch(a){
                b=this
                }
            }
        if(b==this){
        return false
        }
        $(".grayBox_Cont .grayBox").not($(this)).fadeTo(0,0.5).show();
    _this.setTime=setTimeout(function(){
        _this.popup_Cont.css({
            display:"none"
        })
        },50)
    },
createPopup:function(a){
    clearTimeout(_this.setTime);
    _this.currentThumb=$(this);
    var c=_this.mapAreaTagArr.index(_this.currentThumb);
    if(c!=_this.AssetDataArr[c].currentThumbNum){
        _this.popup_Cont.find("a span").text(translate(_this.AssetDataArr[c].linkText));
        _this.popup_Cont.find("a span").removeClass().addClass("icon-link icon-link-"+_this.AssetDataArr[c].assetType);
        _this.popup_Cont.find("h4").text(_this.AssetDataArr[c].assetTitle);
        _this.popup_Cont.find("p").text(_this.AssetDataArr[c].assetDesc);
        if(_this.AssetDataArr[c].comment==""){
            _this.popup_Cont.find(".comments-views").css("display","none")
            }else{
            _this.popup_Cont.find(".comments-views").text(_this.AssetDataArr[c].comment.replace("comments",translate("comments")));
            _this.popup_Cont.find(".comments-views").css("display","block")
            }
            $(_this.popup_Cont.find("a")[0]).attr("href",_this.currentThumb.attr("href"));
        _this.positionAndShowPopup(a);
        _this.popup_Cont.find("a img.image").show();
        _this.popup_Cont.find("a img.thumb").hide();
        var b=_this.popup_Cont.find("a img.thumb")[0];
        _this.popup_Cont.find("a img.thumb").attr("alt",_this.AssetDataArr[c].thumbAltText);
        _this.popup_Cont.find("a img.thumb").attr("src",_this.utf8_decode(unescape(_this.AssetDataArr[c].assetURL)));
        if(b.complete){
            _this.checkImg()
            }else{
            _this.imgLoad=setInterval(_this.checkImg,500)
            }
        }
},
utf8_decode:function(a){
    var b="";
    var d=0;
    var e=c1=c2=0;
    while(d<a.length){
        e=a.charCodeAt(d);
        if(e<128){
            b+=String.fromCharCode(e);
            d++
        }else{
            if((e>191)&&(e<224)){
                c2=a.charCodeAt(d+1);
                b+=String.fromCharCode(((e&31)<<6)|(c2&63));
                d+=2
                }else{
                c2=a.charCodeAt(d+1);
                c3=a.charCodeAt(d+2);
                b+=String.fromCharCode(((e&15)<<12)|((c2&63)<<6)|(c3&63));
                d+=3
                }
            }
    }
return b
},
positionAndShowPopup:function(c,a){
    var e=(parseInt(_this.mouseX(c)-16));
    if((e+_this.popup_Cont.width())>$("body").width()-_this.windowOffsetX()-8){
        e=$("body").width()-_this.windowOffsetX()-_this.popup_Cont.width()-8
        }
        _this.popup_Cont.css({
        left:e+"px",
        top:(_this.currentThumbTop-_this.popup_Cont.outerHeight())+"px"
        });
    _this.showPopup();
    var d=_this.popup_Cont.find(".arrow");
    var b=(_this.mouseX(c)-e);
    b=b-8;
    if(b>(_this.popup_Cont.width()-d.width())){
        b=_this.popup_Cont.width()-d.width()
        }
        d.attr("style","left:"+b+"px;")
    },
handleGrayBox:function(){
    _this.currentThumbTop=$(this).offset().top;
    $(".grayBox_Cont .grayBox").not($(this)).fadeTo(0,0.5).show();
    $(this).fadeTo(0,0).hide()
    },
checkImg:function(){
    var a=_this.popup_Cont.find("a img.thumb")[0];
    if(a.complete){
        _this.imgLoad=clearInterval(_this.imgLoad);
        _this.popup_Cont.find("a img.image").hide();
        _this.popup_Cont.find("a img.thumb").show()
        }
    },
mouseX:function(a){
    if(!a){
        a=window.event
        }
        if(a.pageX){
        return a.pageX
        }else{
        if(a.clientX){
            return a.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft)
            }else{
            return 0
            }
        }
},
windowOffsetX:function(){
    var a=($(document.body).width()-$("div#content").width())/2;
    return(a<0)?0:a
    },
changeLinkURLs:function(){
    _this.mapAreaTagArr.each(function(a){
        var b=$(this).attr("href");
        if(b[b.length-1]!="&"&&b[b.length-1]!="?"){
            if(b.indexOf("?")==-1){
                b+="?"
                }else{
                b+="&"
                }
            }
        b+="refmod=Mosaic&refmodpos="+(a+1);
        $(this).attr("href",b)
        })
}
};

$(document).ready(function(){
    if($("#feed-content").length>0){
        Feed.init()
        }
    });
var Feed={
    jsonURI:"offset={offset}",
    moreBtn:null,
    offset:{},
    init:function(){
        $("#feed-content .more").show();
        $("#feed-content .more a").each(function(a){
            $(this).click(Feed.showMore)
            })
        },
    showMore:function(j,a){
        if($(this).parent().hasClass("more")){
            var f=$(this).parent().parent()
            }else{
            var f=$("#"+a)
            }
            f.find("p.displayNone").before('<div class="preloader"></div>');
        var g=f.attr("rel");
        var h=g;
        if(h[h.length-1]!="&"&&h[h.length-1]!="?"){
            if(h.indexOf("?")==-1){
                h+="?"
                }else{
                h+="&"
                }
            }
        if(typeof(Feed.offset[f.attr("rel")])=="undefined"){
        if(h.indexOf("maxRows")!=-1){
            var d=h.substring(h.indexOf("maxRows"));
            var c=d.split("=")[1];
            var b=c.split("&")[0];
            if(($(this).parent().hasClass("more")&&$(this).parents("#related-content-all").length>0)||($(this).parent().hasClass("more")&&$(this).parents("#related-content-events-past").length>0)){
                Feed.offset[f.attr("rel")]=parseInt(b)+1
                }else{
                Feed.offset[f.attr("rel")]=1
                }
            }else{
        Feed.offset[f.attr("rel")]=11
        }
    }
h+=Feed.jsonURI.replace("{offset}",Feed.offset[f.attr("rel")]);
$.get(h,null,function(k,e){
    Feed.onLoad(g,k,f)
    },"json");
return false
},
onLoad:function(d,e,c){
    var b=Feed.getType(c.get(0).id);
    Feed.offset[d]=Feed.offset[d]+e.length;
    for(var a=0;a<e.length;a++){
        if(typeof(e[a]["isLast"])!="undefined"&&e[a]["isLast"]==true){
            c.find("p.more").hide();
            break
        }
        switch(e[a]["type"]){
            case"article":
                c.find("p.displayNone").before(Feed.createArticle(e[a]));
                break;
            case"video":
                c.find("p.displayNone").before(Feed.createVideo(e[a]));
                break;
            case"photo":
                c.find("p.displayNone").before(Feed.createPhoto(e[a]));
                break;
            case"event":
                c.find("p.displayNone").before(Feed.createEvent(e[a]));
                break;
            case"audio":
                c.find("p.displayNone").before(Feed.createAudio(e[a]));
                break
                }
                c.find("div.preloader").remove();
        if(Feed.offset[c.attr("rel")]<=11&&c.find("h4").length<2){
            c.find("div").eq(0).addClass("first")
            }
        }
    },
createVideo:function(b){
    var a='<div class="related-video">			<h4 class="clearfix" ><a href="'+b.url+'">'+b.title+'</a> <span class="date">'+b.date+"</span>";
    if(b.comments){
        a=a.concat('<span class="comments-views">'+b.comments+"</span>")
        }
        a=a.concat('</h4>			<a class="photo" href="'+b.url+'"><img alt="" src="'+b.image_url+'"/></a>			<div class="description">				<p>'+b.snippet+'</p>				<a href="'+b.url+'" class="icon-link">'+b.label+"</a>			</div>		</div>");
    return a
    },
createEvent:function(a){
    return'    	<div class="related-event">			<h4 class="clearfix" ><a href="'+a.url+'">'+a.title+'</a> <span class="date">'+a.date+'</span></h4>			<a href="'+a.url+'" class="photo"><img src="'+a.image_url+'" alt="" /></a>			<div class="description">				<p>'+a.snippet+'</p>				<a href="'+a.url+'" class="icon-link">'+a.label+"</a>			</div>		</div>		"
    },
createPhoto:function(c){
    var a='<div class="related-gallery">			<h4 class="clearfix"><a href="'+c.url+'">'+c.title+'</a> <span class="date">'+c.date+"</span>";
    if(c.comments){
        a=a.concat('<span class="comments-views">'+c.comments+"</span>")
        }
        a=a.concat("</h4>");
    a=a.concat('<ul class="gallery-thumbs">');
    for(var b=0;b<c.featured_images.length;b++){
        if(c.featured_images[b]){
            a=a.concat('<li class="big"><a href="'+c.featured_images[b].url+'"><img src="'+c.featured_images[b].image+'" alt="" /></a></li>')
            }
        }
    for(var b=0;b<c.thumbnails.length;b++){
    if(c.thumbnails[b]){
        a=a.concat('<li><a href="'+c.thumbnails[b].url+'"><img src="'+c.thumbnails[b].image+'" alt="" /></a></li>')
        }
    }
a=a.concat('</ul>			<a href="'+c.url+'" class="icon-link">'+c.label+"</a>				</div>");
return a
},
createArticle:function(b){
    var a='<div class="related-article">			<h4 class="clearfix" >				<a href="'+b.url+'">'+b.title+'</a> <span class="date">'+b.date+"</span>";
    if(b.comments){
        a=a.concat('<span class="comments-views">'+b.comments+"</span>")
        }
        a=a.concat("</h4>");
    if(b.image_url&&b.image_url!=""){
        a=a.concat('<a class="photo" href="'+b.url+'"><img alt="" src="'+b.image_url+'"/></a>')
        }
        if(b.author&&b.author!=""){
        a=a.concat("<h5>"+translate("by")+" "+b.author+"</h5>")
        }
        a=a.concat("<p>"+b.snippet+'</p>			<a href="'+b.url+'" class="icon-link">'+b.label+"</a>				</div>");
    return a
    },
createAudio:function(b){
    var a='<div class="related-recording">			<h4 class="clearfix" >				<a href="'+b.url+'">'+b.title+'</a> <span class="date">'+b.date+"</span>";
    if(b.comments){
        a=a.concat('<span class="comments-views">'+b.comments+"</span>")
        }
        a=a.concat("</h4>");
    if(b.image_url&&b.image_url!=""){
        a=a.concat('<a class="photo" href="'+b.url+'"><img alt="" src="'+b.image_url+'"/></a>')
        }
        a=a.concat("<p>"+b.snippet+'</p>			<span class="links clearfix"><a class="icon-link" href="'+b.url+'">'+b.label+"</a>");
    if(b.profiles&&b.profile!=""){
        a=a.concat('<span class="artist">'+b.profile_lable+":"+b.profiles+"</span>")
        }
        a=a.concat("</span></div>");
    return a
    },
getType:function(a){
    return a.replace("related-content-","")
    }
};

var VideoPlayer={
    options:{
        width:"620",
        height:"349",
        player_swf:RBConfig.video_player_swf,
        data_url:null,
        insert_id:"video-player",
        quality:"",
        stream:"",
        install_swf:RBConfig.install_player_swf,
        hide_bull:null,
        autoplay:0
    },
    init:function(standardPlayer,options,allowResize){
        if(eval(RBConfig.site_Name)!=-1){
            VideoPlayer.options.hide_bull=true
            }
            for(attr in VideoPlayer.options){
            if(typeof(options[attr])!="undefined"&&options[attr]!=null){
                VideoPlayer.options[attr]=options[attr]
                }
            }
        if(!standardPlayer){
        VideoPlayer.setupWidePlayer();
        VideoPlayer.options.width="960";
        VideoPlayer.options.height="540"
        }else{
        VideoPlayer.options.quality="low"
        }
        VideoPlayer.setupColors();
    VideoPlayer.loadPlayer();
    if(allowResize){
        VideoPlayer.addToggleLink(standardPlayer)
        }
        return true
    },
RGBtoHex:function(b){
    function a(d){
        if(d==null){
            return"00"
            }
            d=parseInt(d);
        if(d==0||isNaN(d)){
            return"00"
            }
            d=Math.max(0,d);
        d=Math.min(d,255);
        d=Math.round(d);
        return"0123456789ABCDEF".charAt((d-d%16)/16)+"0123456789ABCDEF".charAt(d%16)
        }
        if(b.indexOf("#")==0){
        return"0x"+b.substring(1)
        }else{
        var c=b.substring(4,b.length-1).split(/\s*,\s*/);
        return"0x"+a(c[0])+a(c[1])+a(c[2])
        }
    },
setupColors:function(){
    $("#"+VideoPlayer.options.insert_id).append('<div class="video-player-primary-up"></div>');
    $("#"+VideoPlayer.options.insert_id).append('<div class="video-player-primary-over"></div>');
    $("#"+VideoPlayer.options.insert_id).append('<div class="video-player-primary-down"></div>');
    $("#"+VideoPlayer.options.insert_id).append('<div class="video-player-secondary-up"></div>');
    $("#"+VideoPlayer.options.insert_id).append('<div class="video-player-secondary-over"></div>');
    $("#"+VideoPlayer.options.insert_id).append('<div class="video-player-secondary-down"></div>');
    VideoPlayer.options.primary_up_color=VideoPlayer.RGBtoHex($(".video-player-primary-up").css("color"));
    VideoPlayer.options.primary_over_color=VideoPlayer.RGBtoHex($(".video-player-primary-over").css("color"));
    VideoPlayer.options.primary_down_color=VideoPlayer.RGBtoHex($(".video-player-primary-down").css("color"));
    VideoPlayer.options.secondary_up_color=VideoPlayer.RGBtoHex($(".video-player-secondary-up").css("color"));
    VideoPlayer.options.secondary_over_color=VideoPlayer.RGBtoHex($(".video-player-secondary-over").css("color"));
    VideoPlayer.options.secondary_down_color=VideoPlayer.RGBtoHex($(".video-player-secondary-down").css("color"))
    },
setupWidePlayer:function(){
    var a=$('<div id="featured-content"></div>').append($("#main-content #category-navigation")).append($("#main-content h2").clone()).append($("#main-content #video-player"));
    $("#main-content").before(a);
    $("#main-content h2").remove();
    $("#main-content #video-player").remove();
    return true
    },
addToggleLink:function(a){
    if(a){
        var b=$.query.SET("quality","hq");
        $("#"+VideoPlayer.options.insert_id).after($('<br /><a href="'+b+'" class="video-quality">'+translate("Watch in high quality")+"</a>"))
        }else{
        var b=$.query.SET("quality","standard");
        $("#"+VideoPlayer.options.insert_id).after($('<br /><a href="'+b+'" class="video-quality">'+translate("Watch in standard quality")+"</a>"))
        }
        return true
    },
loadPlayer:function(){
    VideoPlayer.options.data_url=escape(VideoPlayer.options.data_url);
    var b={
        data_url:VideoPlayer.options.data_url,
        buffer_size:1,
        primary_up_color:VideoPlayer.options.primary_up_color,
        primary_over_color:VideoPlayer.options.primary_over_color,
        primary_down_color:VideoPlayer.options.primary_down_color,
        secondary_up_color:VideoPlayer.options.secondary_up_color,
        secondary_over_color:VideoPlayer.options.secondary_over_color,
        secondary_down_color:VideoPlayer.options.secondary_down_color,
        quality:VideoPlayer.options.quality,
        stream:VideoPlayer.options.stream,
        on_redbull:"yup",
        hide_bull:VideoPlayer.options.hide_bull,
        autoplay:VideoPlayer.options.autoplay
        };

    var d={
        width:VideoPlayer.options.width,
        height:VideoPlayer.options.height,
        quality:"high",
        pluginspage:"http://www.macromedia.com/go/getflashplayer",
        align:"middle",
        play:"true",
        loop:"true",
        scale:"noscale",
        wmode:"window",
        devicefont:"false",
        bgcolor:"#000000",
        menu:"true",
        allowScriptAccess:"sameDomain",
        allowFullScreen:"true",
        wmode:"transparent"
    };

    var c={
        id:"RBPlayer"
    };

    try{
        swfobject.embedSWF(VideoPlayer.options.player_swf+"?data_url="+VideoPlayer.options.data_url,VideoPlayer.options.insert_id,VideoPlayer.options.width,VideoPlayer.options.height,"9.0.115",VideoPlayer.options.install_swf,b,d,c)
        }catch(a){}
    return true
    }
};

$(document).ready(function(){
    if($("#image").length>0){
        Gallery.init();
        if($("#image-navigation-container").length>0){
            $("#image-navigation").css("height",$(this).find(".gallery-navigation").height()+$(this).find("h3").outerHeight()+12+$(this).find(".gallery-control").outerHeight())
            }else{
            $("#image-navigation").css("height",$(this).find(".gallery-navigation").height()+$(this).find("h3").outerHeight()+12)
            }
        }
});
var imageid="";
var title="";
var Gallery={
    transparentImg:RBConfig.transparent_img,
    currentImgIdx:null,
    currentImgData:null,
    images:null,
    isFullscreen:false,
    loading:false,
    loadingImg:null,
    init:function(){
        Gallery.images=[];
        var d=parent.frames;
        var c=true;
        try{
            if(d.length>0){
                for(i=0;i<=d.length-1;i++){
                    if(d[i].name=="Work"){
                        c=false
                        }
                    }
                }
        }catch(err){}
if(c){
    var b=$("#image #main-content img.main-image").get(0).src=Gallery.transparentImg
    }else{
    var b=$("#image #main-content img.main-image").get(0)
    }
    var a=$("#image-navigation .gallery-navigation li a");
a.each(function(e){
    var f=this.id.replace("image-link-","");
    Gallery.images[Gallery.images.length]=f
    });
$("#image-navigation .gallery-navigation li").each(function(e){
    $(this).click(function(){
        Gallery.setAddress(e);
        return false
        })
    });
Gallery.thumbnailNav.setup();
$(document).keyup(Gallery.onKeyEvent);
if(Gallery.currentImg==null){
    Gallery.currentImgIdx=0
    }
    Gallery.fullscreen.setup();
SWFAddress.addEventListener(SWFAddressEvent.CHANGE,Gallery.onAddressChange)
},
onAddressChange:function(b){
    var a=0;
    if(b.path.indexOf("/image-")>-1){
        a=parseInt(b.path.replace("/image-",""),10)-1
        }
        Gallery.loadImageData(a)
    },
onKeyEvent:function(a){
    var a=a||window.event;
    var b=a.target||a.srcElement;
    if(b.nodeName.toLowerCase()!="input"&&b.nodeName.toLowerCase()!="textarea"){
        switch(a.keyCode){
            case 37:
                Gallery.prev();
                break;
            case 39:
                Gallery.next();
                break;
            case 27:
                if(Gallery.isFullscreen){
                Gallery.fullscreen.hide()
                }
                break
            }
            }
},
setAddress:function(a){
    if(a<0||a>=Gallery.images.length||Gallery.loading){
        return
    }
    SWFAddress.setValue("/image-"+(a+1))
    },
prev:function(){
    if(Gallery.currentImgIdx-1<0){
        return false
        }
        Gallery.setAddress(Gallery.currentImgIdx-1);
    return false
    },
next:function(){
    if(Gallery.currentImgIdx+1>=Gallery.images.length){
        return false
        }
        Gallery.setAddress(Gallery.currentImgIdx+1);
    return false
    },
loadImageData:function(a){
    if(Gallery.loading||typeof(Gallery.images[a])=="undefined"||Gallery.images[a]==null){
        return
    }
    Gallery.loading=true;
    Gallery.currentImgIdx=a;
    var b=$("#image #main-content img.main-image").get(0);
    $(b).height(343);
    $(b).width(610);
    Gallery.clearImgEvents();
    b.src=Gallery.transparentImg;
    var c=$("#image-link-"+Gallery.images[a]).attr("rel");
    if(Gallery.isFullscreen){
        Gallery.fullscreen.updateControls()
        }
        $.getJSON(c,Gallery.populateContent)
    },
populateContent:function(d){
    Gallery.currentImgData=d;
    Gallery.thumbnailNav.setActiveThumb(Gallery.currentImgIdx);
    var b=$("#breadcrumbs li");
    $(b.get(b.size()-1)).html(d.title);
    $("#image #main-content h2 span").html(d.title);
    Gallery.loadingImg=new Image();
    Gallery.loadingImg.onerror=Gallery.imageLoadError;
    Gallery.loadingImg.onload=Gallery.imageLoaded;
    Gallery.loadingImg.src=d.path_main;
    Gallery.loadingImg.alt = d.alt_text;
    Gallery.loadingImg.title = d.title_text;
    $("#image-information dd.views").text(d.view_count);
    if(d.date){
        $("#image-information dd.date").html(d.date);
        $("#image-information dd.date, #image-information dt.date").removeClass("displayNone")
        }else{
        if(!$("#image-information dd.date").hasClass("displayNone")){
            $("#image-information dd.date, #image-information dt.date").addClass("displayNone")
            }
        }
    if(d.creator){
    $("#image-information dd.photographer").html(d.creator);
    $("#image-information dd.photographer, #image-information dt.photographer").removeClass("displayNone")
    }else{
    if(!$("#image-information dd.photographer").hasClass("displayNone")){
        $("#image-information dd.photographer, #image-information dt.photographer").addClass("displayNone")
        }
    }
if(d.copyright){
    $("#image-information dd.copyright").html(d.copyright);
    $("#image-information dd.copyright, #image-information dt.copyright").removeClass("displayNone")
    }else{
    if(!$("#image-information dd.copyright").hasClass("displayNone")){
        $("#image-information dd.copyright, #image-information dt.copyright").addClass("displayNone")
        }
    }
if(d.profiles_array){
    $("#image-information dd.profiles").html(d.profiles_array);
    $("#image-information dd.profiles, #image-information dt.profiles").removeClass("displayNone")
    }else{
    if(!$("#image-information dd.profiles").hasClass("displayNone")){
        $("#image-information dd.profiles, #image-information dt.profiles").addClass("displayNone")
        }
    }
if(d.events_array && d.events_array!="null" /*WCMSSUP-7630*/){
    $("#image-information dd.event").html(d.events_array);
    $("#image-information dd.event, #image-information dt.event").removeClass("displayNone")
    }else{
    if(!$("#image-information dd.event").hasClass("displayNone")){
        $("#image-information dd.event, #image-information dt.event").addClass("displayNone")
        }
    }
if(d.about_image){
    $("#image-information dd.about").html(d.about_image);
    $("#image-information dd.about, #image-information dt.about").removeClass("displayNone")
    }else{
    if(!$("#image-information dd.about").hasClass("displayNone")){
        $("#image-information dd.about, #image-information dt.about").addClass("displayNone")
        }
    }
$("#actions-module .downloads a#download-1024")[0].href=d.path_1024;
$("#actions-module .downloads a#download-1280")[0].href=d.path_1280;
$("#actions-module .downloads a#download-1600")[0].href=d.path_1600;
$("#actions-module #permalink-code").get(0).value=d.permalink;
$("#comment-form").find("#imageId").attr("value",d.imageId);
var a=window.location.href.split("#/image-");
if(a.length>1){
    var c=a[a.length-1]
    }else{
    var c=1
    }
    $("#comment-form").find("#imagepositionno").attr("value",c);
var e=$("#comment-list");
if(e.length>0){
    e.text("");
    commentsObj.doUpdateComment_Req()
    }
    imageid=d.imageId;
title=d.title;
if(Gallery.isFullscreen){
    Gallery.fullscreen.showImage()
    }
    if(e.length>0){
    Gallery.attachAbuseComments(e)
    }
},
imageLoadError:function(){
    Gallery.loading=false
    },
imageLoaded:function(b){
    var a=$("#image #main-content img.main-image").get(0);
    a.src=Gallery.currentImgData.path_main;
    $(a).height(Gallery.loadingImg.height);
    $(a).width(Gallery.loadingImg.width);
    $(a).attr('alt', Gallery.loadingImg.alt);
    $(a).attr('title',Gallery.loadingImg.title);
    Gallery.setupImgEvents();
    Gallery.loading=false;
    },
setupImgEvents:function(){
    $("#image #main-content img.main-image").css("cursor","pointer");
    $("#image #main-content img.main-image").click(Gallery.fullscreen.show);
    $("#image .main-image").hover(Gallery.fullscreen.showIndicator,Gallery.fullscreen.hideIndicator)
    },
clearImgEvents:function(){
    $("#image #main-content img.main-image").css("cursor","default");
    $("#image #main-content img.main-image").unbind("click",Gallery.fullscreen.show);
    Gallery.fullscreen.hideIndicator();
    $("#image #main-content img.main-image").unbind("mouseover",Gallery.fullscreen.showIndicator);
    $("#image #main-content img.main-image").unbind("mouseout",Gallery.fullscreen.hideIndicator)
    },
thumbnailNav:{
    maxItems:(navigator.userAgent.match(/MSIE/)) ? 15 : 12,
    nextEl:null,
    prevEl:null,
    sliderEl:null,
    currentFrame:0,
    frames:[],
    setup:function(){
        var g=$("#image-navigation .gallery-navigation li");
        if(g.size()<=Gallery.thumbnailNav.maxItems){
            return
        }
        var e=Math.ceil(g.size()/Gallery.thumbnailNav.maxItems);
        for(var d=1;d<e;d++){
            $("#image-navigation").append('<ul class="gallery-navigation"></ul>');
            var f=$("#image-navigation .gallery-navigation").get(d);
            while(f.childNodes.length<Gallery.thumbnailNav.maxItems&&$("#image-navigation .gallery-navigation:first li").size()>Gallery.thumbnailNav.maxItems){
                $(f).append($("#image-navigation .gallery-navigation:first li").get(Gallery.thumbnailNav.maxItems))
                }
            }
        Gallery.thumbnailNav.frames=$("#image-navigation .gallery-navigation");
    $("#image-navigation").append('<div id="image-navigation-container"><div class="slider"></div></div>');
    var a=$("#image-navigation #image-navigation-container");
    Gallery.thumbnailNav.sliderEl=$("#image-navigation #image-navigation-container .slider");
    var c=(Gallery.thumbnailNav.frames.find("li").outerHeight(true)*3);
    var b=Gallery.thumbnailNav.frames.width()-parseInt(Gallery.thumbnailNav.frames.find("li").css("margin-right").replace("px",""),10);
    a.css({
        "float":"left",
        position:"relative",
        overflow:"hidden",
        height:c,
        width:b
    });
    Gallery.thumbnailNav.sliderEl.css({
        position:"absolute",
        left:0,
        top:0,
        width:(Gallery.thumbnailNav.frames.outerWidth(true)*Gallery.thumbnailNav.frames.size())
        });
    Gallery.thumbnailNav.frames.css({
        "float":"left"
    });
    Gallery.thumbnailNav.frames.each(function(){
        Gallery.thumbnailNav.sliderEl.append(this)
        });
    if($("#input_rtl_site:hidden").length>0){
        $("#image-navigation").append('<ul class="gallery-control"><li class="previous"></li><li class="next"></li></ul>')
        }else{
        $("#image-navigation").append('<ul class="gallery-control"><li class="next"></li><li class="previous"></li></ul>')
        }
        Gallery.thumbnailNav.prevEl=$("#image-navigation .gallery-control .previous");
    Gallery.thumbnailNav.nextEl=$("#image-navigation .gallery-control .next");
    Gallery.thumbnailNav.prevEl.click(Gallery.thumbnailNav.prev);
    Gallery.thumbnailNav.nextEl.click(Gallery.thumbnailNav.next);
    Gallery.thumbnailNav.changeFrame(0)
    },
prev:function(){
    Gallery.thumbnailNav.changeFrame(Gallery.thumbnailNav.currentFrame-1);
    return false
    },
next:function(){
    Gallery.thumbnailNav.changeFrame(Gallery.thumbnailNav.currentFrame+1);
    return false
    },
changeFrame:function(b){
    if(b>=Gallery.thumbnailNav.frames.length||b<0){
        return
    }
    Gallery.thumbnailNav.currentFrame=b;
    var a=$(Gallery.thumbnailNav.frames.get(b)).position()["left"];
    Gallery.thumbnailNav.sliderEl.animate({
        left:(0-a)
        });
    if(b==(Gallery.thumbnailNav.frames.size()-1)){
        Gallery.thumbnailNav.nextEl.html('<span class="disabled">'+translate("next")+"</span>")
        }else{
        Gallery.thumbnailNav.nextEl.html('<a href="#">'+translate("next")+"</a>")
        }
        if(b==0){
        Gallery.thumbnailNav.prevEl.html('<span class="disabled">'+translate("previous")+"</span>")
        }else{
        Gallery.thumbnailNav.prevEl.html('<a href="#">'+translate("previous")+"</a>")
        }
    },
setActiveThumb:function(a){
    $("#image-navigation h3 span").text(translate("Image")+" "+(Gallery.currentImgIdx+1)+" "+translate("of")+" "+Gallery.images.length);
    var b=$("#image-navigation .gallery-navigation li");
    b.removeClass("on");
    $(b.get(a)).addClass("on");
    Gallery.thumbnailNav.changeFrame(Math.ceil(a/(Gallery.thumbnailNav.maxItems-1))-1)
    }
},
fullscreen:{
    lightBoxSel:"#lightbox",
    indicator:null,
    nextImg:null,
    setup:function(){
        if($("#input_rtl_site:hidden").length>0){
            var a='<li class="next"><a href="#">'+translate("next")+'</a></li><li class="previous"><a href="#">'+translate("previous")+"</a></li>"
            }else{
            var a='<li class="previous"><a href="#">'+translate("previous")+'</a></li><li class="next"><a href="#">'+translate("next")+"</a></li>"
            }
            $(document.body).append('        <div id="overlay"></div>        <div id="lightbox">          <div class="fullscreen-content">            <div class="lightbox-image-controls">				<div class="lightbox-image-nav-cont"><ul class="lightbox-image-nav">'+a+'</ul></div>				<a class="close" onclick="Gallery.fullscreen.hide(); return false;" href="#">'+translate("close")+'</a>			</div>            <div class="fullscreen-image">              <div><img /></div>            </div>          </div>        </div>      ');
        $(".fullscreen-content .previous a").click(Gallery.prev);
        $(".fullscreen-content .next a").click(Gallery.next);
        $(Gallery.fullscreen.lightBoxSel+" .fullscreen-content").css("height",540);
        $(Gallery.fullscreen.lightBoxSel).css({
            top:"150px"
        });
        $(window).resize(Gallery.fullscreen.onResize);
        $("#image #main-content").append('<div style="display:none;" class="expand-indicator"></div>');
        Gallery.fullscreen.indicator=$("#image #main-content .expand-indicator");
        Gallery.fullscreen.indicator.css("cursor","pointer");
        Gallery.fullscreen.indicator.click(Gallery.fullscreen.show);
        Gallery.fullscreen.indicator.hover(Gallery.fullscreen.showIndicator,Gallery.fullscreen.hideIndicator)
        },
    showIndicator:function(){
        var a=$("#image .main-image").position()["top"]+$("#image .main-image").outerHeight()-Gallery.fullscreen.indicator.height()-10;
        var b=(($("#image #main-content").width()-$("#image .main-image").width())/2)+5;
        Gallery.fullscreen.indicator.css({
            top:a,
            left:b
        });
        Gallery.fullscreen.indicator.show()
        },
    hideIndicator:function(){
        Gallery.fullscreen.indicator.hide()
        },
    onResize:function(){
        if(Gallery.isFullscreen){
            Gallery.fullscreen.showOverlay(false);
            Gallery.fullscreen.positionImage()
            }
        },
show:function(){
    Gallery.isFullscreen=true;
    Gallery.fullscreen.showOverlay(true);
    $(Gallery.fullscreen.lightBoxSel).css({
        display:"block"
    });
    Gallery.fullscreen.updateControls();
    Gallery.fullscreen.showImage()
    },
hide:function(){
    if(!Gallery.isFullscreen){
        return
    }
    $(Gallery.fullscreen.lightBoxSel).css({
        display:"none"
    });
    Gallery.fullscreen.hideOverlay();
    Gallery.isFullscreen=false
    },
hideOverlay:function(){
    $("#overlay").fadeOut()
    },
showOverlay:function(a){
    var b=Gallery.fullscreen.pageSize();
    $("#overlay").css({
        display:"block",
        opacity:0,
        width:b[0]+"px",
        height:b[1]+"px"
        });
    if(a){
        $("#overlay").animate({
            opacity:0.9
        })
        }else{
        $("#overlay").css({
            opacity:0.9
        })
        }
    },
updateControls:function(){
    $(".fullscreen-content .next a").removeClass("disabled");
    if(Gallery.currentImgIdx+1>=Gallery.images.length){
        $(".fullscreen-content .next a").addClass("disabled")
        }
        $(".fullscreen-content .previous a").removeClass("disabled");
    if(Gallery.currentImgIdx-1<0){
        $(".fullscreen-content .previous a").addClass("disabled")
        }
    },
showImage:function(){
    if(Gallery.currentImgIdx==undefined||Gallery.currentImgIdx==null){
        return false
        }
        var a=Gallery.currentImgData.path_960;
    $(Gallery.fullscreen.lightBoxSel+" .fullscreen-image img").attr("src",Gallery.transparentImg);
    $(Gallery.fullscreen.lightBoxSel+" .fullscreen-image img").css("height",540);
    $(Gallery.fullscreen.lightBoxSel+' .fullscreen-image img').attr('title', Gallery.currentImgData.title_text);
    $(Gallery.fullscreen.lightBoxSel+' .fullscreen-image img').attr('alt', Gallery.alt_text);
    Gallery.fullscreen.nextImg=new Image();
    Gallery.fullscreen.nextImg.onload=Gallery.fullscreen.onImgLoad;
    Gallery.fullscreen.nextImg.src=a;
    Gallery.fullscreen.positionImage();
    },
onImgLoad:function(a){
    $(Gallery.fullscreen.lightBoxSel+" .fullscreen-image img").attr("src",Gallery.currentImgData.path_960);
    $(Gallery.fullscreen.lightBoxSel+' .fullscreen-image img').attr('title', Gallery.currentImgData.title_text);
    $(Gallery.fullscreen.lightBoxSel+' .fullscreen-image img').attr('alt', Gallery.currentImgData.alt_text);
    $(Gallery.fullscreen.lightBoxSel+" .fullscreen-image img").css({
        height:Gallery.fullscreen.nextImg.height,
        width:Gallery.fullscreen.nextImg.width
        });
    Gallery.fullscreen.positionImage()
    },
positionImage:function(){
    var d=Gallery.fullscreen.pageSize();
    var c=Gallery.fullscreen.pageScroll();
    $(Gallery.fullscreen.lightBoxSel+" .fullscreen-image").css({
        display:"block"
    });
    var b=$(Gallery.fullscreen.lightBoxSel).height();
    var e=$(Gallery.fullscreen.lightBoxSel+" .fullscreen-content img").outerWidth();
    if(e<Gallery.fullscreen.minWidth){
        e=Gallery.fullscreen.minWidth
        }
        var a=c[1]+((d[3]/2)-(b/2));
    if(a<0){
        a=0
        }
        $(Gallery.fullscreen.lightBoxSel+" .fullscreen-content").css({
        width:e+"px"
        });
    $(Gallery.fullscreen.lightBoxSel+" .lightbox-image-nav-cont").css({
        width:e-($(Gallery.fullscreen.lightBoxSel).find("a.close").outerWidth())+"px"
        });
    $(Gallery.fullscreen.lightBoxSel).css({
        top:a
    })
    },
pageSize:function(){
    var c,a;
    if(window.innerHeight&&window.scrollMaxY){
        c=window.innerWidth+window.scrollMaxX;
        a=window.innerHeight+window.scrollMaxY
        }else{
        if(document.body.scrollHeight>document.body.offsetHeight){
            c=document.body.scrollWidth;
            a=document.body.scrollHeight
            }else{
            c=document.body.offsetWidth;
            a=document.body.offsetHeight
            }
        }
    var b,d;
if(self.innerHeight){
    if(document.documentElement.clientWidth){
        b=document.documentElement.clientWidth
        }else{
        b=self.innerWidth
        }
        d=self.innerHeight
    }else{
    if(document.documentElement&&document.documentElement.clientHeight){
        b=document.documentElement.clientWidth;
        d=document.documentElement.clientHeight
        }else{
        if(document.body){
            b=document.body.clientWidth;
            d=document.body.clientHeight
            }
        }
}
if(a<d){
    pageHeight=d
    }else{
    pageHeight=a
    }
    if(c<b){
    pageWidth=c
    }else{
    pageWidth=b
    }
    arrayPageSize=new Array(pageWidth,pageHeight,b,d);
return arrayPageSize
},
pageScroll:function(){
    var b,a;
    if(self.pageYOffset){
        a=self.pageYOffset;
        b=self.pageXOffset
        }else{
        if(document.documentElement&&document.documentElement.scrollTop){
            a=document.documentElement.scrollTop;
            b=document.documentElement.scrollLeft
            }else{
            if(document.body){
                a=document.body.scrollTop;
                b=document.body.scrollLeft
                }
            }
    }
arrayPageScroll=new Array(b,a);
return arrayPageScroll
}
},
attachAbuseComments:function(a){
    a.find("a.abuseLink").bind("click",function(){
        _this=$(this);
        _this.hide();
        var b=window.location.href.split("#/image-");
        if(b.length>1){
            var c=b[b.length-1]
            }else{
            var c=1
            }
            $('<div class="preloaderSmall"></div>').insertBefore(_this);
        $.ajax({
            type:"GET",
            url:_this.attr("rel"),
            data:"imageno="+c,
            success:function(d){
                _this.prev().remove();
                _this.replaceWith('<span class="flagged">'+d+"</span>")
                }
            });
    return false
    })
}
};

$(document).ready(function(){
    if($("#comments #comments_Container").length>0){
        commentsObj.init()
        }
    });
var commentsObj={
    moreBtn:null,
    commentURI:null,
    commentFullURI:null,
    galleryIMG_JSON:null,
    init:function(){
        _this=commentsObj;
        _this.commentList=$($("#comments #comment-list")[0]);
        _this.commentListCont=$($("#comments #comments_Container")[0]);
        _this.commentURI=_this.commentListCont.attr("rel");
        if($("#image .main_Image").length==0){
            _this.doUpdateComment_Req()
            }
            _this.commentList.find("#more-comments a.viewComments").live("click",_this.doUpdateComment_Req)
        },
    createCommentURI:function(){
        var d=_this.commentURI;
        if($("#image .main_Image").length>0){
            _this.galleryIMG_JSON=Gallery;
            var e=_this.commentURI.split("cid=");
            if(e[1].indexOf("&")!=-1){
                d=e[0]+"cid="+_this.galleryIMG_JSON.currentImgData.imageId+e[1].substr(e[1].indexOf("&"))
                }else{
                d=e[0]+"cid="+_this.galleryIMG_JSON.currentImgData.imageId
                }
            }
        var b=d.split("currentPage=");
    var c=d.split("numRecordsPerPage=");
    if(c[1].indexOf("&")!=-1){
        _this.recordSet_Count=c[1].substr(0,c[1].indexOf("&"))
        }else{
        _this.recordSet_Count=c[1].substr(0,c[1].length-1)
        }
        var a=parseInt(_this.commentList.find("li.commentListBox").length/_this.recordSet_Count)+1;
    if(b[1].indexOf("&")!=-1){
        d=b[0]+"currentPage="+a+b[1].substr(b[1].indexOf("&"))
        }else{
        d=b[0]+"currentPage="+a
        }
        return d
    },
doUpdateComment_Req:function(){
    _this=commentsObj;
    $("#comments").find("#more-comments").hide();
    _this.commentListCont.find(".preloader").show();
    _this.commentFullURI=_this.createCommentURI();
    $.ajax({
        url:_this.commentFullURI,
        success:_this.updateComment
        })
    },
updateComment:function(a){
    _this.commentList.append(a);
    _this.commentListCont.find(".preloader").hide();
    if(_this.commentList.find("li:last").attr("class")=="moreCommentsFlag displayNone"&&$("#comments").find(".viewComments").length==0){
        _this.commentListCont.after('<div id="more-comments"><a class="viewComments" href="javascript:void(0)">'+translate("more")+"</a></div>")
        }else{
        if(_this.commentList.find("li:last").attr("class")=="moreCommentsFlag displayNone"&&$("#comments").find(".viewComments").length>0){
            $("#comments").find("#more-comments").show()
            }else{
            if(_this.commentList.find("li:last").attr("class")!="moreCommentsFlag displayNone"&&$("#comments").find(".viewComments").length>0){
                $("#comments").find("#more-comments").hide()
                }
            }
    }
}
};

var GamePlayer={
    options:{
        width:"620",
        height:"349",
        swf_path:"",
        lan:"en",
        game_id:"",
        insert_id:"hero-content",
        preserve_layout:false
    },
    init:function(a){
        for(attr in GamePlayer.options){
            if(typeof(a[attr])!="undefined"&&a[attr]!=null){
                GamePlayer.options[attr]=a[attr]
                }
            }
        if(GamePlayer.options.width>970){
        GamePlayer.options.height=(970/GamePlayer.options.width)*GamePlayer.options.height;
        GamePlayer.options.width=970
        }
        if(GamePlayer.options.width>620){
        GamePlayer.setupWidePlayer()
        }
        GamePlayer.load();
    return true
    },
setupWidePlayer:function(b){
    if(GamePlayer.options.preserve_layout){
        GamePlayer.options.insert_id=GamePlayer.options.insert_id+"-embed";
        var a=$('<div id="hero-content"></div>').append($('<div id="'+GamePlayer.options.insert_id+'"></div>'));
        $("#main-content").before(a)
        }else{
        var a=$('<div id="hero-content"></div>').append($("#main-content #category-navigation")).append($("#main-content h2").clone()).append($("#main-content #"+GamePlayer.options.insert_id));
        $("#main-content").before(a);
        $("#main-content h2").remove();
        $("#main-content #"+GamePlayer.options.insert_id).remove()
        }
        return true
    },
load:function(){
    var b={
        lan:GamePlayer.options.lan,
        game_url:GamePlayer.options.swf_path,
        game_id:GamePlayer.options.game_id
        };

    var d={
        allowfullscreen:"true",
        wmode:"transparent"
    };

    var c={};

    c.id="game-player";
    try{
        swfobject.embedSWF(GamePlayer.options.swf_path,GamePlayer.options.insert_id,GamePlayer.options.width,GamePlayer.options.height,"9.0.115",false,b,d,c)
        }catch(a){}
    return true
    }
};

$(document).ready(function(){
    if($("#events").length>0){
        var a=new EventFilter($("#events-filter").get(0))
        }
    });
var EventFilter=function(el){
    var _this=this;
    _this.parentEl=$(el);
    _this.uri=null;
    _this.loading=false;
    _this.count=$(".event").length;
    _this.dateStart="";
    _this.dateEnd="";
    _this.filter="";
    _this.preloaderEl=null;
    this.preloaderHtml='<div class="preloader"></div>';
    _this.init=function(){
        _this.uri=eval(RBConfig.event_search_url);
        $(_this.parentEl).submit(function(e){
            _this.doRequest();
            return false
            })
        };

    _this.doRequest=function(){
        if(_this.loading){
            return
        }
        _this.dateStart=$(_this.parentEl).find("select#range-start :selected").get(0).value;
        _this.dateEnd=$(_this.parentEl).find("select#range-end :selected").get(0).value;
        _this.filter=escape($(_this.parentEl).find("#events-filter-query").get(0).value);
        var uri=createUri(_this.dateStart,_this.dateEnd,_this.filter);
        _this.loading=true;
        _this.showPreloader();
        $.get(uri,null,_this.onPageLoad)
        };

    _this.showPreloader=function(){
        _this.preloaderEl=$("#other-events");
        if(_this.preloaderEl.length<1){
            _this.preloaderEl=_this.parentEl
            }
            _this.preloaderEl.html(_this.preloaderHtml)
        };

    _this.resetAfterPreloader=function(){
        if(_this.preloaderEl&&_this.preloaderEl.length>0){
            _this.preloaderEl.height("auto")
            }
        };

_this.onPageLoad=function(data){
    $("#other-events").html(data);
    _this.count=$(".event").length;
    if(_this.filter.length>0){
        $(".event-results").html("<p>There are "+_this.count+" Red Bull Events between<br />"+_this.prettyDate(_this.dateStart)+" and "+_this.prettyDate(_this.dateEnd)+" related to '"+unescape(_this.filter)+"'.</p>")
        }else{
        $(".event-results").html("<p>There are "+_this.count+" Red Bull Events between<br />"+_this.prettyDate(_this.dateStart)+" and "+_this.prettyDate(_this.dateEnd)+".</p>")
        }
        EventMap.plot();
    _this.loading=false
    };

_this.prettyDate=function(dateStr){
    var dateObj=new Date();
    var monthNames=["January","Febuarary","March","April","May","June","July","August","September","October","November","December"];
    dateObj.setYear(dateStr.substr(0,4));
    dateObj.setMonth(dateStr.substr(5,2));
    dateObj.setDate(dateStr.substr(8,2));
    return dateObj.getDate()+" "+translate(monthNames[dateObj.getMonth()-1])+" "+dateObj.getFullYear()
    };

var createUri=function(start,end,filter){
    var fulluri=_this.uri;
    if(fulluri[fulluri.length-1]!="&"&&fulluri[fulluri.length-1]!="?"){
        if(fulluri.indexOf("?")==-1){
            fulluri+="?"
            }else{
            fulluri+="&"
            }
        }
    fulluri+="start="+start+"&end="+end+"&filter="+filter;
return fulluri
};

_this.init()
};

var ZeroClipboard={
    version:"1.0.4",
    clients:{},
    moviePath:RBConfig.copy_swf,
    nextId:1,
    $:function(a){
        if(typeof(a)=="string"){
            a=document.getElementById(a)
            }
            if(!a.addClass){
            a.hide=function(){
                this.style.display="none"
                };

            a.show=function(){
                this.style.display=""
                };

            a.addClass=function(b){
                this.removeClass(b);
                this.className+=" "+b
                };

            a.removeClass=function(b){
                this.className=this.className.replace(new RegExp("\\s*"+b+"\\s*")," ").replace(/^\s+/,"").replace(/\s+$/,"")
                };

            a.hasClass=function(b){
                return !!this.className.match(new RegExp("\\s*"+b+"\\s*"))
                }
            }
        return a
    },
setMoviePath:function(a){
    this.moviePath=RBConfig.copy_swf
    },
dispatch:function(d,b,c){
    var a=this.clients[d];
    if(a){
        a.receiveEvent(b,c)
        }
    },
register:function(b,a){
    this.clients[b]=a
    },
getDOMObjectPosition:function(b){
    var a={
        left:0,
        top:0,
        width:b.width?b.width:b.offsetWidth,
        height:b.height?b.height:b.offsetHeight
        };
    while(b){
        a.left+=b.offsetLeft;
        a.top+=b.offsetTop;
        b=b.offsetParent
        }
        return a
    },
Client:function(a){
    this.handlers={};

    this.id=ZeroClipboard.nextId++;
    this.movieId="ZeroClipboardMovie-"+this.id;
    ZeroClipboard.register(this.id,this);
    if(a){
        this.glue(a)
        }
    }
};

ZeroClipboard.Client.prototype={
    id:0,
    ready:false,
    movie:null,
    clipText:"",
    handCursorEnabled:true,
    cssEffects:true,
    handlers:null,
    glue:function(d){
        this.domElement=ZeroClipboard.$(d);
        var f=99;
        if(this.domElement.style.zIndex){
            f=parseInt(this.domElement.style.zIndex)+1
            }
            var e=$(this.domElement).offset();
        var a=$(this.domElement).height();
        var c=$(this.domElement).width();
        this.div=document.createElement("div");
        this.div.style.position="absolute";
        this.div.style.left="0px";
        this.div.style.top="0px";
        this.div.style.width=""+c+"px";
        this.div.style.height=""+a+"px";
        this.div.style.zIndex=f;
        var b=$(this.domElement).offsetParent();
        b.append(this.div);
        this.div.innerHTML=this.getHTML(c,a)
        },
    getHTML:function(d,a){
        var c="";
        var b="id="+this.id+"&width="+d+"&height="+a;
        if(navigator.userAgent.match(/MSIE/)){
            var e=location.href.match(/^https/i)?"https://":"http://";
            c+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+d+'" height="'+a+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+b+'"/><param name="wmode" value="transparent"/></object>'
            }else{
            c+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+d+'" height="'+a+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+b+'" wmode="transparent" />'
            }
            return c
        },
    hide:function(){
        if(this.div){
            this.div.style.left="-2000px"
            }
        },
show:function(){
    this.reposition()
    },
destroy:function(){
    if(this.domElement&&this.div){
        this.hide();
        this.div.innerHTML="";
        var a=document.getElementsByTagName("body")[0];
        try{
            a.removeChild(this.div)
            }catch(b){}
        this.domElement=null;
        this.div=null
        }
    },
reposition:function(c){
    if(c){
        this.domElement=ZeroClipboard.$(c);
        if(!this.domElement){
            this.hide()
            }
        }
    if(this.domElement&&this.div){
    var b=ZeroClipboard.getDOMObjectPosition(this.domElement);
    var a=this.div.style;
    a.left=""+b.left+"px";
    a.top=""+b.top+"px"
    }
},
setText:function(a){
    this.clipText=a;
    if(this.ready){
        this.movie.setText(a)
        }
    },
addEventListener:function(a,b){
    a=a.toString().toLowerCase().replace(/^on/,"");
    if(!this.handlers[a]){
        this.handlers[a]=[]
        }
        this.handlers[a].push(b)
    },
setHandCursor:function(a){
    this.handCursorEnabled=a;
    if(this.ready){
        this.movie.setHandCursor(a)
        }
    },
setCSSEffects:function(a){
    this.cssEffects=!!a
    },
receiveEvent:function(d,e){
    d=d.toString().toLowerCase().replace(/^on/,"");
    switch(d){
        case"load":
            this.movie=document.getElementById(this.movieId);
            if(!this.movie){
            var c=this;
            setTimeout(function(){
                c.receiveEvent("load",null)
                },1);
            return
        }
        if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){
            var c=this;
            setTimeout(function(){
                c.receiveEvent("load",null)
                },100);
            this.ready=true;
            return
        }
        this.ready=true;
        this.movie.setText(this.clipText);
            this.movie.setHandCursor(this.handCursorEnabled);
            break;
        case"mouseover":
            if(this.domElement&&this.cssEffects){
            this.domElement.addClass("hover");
            if(this.recoverActive){
                this.domElement.addClass("active")
                }
            }
        break;
    case"mouseout":
        if(this.domElement&&this.cssEffects){
        this.recoverActive=false;
        if(this.domElement.hasClass("active")){
            this.domElement.removeClass("active");
            this.recoverActive=true
            }
            this.domElement.removeClass("hover")
        }
        break;
    case"mousedown":
        if(this.domElement&&this.cssEffects){
        this.domElement.addClass("active")
        }
        break;
    case"mouseup":
        if(this.domElement&&this.cssEffects){
        this.domElement.removeClass("active");
        this.recoverActive=false
        }
        break
    }
    if(this.handlers[d]){
    for(var b=0,a=this.handlers[d].length;b<a;b++){
        var f=this.handlers[d][b];
        if(typeof(f)=="function"){
            f(this,e)
            }else{
            if((typeof(f)=="object")&&(f.length==2)){
                f[0][f[1]](this,e)
                }else{
                if(typeof(f)=="string"){
                    window[f](this,e)
                    }
                }
        }
    }
}
}
};

var carousels=new Array();
$(document).ready(function(){
    $(".carousel").each(function(){
        carousels[carousels.length]=new Carousel(this)
        })
    });
var Carousel=function(a){
    var b=this;
    b.el=$(a);
    b.contentEl=b.el.find("ul");
    b.rightArrow=null;
    b.leftArrow=null;
    b.origin=0;
    b.adjust=0;
    b.itemWidth=0;
    b.visibleWidth=0;
    b.position=0;
    b.holdTimer=null;
    b.interval=300;
    b.init=function(){
        b.items=b.contentEl.find("li");
        b.items.find("a").bind("click",b.onVideoClick);
        b.items.eq(0).addClass("playing");
        b.itemWidth=b.items.outerWidth(true);
        b.origin=parseInt(this.el.find(".mask").css("padding-left").replace("px",""),10);
        if($.browser.msie==true&&$.browser.version.indexOf("6")==0){
            b.origin=b.origin-10;
            b.adjust=10
            }
            b.contentEl.width(b.itemWidth*b.items.length+b.adjust);
        var d=this.el.find(".mask").width();
        b.visibleWidth=Math.floor(d/this.itemWidth)*this.itemWidth;
        var c=b.items.outerHeight(true);
        b.el.find(".mask").height(c);
        b.rightArrow=$('<a class="right-scroller" onclick="return false;" href="#"></a>');
        b.rightArrow.height(c);
        b.rightArrow.mousedown(b.scrollRight);
        b.leftArrow=$('<a class="left-scroller" onclick="return false;" href="#"></a>');
        b.leftArrow.height(c);
        b.leftArrow.mousedown(b.scrollLeft);
        b.el.prepend(b.leftArrow);
        b.el.append(b.rightArrow);
        b.contentEl.css("left",b.origin);
        b.updateControls()
        };

    b.onVideoClick=function(c){
        b.items.removeClass("playing");
        $(this).parent().addClass("playing");
        document.getElementById("RBPlayer").loadVideo($(this).attr("rel"));
        return false
        };

    b.scrollLeft=function(c){
        b.scroll(1);
        $(this).mouseup(b.killHoldTimer);
        b.holdTimer=setInterval(function(){
            b.scroll(1)
            },b.interval);
        c.stopPropagation();
        return false
        };

    b.scrollRight=function(c){
        b.scroll(-1);
        $(this).mouseup(b.killHoldTimer);
        b.holdTimer=setInterval(function(){
            b.scroll(-1)
            },b.interval);
        c.stopPropagation();
        return false
        };

    b.killHoldTimer=function(){
        clearInterval(b.holdTimer);
        b.holdTimer=null
        };

    b.scroll=function(f){
        var d=null;
        var c=b.origin+(b.position+f)*b.itemWidth;
        var e=(b.el.find(".mask").width()-b.visibleWidth);
        if(f>0){
            d=c
            }else{
            d=c+e-10
            }
            if(d>b.origin||(b.el.find(".mask").width()-d)>b.contentEl.width()+10+b.adjust){
            return
        }
        b.position+=f;
        b.contentEl.animate({
            left:d
        },b.interval,"linear",b.afterScroll)
        };

    b.afterScroll=function(){
        b.updateControls()
        };

    b.updateControls=function(){
        var c=b.contentEl.position().left;
        b.leftArrow.removeClass("disabled");
        if(c==b.origin){
            b.leftArrow.addClass("disabled")
            }
            b.rightArrow.removeClass("disabled");
        if(((b.el.find(".mask").width()-c)+b.origin)>=b.contentEl.width()+10-b.adjust){
            b.rightArrow.addClass("disabled")
            }
        };

b.init()
};


var paginators=new Array();
$(document).ready(function()
{
    if($(".subcategory").length>0)
		{
			if( typeof(bIsNewVideoSection) == "undefined" )
      {
				paginators[0]=new Paginator($(".subcategory").get(0));
			}
			else
			{
				if( bIsNewVideoSection == false )
				{
					paginators[0]=new Paginator($(".subcategory").get(0));
				}
			}
    }
		else
		{
        if($("#search-results").length>0)
				{
            $("#related-content").children().each(function()
						{
                paginators[paginators.length]=new SearchPaginator(this);
            })
        }
    }
});


// lwe:
/*
var paginators=new Array();
$(document).ready(function()
{
		if($("#search-results").length>0)
		{
		  $("#related-content").children().each(function()
			{
		        paginators[paginators.length]=new SearchPaginator(this)
		  });
		}

});
*/

var Paginator=function(b){
    var d=this;
    d.parentEl=$(b);
    d.page=1;
    d.sort="date";
    d.pageCount=0;
    d.uri=null;
    d.loading=false;
   // myPaginator = myPaginator;

		d.init=function()
		{
        if($("#event_subsection_cont").length>0){
            d.uri=d.parentEl.find("#event_subsection_cont").attr("rel")
            }else{
            d.uri=d.parentEl.find(".page-controls").attr("rel")
            }
            d.pageCount=$(d.parentEl.find(".pagination").get(0)).find("li").length-2;
        d.controls=new PaginationControls(d,b);
        d.controls.setupControls()
    };

    d.setPage=function(e){

        if(d.loading||e<1||e>d.pageCount||e==d.page){
            return
        }
        d.page=e
        };

    d.setSort=function(e){
        if(typeof(e)=="undefined"||e==d.sort||e==""){
            return
        }
        d.sort=e
        };

    d.doRequest=function(){
        if(d.loading){
            return
        }
        var e=a(d.page,d.sort);
        d.loading=true;
        d.controls.showPreloader();
        $.get(e,null,d.onPageLoad)
        };

    d.onPageLoad=function(e){
        if($("#event_subsection_cont").length>0){
            d.parentEl.find("#event_subsection_cont").html(e);
            d.init();
            if((d.controls.delegate.page==1)&&(d.sort=="upcomingevent"||d.sort=="date")){
                if($("#events-map").length>0){
                    c.init()
                    }
                }
        }else{
    d.parentEl.find(".pagination-content").html(e)
    }
    d.controls.resetAfterPreloader();
d.loading=false;
d.controls.updateControlStates();
$("table").each(function(){
    $(this).find("tr:even").addClass("odd")
    });
$("table tr").find("span").filter("span[class='redbull-Row_Highlight']").parent().parent().addClass("row_Highlight");
$("table tr").find("span").filter("span[class='redbull-Table_Head']").parent().parent().addClass("table_Head")
};

var a=function(f,e){
    var g=d.uri;
    if(g[g.length-1]!="&"&&g[g.length-1]!="?"){
        if(g.indexOf("?")==-1){
            g+="?"
            }else{
            g+="&"
            }
        }
    g+="page="+f+"&sort="+e;
return g
};

var c={
    init:function(){
        c.map=new GMap2(document.getElementById("map"));
        c.map.addControl(new GSmallZoomControl3D());
        c.map.clearOverlays();
        c.map.setCenter(new GLatLng(40.624722,-73.952222),2);
        c.plot()
        },
    plot:function(){
        if(c.map===undefined){
            return
        }
        if(c.manager!==undefined){
            c.manager.clearMarkers();
            c.manager.refresh()
            }
            c.map.clearOverlays();
        c.events=$(".event");
        c.markers=[];
        c.eventData=[];
        c.events.each(function(j){
            var e=new GLatLng(c.events.eq(j).find("span.latitude").text(),c.events.eq(j).find("span.longitude").text());
            if(c.events.eq(j).find("a.event-thumb").length){
                var g=c.events.eq(j).find("a.event-thumb")
                }else{
                var g=c.events.eq(j).find("a.featured")
                }
                var k="<h3>"+c.events.eq(j).find("h3").html()+"</h3><a class='thumb' href='"+g.attr("href")+"'>"+g.html()+"</a><p>"+c.events.eq(j).find("dd.date").html()+"</p><p>"+c.events.eq(j).find("dd.location").html()+"</p><p><a href='"+c.events.eq(j).find("a.icon-link").attr("href")+"' class='icon-link'>"+c.events.eq(j).find("a.icon-link").html()+"</a></p>";
            c.eventData.push(k);
            var h="";
            if(this.className.indexOf("past")>=0){
                var f=new GIcon(G_DEFAULT_ICON);
                f.image=RBConfig.blue_marker;
                h={
                    icon:f
                }
            }
            c.markers.push(new GMarker(e,h))
            });
    c.manager="";
    c.manager=new MarkerManager(c.map);
    c.manager.clearMarkers();
    c.manager.addMarkers(c.markers,1);
    c.manager.refresh();
    c.mapSpace=new GLatLngBounds;
    for(i=0;i<c.markers.length;i++){
        c.mapSpace.extend(c.markers[i].getLatLng());
        GEvent.addListener(c.markers[i],"click",function(){
            this.openInfoWindow("<div class='balloon' style='width: 260px; height: 110px; overflow:hidden;'>"+c.eventData[jQuery.inArray(this,c.markers)]+"</div>")
            })
        }
        c.newZoom=c.map.getBoundsZoomLevel(c.mapSpace);
    if(c.newZoom>14){
        c.newZoom=5
        }
        if(c.newZoom<1){
        c.newZoom=1
        }
        c.newCenter=c.mapSpace.getCenter();
    c.map.setZoom(c.newZoom);
    c.map.setCenter(c.newCenter)
    }
};

d.init()
};

var SearchPaginator=function(b){
    var c=this;
    c.parentEl=$(b);
    c.page=1;
    c.sort="dotcom";
    c.pageCount=0;
    c.uri=null;
    c.loading=false;
    c.init=function(){
        c.uri=c.parentEl.attr("rel");
        c.pageCount=$(c.parentEl.find(".pagination").get(0)).find("li").length-3;
        c.controls=new PaginationControls(c,b);
        c.controls.setupControls()
        };

    c.beforeChange=function(){
        if(c.parentEl.children().length<1){
            c.controls.minHeight=$(c.parentEl.parent().children()[0]).height()
            }
        };

c.setupPage=function(){
    c.controls.resetAfterPreloader();
    c.pageCount=$(c.parentEl.find(".pagination").get(0)).find("li").length-3;
    c.controls.setupControls()
    };

c.setSort=function(d){
    if(typeof(d)=="undefined"||d==c.sort||d==""){
        return
    }
    c.sort=d
    };

c.setPage=function(d){
    if(c.loading||d<1||d>c.pageCount||d==c.page){
        return
    }
    c.page=d
    };

c.doRequest=function(){
    var d=a(c.page,c.sort);
    c.loading=true;
    c.controls.showPreloader();
    $.get(d,null,c.onRequestComplete)
    };

c.onRequestComplete=function(d){
    c.controls.resetAfterPreloader();
    c.parentEl.html(d);
    c.setupPage();
    c.loading=false
    };

var a=function(e,d){
    var f=c.uri;
    if(f[f.length-1]!="&"&&f[f.length-1]!="?"){
        if(f.indexOf("?")==-1){
            f+="?"
            }else{
            f+="&"
            }
        }
    f+="page="+e+"&sort="+d;
return f
};

c.init()
};

var PaginationControls=function(b,a){
    var c=this;
    //c.showMax=8;
		c.showMax=7;
    c.delegate=b;
    c.parentEl=$(a);
    c.minHeight=0;
    c.preloaderEl=null;
    c.preloaderHtml='<div class="preloader"></div>';
    c.pageLoadFlag=false;
    c.init=function(){
        c.pageLoadFlag=true;
        c.uriMap=[{
            name:"page",
            getter:function(){
                return c.delegate.page
                },
            setter:c.setPage
            },{
            name:"sort",
            getter:function(){
                return c.delegate.sort
                },
            setter:c.delegate.setSort
            }];
        SWFAddress.addEventListener(SWFAddressEvent.CHANGE,c.onAddressChange)
        };

    c.setupControls=function(){
        c.parentEl.find(".pagination li").each(function(){
            if($(this).hasClass("previous")){
                $(this).children("a").click(c.previous)
                }else{
                if($(this).hasClass("next")){
                    $(this).children("a").click(c.next)
                    }else{
                    $(this).children("a").click(c.onPageClick);
                    if($(this).children("a").hasClass("current")){
                        c.delegate.page=parseInt($(this).children("a").text(),10)
                        }
                    }
            }
        });
c.parentEl.find(".sorting li").each(function(){
    if(typeof($(this).children("a").attr("name"))!="undefined"&&$(this).children("a").attr("name")!=""){
        if($(this).hasClass("active")){
            c.delegate.sort=$(this).children("a").attr("name")
            }
            $(this).children("a").click(c.onSortClick)
        }
    });
c.updateControlStates()
};

c.updateControlStates=function(){
    if(c.parentEl.parent("#related-content").length==0){
        c.parentEl.find(".pagination li a").removeClass("current");
        c.parentEl.find(".pagination").each(function(){
            if($(this).find("li").length>2){
                if($("#input_rtl_site:hidden").length>0){
                    $(this).find("li a").each(function(){
                        if($(this).html()==c.delegate.page){
                            $(this).not(".disabled").addClass("current")
                            }
                        })
                }else{
                $($(this).find("li a").get(c.delegate.page)).not(".disabled").addClass("current")
                }
            }
        })
}
c.parentEl.find(".sorting li").removeClass("active");
c.parentEl.find(".sorting li a[name="+c.delegate.sort+"]").parent().addClass("active");
$("#subcategory-events").find(".sorting li").each(function(){
    if(!$(this).find("a")[0]){
        $(this).addClass("active")
        }
    });
c.parentEl.find(".page-controls .previous").children("a").removeClass("disabled");
c.parentEl.find(".page-controls .next").children("a").removeClass("disabled");
if(c.delegate.page<=1){
    c.parentEl.find(".page-controls .previous").children("a").addClass("disabled")
    }


		// BoC lwe
		testpageCount = parseInt($(c.parentEl.find(".pagerCount")[0]).text(),10);
		// EoC

    if($("#event_subsection_cont").length==0){
 	   c.delegate.pageCount=parseInt($(c.parentEl.find(".pagerCount")[0]).text(),10)
    }

		// BoC lwe
		if( testpageCount != c.delegate.pageCount )
		{
		 	c.delegate.pageCount=testpageCount;
		}
		// EoC


    if(c.delegate.page>=c.delegate.pageCount){
    c.parentEl.find(".page-controls .next").children("a").addClass("disabled")
    }
    c.collapsePageNav()
};

c.collapsePageNav=function(){
    if(c.delegate.pageCount<=c.showMax){
        return
    }
    var j;
    var g=false;
    var d=false;
    if(c.parentEl.parent("#related-content").length==0){
        if($("#input_rtl_site:hidden").length>0){
            var e=c.showMax;
            var h=false;
            if(c.delegate.page>4){
                g=true; // distance of actual page to first page is greater than 4
            }
            if(c.delegate.page+c.showMax-1<=c.delegate.pageCount){
                d=true; // distance of actual selected page to last page is less than 8
            }
            if(d){
            	j=true;
                if(g){
                	e=c.delegate.page+3;
                }
            } else {
            	e=c.delegate.pageCount-1;
            	h=true; // distance of actual page to last page in pager is greater than 7 pages.
            }
            c.parentEl.find(".pagination").each(function(){
            $(this).find("li.ellipsis").remove();
            var k=e; // k is inversion as we are doing rtl so we begin with greatest index first
            $(this).find("li.pager_Number").each(function(l){
                if(e!=c.showMax&&l==0){
                    if(h){
                        $($(this).parent().find(".pager_Number").get(c.showMax-2)).after('<li class="ellipsis">...</li>');
                    }else{
                        $(this).after('<li class="ellipsis">...</li>');
                    }
                }else{
                if(e!=c.showMax&&c.showMax-1>l>0){
                    $(this).find("a").html(k);
                    if(d&&l==c.showMax-2){
                        $(this).after('<li class="ellipsis">...</li>')
                    }
                    k--
                }else{
                    if(d&&!$(this).prev().hasClass("ellipsis")){
                        if(l!=0&&l!=c.showMax-1){
                            $(this).find("a").html(k)
                        }
                        k--;
                        if(l==c.showMax-1){
                            $($(this).parent().find(".pager_Number").get(0)).after('<li class="ellipsis">...</li>')
                        }
                    }
                }
            }
        })
})
}else{
    var f=1;
    if(c.delegate.page>4){
        g=true
        }
	// BoC _lwe RBCMSFD-378
        //old: if(c.delegate.page+7<=c.delegate.pageCount)
				if(c.delegate.page+4<=c.delegate.pageCount)
				{
        	d=true
        }
        if(d==false){
					//old: f=c.delegate.pageCount-6
					f=c.delegate.pageCount-5
        }else{
        if(g){
            f=c.delegate.page-2;
	// EoC lwe
            j=true
            }else{
            j=true
            }
        }
    c.parentEl.find(".pagination").each(function(){
    $(this).find("li.ellipsis").remove();
    var k=f;
    $(this).find("li.pager_Number").each(function(l){
        if(f!=1&&l==0){
            $(this).after('<li class="ellipsis">...</li>')
            }else{
            if(f!=1&&c.showMax-1>l>0){
                $(this).find("a").html(k);
                if(j&&l==c.showMax-2){
                    $(this).after('<li class="ellipsis">...</li>')
                    }
                    k++
            }else{
                if(j&&!$(this).prev().hasClass("ellipsis")){
                    if(l!=0&&l!=c.showMax-1){
                        $(this).find("a").html(k)
                        }
                        k++;
                    if(l==c.showMax-1){
                        $(this).before('<li class="ellipsis">...</li>')
                        }
                    }
            }
    }
})
})
}
if(c.parentEl.parent("#related-content").length==0){
    c.parentEl.find(".pagination li a").removeClass("current");
    c.parentEl.find(".pagination").each(function(){
        $(this).find("li a").each(function(){
            if($(this).html()==c.delegate.page){
                $(this).not(".disabled").addClass("current")
                }
            })
    })
}
}
},c.setAddress=function(f){
    if(c.delegate.beforeChange){
        c.delegate.beforeChange()
        }
        var e=this.parentEl.attr("id");
    for(var d=0;d<c.uriMap.length;d++){
        if(typeof(f[c.uriMap[d].name])!="undefined"){
            e+="/"+f[c.uriMap[d].name]
            }else{
            e+="/"+c.uriMap[d].getter()
            }
        }
    SWFAddress.setValue(e)
},c.next=function(d){
    if(!$(this).hasClass("disabled")){
        c.setAddress({
            page:c.delegate.page+1
            })
        }
        return false
    };

c.previous=function(d){
    if(!$(this).hasClass("disabled")){
        c.setAddress({
            page:c.delegate.page-1
            })
        }
        return false
    };

c.onPageClick=function(d){
    if(!$(this).hasClass("current")){
        var e=parseInt($(this).text(),10);
        c.setAddress({
            page:e
        })
        }
        return false
    };

c.onSortClick=function(d){
    c.setAddress({
        page:1,
        sort:$(this).attr("name")
        });
    return false
    };

c.onAddressChange=function(f){
    var g=f.path.split("/");
    if(g&&g[1]==c.parentEl.attr("id")){
        for(var e=0;e<c.uriMap.length;e++){
            if(typeof(g[e+2])!="undefined"){
                c.uriMap[e].setter(g[e+2])
                }
            }
        if(!c.pageLoadFlag){
        c.delegate.doRequest()
        }else{
        var d=window.location.href;
        if(d.indexOf("#")>0){
            SWFAddress.setValue("")
            }
            c.pageLoadFlag=false
        }
    }
c.pageLoadFlag=false
};

c.setPage=function(d){
    c.delegate.setPage(parseInt(d,10))
    };

c.showPreloader=function(){
    c.preloaderEl=c.parentEl.find(".pagination-content");
    if(c.preloaderEl.length<1){
        c.preloaderEl=c.parentEl
        }
        var d=c.preloaderEl.height();
    if(d<20||d==null){
        d=c.minHeight
        }
        c.preloaderEl.height(d);
    c.preloaderEl.html(c.preloaderHtml)
    };

c.resetAfterPreloader=function(){
    if(c.preloaderEl&&c.preloaderEl.length>0){
        c.preloaderEl.height("auto")
        }
    };

c.init()
};

var activeSearches=new Array();
$(document).ready(function(){
    if($(".athletes-and-teams").length>0){
        $(".content-section").each(function(){
            activeSearches[activeSearches.length]=new ActiveSearch(this)
            })
        }
    });
var onlyonceSearch="false";
var ActiveSearch=function(b){
    var c=this;
    c.parentEl=$(b);
    c.searchEl=null;
    c.uri=null;
    c.searchRequest=null;
    c.defaultInputText=null;
    c.searchTerm="";
    c.pauseTimer=null;
    c.pauseDelay=500;
    c.loading=false;
    c.page=1;
    c.sort="";
    c.pageCount=0;
    c.init=function(){
        c.searchEl=$(b).find("form.active-search-form input[type=text]");
        c.uri=$(b).find("form.active-search-form").attr("rel");
        c.defaultInputText=c.searchEl.attr("value");
        c.searchEl.keyup(c.onInputChange);
        c.searchEl.keypress(function(d){
            if(d.which==13){
                return false
                }
            });
    c.paginationControls=new PaginationControls(c,b);
    c.paginationControls.uriMap=[{
        name:"searchTerm",
        getter:c.getSearchTerm,
        setter:c.setSearchTerm
        },{
        name:"page",
        getter:function(){
            return c.page
            },
        setter:c.paginationControls.setPage
        }];
    c.setupPage()
    };

c.onInputChange=function(){
    c.killPauseTimer();
    c.startPauseTimer()
    };

c.startPauseTimer=function(){
    c.pauseTimer=setTimeout(function(){
        c.doSearch()
        },c.pauseDelay)
    };

c.killPauseTimer=function(){
    clearTimeout(c.pauseTimer);
    c.pauseTimer=null
    };

c.getSearchTerm=function(){
    var d=c.searchEl.attr("value");
    if(d==c.defaultInputText){
        return""
        }
        return d
    };

c.setSearchTerm=function(d){
    if(d!=""&&d!="null"){
        c.searchEl.attr("value",d)
        }else{
        c.searchEl.attr("value",c.defaultInputText)
        }
        c.searchTerm=d
    };

c.doSearch=function(){
    if(c.searchEl.attr("value")==c.defaultInputText){
        c.searchTerm=""
        }else{
        c.searchTerm=c.searchEl.attr("value")
        }
        c.page=1;
    c.paginationControls.setAddress({
        searchTerm:c.searchTerm
        })
    };

c.setupPage=function(){
    c.paginationControls.resetAfterPreloader();
    c.pageCount=$(c.parentEl.find(".pagination").get(0)).find("li").length-2;
    c.paginationControls.setupControls()
    };

c.setPage=function(d){
    if(c.loading||d<1||d>c.pageCount||d==c.page){
        return
    }
    c.page=d
    };

c.setSort=function(){};

c.doRequest=function(){
    if(c.loading){
        c.searchRequest.abort()
        }
        var d=a(c.searchTerm,c.page,"");
    c.loading=true;
    c.paginationControls.showPreloader();
    c.searchRequest=$.get(d,null,c.onRequestComplete);
    };

c.onRequestComplete=function(d){
    c.parentEl.find(".search-results").html(d);
    c.setupPage();
    c.loading=false
    };

var a=function(f,e,d){
    var g=c.uri;
    if(g[g.length-1]!="&"&&g[g.length-1]!="?"){
        if(g.indexOf("?")==-1){
            g+="?"
            }else{
            g+="&"
            }
        }
    if(!f){
    f=""
    }
    g+="query="+f+"&page="+e+"&sort="+d;
return g
};

c.init()
};

jQuery.fn.accessibleUISlider=function(e){
    var l=jQuery(this);
    var a=(function(){
        var j=[];
        l.each(function(){
            j.push(jQuery(this).attr("id"))
            });
        return j
        })();
    var p=(function(){
        var j=[];
        l.eq(0).find("option").each(function(q){
            j.push({
                value:jQuery(this).attr("value"),
                text:jQuery(this).text()
                })
            });
        return j
        })();
    var g=(function(){
        var j=[];
        l.each(function(){
            var r=jQuery(this).find("option:selected").get(0).index;
            var q=Math.round((r/(p.length-1))*100);
            j.push(q)
            });
        return j
        })();
    var h=jQuery.extend({
        labels:3,
        inject:true,
        rangeOpacity:0.7,
        width:l.parent().width(),
        range:l.length>1,
        steps:p.length-1,
        stepping:0,
        values:g,
        handles:function(){
            var j=[];
            l.each(function(q){
                j[q]={
                    min:0,
                    max:100,
                    id:"handle_"+q
                    }
                });
        return j
        }(),
        change:function(w,v){
        var u=jQuery(this);
        var q=v.value;
        var x=Math.round(q/100*(p.length-1));
        var q=p[x].value;
        var r=p[x].text;
        var j=jQuery(v.handle).find(".ui-slider-tooltip");
        j.html(r).parent().attr("aria-valuetext",q).attr("aria-valuenow",q);
        var t=jQuery("#"+jQuery(v.handle).attr("id").split("handle_")[1]);
        t.find("option").eq(x).attr("selected","selected");
        n=l.get(0).selectedIndex;
        k=l.get(1).selectedIndex
        }
    },e);
l.change(function(){
    var j=jQuery(this);
    var t=jQuery(this).siblings("select");
    var w=j.find("option:selected").get(0).index;
    var x;
    var v;
    if(j.prevAll().length<t.prevAll().length){
        x=j;
        v=t
        }else{
        x=t;
        v=j
        }
        var q=x.find("option:selected").get(0).index;
    var r=v.find("option:selected").get(0).index;
    if(o(j.get(0).options[q].value)>o(j.get(0).options[r].value)){
        x.get(0).selectedIndex=n;
        v.get(0).selectedIndex=k;
        return false
        }
        n=q;
    k=r;
    var u=Math.ceil((w/(p.length-1))*100);
    var w=jQuery("#handle_"+jQuery(this).attr("id")).parent().children().index(jQuery("#handle_"+jQuery(this).attr("id")));
    jQuery("#handle_"+jQuery(this).attr("id")).parents(".ui-slider:eq(0)").slider("values",w,u)
    });
var o=(function(j){
    var r=j.split(/\-/);
    var q=new Date();
    q.setFullYear(parseInt(r[0],10));
    q.setMonth(parseInt(r[1],10)-1);
    q.setDate(parseInt(r[2],10));
    q.setHours(0);
    q.setMinutes(0);
    q.setSeconds(0);
    q.setMilliseconds(0);
    return q
    });
var b=(function(){
    if(l.eq(0).find("optgroup").size()>0){
        var j=[];
        l.eq(0).find("optgroup").each(function(q){
            j[q]={};

            j[q].label=jQuery(this).attr("label");
            j[q].options=[];
            jQuery(this).find("option").each(function(){
                j[q].options.push({
                    text:jQuery(this).text(),
                    value:jQuery(this).attr("value")
                    })
                })
            });
        return j
        }else{
        return false
        }
    })();
var n=l.get(0).selectedIndex;
var k=l.get(1).selectedIndex;
var c=jQuery('<div class="sliderComponent"></div>');
l.each(function(j){
    c.append('<div id="handle_'+a[j]+'" tabindex="'+j+1+'" class="ui-slider-handle ui-default-state" role="slider" aria-valuemin="'+h.minValue+'" aria-valuemax="'+h.maxValue+'"><span class="ui-slider-tooltip ui-component-content"></span></div>')
    });
c.width(h.width);
if(b){
    var d=c.append('<dl class="ui-slider-scale"></dl>').find(".ui-slider-scale:eq(0)");
    jQuery(b).each(function(){
        d.append("<dt><span>"+this.label+"</span></dt>");
        var j=this.options;
        jQuery(this.options).each(function(q){
            d.append('<dd><span class="ui-slider-label">'+j[q].text+'</span><span class="ui-slider-tic ui-component-content"></span></dd>')
            })
        })
    }else{
    var d=c.append('<ol class="ui-slider-scale"></ol>').find(".ui-slider-scale:eq(0)");
    jQuery(p).each(function(){
        d.append('<li><span class="ui-slider-label">'+this.text+'</span><span class="ui-slider-tic ui-component-content"></span></li>')
        })
    }
    c.find(".ui-slider-scale li").each(function(j){
    jQuery(this).css({
        left:((100/(p.length-1))*j).toFixed(2)+"%"
        })
    });
c.find(".ui-slider-scale li:first, .ui-slider-scale dd:first").addClass("first");
c.find(".ui-slider-scale li:last, .ui-slider-scale dd:last").addClass("last").each(function(){
    jQuery(this).css({
        right:0,
        left:"auto"
    })
    });
if(h.labels>1){
    c.find(".ui-slider-scale li:last span.ui-slider-label, .ui-slider-scale dd:last span.ui-slider-label").css("text-indent",0).addClass("ui-slider-label-show")
    }
    var m=Math.round(p.length/h.labels);
for(var f=0;f<p.length;f+=m){
    if((p.length-f)>m){
        c.find(".ui-slider-scale li:eq("+f+") span.ui-slider-label, .ui-slider-scale dd:eq("+f+") span.ui-slider-label").addClass("ui-slider-label-show")
        }
    }
c.find(".ui-slider-scale dt").each(function(q){
    var j=((3/h.width)*100).toFixed(2);
    jQuery(this).css({
        left:((100/(b.length))*q).toFixed(2)+"%",
        width:(((h.width/b.length)/h.width)*100).toFixed(2)-j+"%"
        })
    });
h.markup=c;
h.markup.slider=function(j){
    var q=jQuery.extend(h,j);
    jQuery(this).slider(q).find(".ui-slider-range").css("opacity",q.rangeOpacity);
    return this
    };

if(h.inject){
    h.markup.insertAfter(jQuery(this).eq(this.length-1)).slider(h).find(".ui-slider-range").css("opacity",h.rangeOpacity);
    return this
    }else{
    return h
    }
};

function validateEmail(g){
    var a="@";
    var b=".";
    var f=g.indexOf(a);
    var d=g.length;
    var e=g.indexOf(b);
    if(g.indexOf(a)==-1){
        alert(translate("validemail"));
        return false
        }
        if(g.indexOf(a)==-1||g.indexOf(a)==0||g.indexOf(a)==d){
        alert(translate("validemail"));
        return false
        }
        if(g.indexOf(b)==-1||g.indexOf(b)==0||g.indexOf(b)==d){
        alert(translate("validemail"));
        return false
        }
        if(g.indexOf(a,(f+1))!=-1){
        alert(translate("validemail"));
        return false
        }
        if(g.substring(f-1,f)==b||g.substring(f+1,f+2)==b){
        alert(translate("validemail"));
        return false
        }
        if(g.indexOf(b,(f+2))==-1){
        alert(translate("validemail"));
        return false
        }
        if(g.indexOf(" ")!=-1){
        alert(translate("validemail"));
        return false
        }
        for(i=0;i<g.length;i++){
        var h=g.charAt(i);
        if(h=="'"||h==";"||h=="`"){
            alert(translate("validemail"));
            return false
            }
        }
    return true
}
function ValidateForm(){
    var b=document.getElementById("rsvp-email");
    var a=document.getElementById("rsvp-firstname");
    var c=document.getElementById("rsvp-lastname");
    var d=document.getElementById("captchaResponse");
    if((a.value=="First name")||(a.value==null)||(a.value=="")){
        alert(translate("validfirstname"));
        a.focus();
        return false
        }
        if((c.value=="Last name")||(c.value==null)||(c.value=="")){
        alert(translate("validlastname"));
        c.focus();
        return false
        }
        if((b.value==null)||(b.value=="")){
        alert(translate("validemail"));
        b.focus();
        return false
        }
        if(validateEmail(b.value)==false){
        b.value="";
        b.focus();
        return false
        }
        if(d==null||d.value==""){
        alert("Please enter a value in captcha");
        d.focus();
        return false
        }
    return true
    }
    var digits="0123456789";
var phoneNumberDelimiters="()- ";
var validWorldPhoneChars=phoneNumberDelimiters+"+";
var minDigitsInIPhoneNumber=10;
function isInteger(b){
    var a;
    for(a=0;a<b.length;a++){
        var d=b.charAt(a);
        if(((d<"0")||(d>"9"))){
            return false
            }
        }
    return true
}
function trim(d){
    var b;
    var a="";
    for(b=0;b<d.length;b++){
        var e=d.charAt(b);
        if(e!=" "){
            a+=e
            }
        }
    return a
}
function stripCharsInBag(d,e){
    var b;
    var a="";
    for(b=0;b<d.length;b++){
        var f=d.charAt(b);
        if(e.indexOf(f)==-1){
            a+=f
            }
        }
    return a
}
function checkInternationalPhone(a){
    var c=3;
    a=trim(a);
    if(a.indexOf("+")>1){
        return false
        }
        if(a.indexOf("-")!=-1){
        c=c+1
        }
        if(a.indexOf("(")!=-1&&a.indexOf("(")>c){
        return false
        }
        var b=a.indexOf("(");
    if(a.indexOf("(")!=-1&&a.charAt(b+2)!=")"){
        return false
        }
        if(a.indexOf("(")==-1&&a.indexOf(")")!=-1){
        return false
        }
        s=stripCharsInBag(a,validWorldPhoneChars);
    return(isInteger(s)&&s.length>=minDigitsInIPhoneNumber)
    }
    function validateEmail(g){
    var a="@";
    var b=".";
    var f=g.indexOf(a);
    var d=g.length;
    var e=g.indexOf(b);
    if(g.indexOf(a)==-1){
        alert(translate("validemail"));
        return false
        }
        if(g.indexOf(a)==-1||g.indexOf(a)==0||g.indexOf(a)==d){
        alert(translate("validemail"));
        return false
        }
        if(g.indexOf(b)==-1||g.indexOf(b)==0||g.indexOf(b)==d){
        alert(translate("validemail"));
        return false
        }
        if(g.indexOf(a,(f+1))!=-1){
        alert(translate("validemail"));
        return false
        }
        if(g.substring(f-1,f)==b||g.substring(f+1,f+2)==b){
        alert(translate("validemail"));
        return false
        }
        if(g.indexOf(b,(f+2))==-1){
        alert(translate("validemail"));
        return false
        }
        if(g.indexOf(" ")!=-1){
        alert(translate("validemail"));
        return false
        }
        for(i=0;i<g.length;i++){
        var h=g.charAt(i);
        if(h=="'"||h==";"||h=="`"){
            alert(translate("validemail"));
            return false
            }
        }
    return true
}
function ValidateContactForm(){
    var a=document.getElementById("contact-email");
    if($("#contactUs_US")[0]){
        var b=document.getElementById("contact-telephone")
        }else{
        var b=document.getElementById("contact-phone")
        }
        if((a.value==null)||(a.value=="")){
        a.focus();
        return false
        }
        if(validateEmail(a.value)==false){
        a.value="";
        a.focus();
        return false
        }
        if($("#contactUs_US").length>0){
        if((checkInternationalPhone(b.value)==false)&&(b.value!=""&&b.value!=null)){
            alert(translate("validphone"));
            b.value="";
            b.focus();
            return false
            }else{
            return true
            }
        }else{
    if((b.value==null)||(b.value=="")){
        b.value="";
        b.focus();
        return false
        }else{
        if(checkInternationalPhone(b.value)==false){
            alert(translate("validphone"));
            b.value="";
            b.focus();
            return false
            }else{
            return true
            }
        }
}
}
$(document).ready(function(){
    if($(".moreLink_AssetFeed").length>0){
        asset_Feed.init()
        }
    });
var asset_Feed={
    jsonURI:"offset={offset}",
    moreBtn:null,
    offset:{},
    init:function(){
        $(".moreLink_AssetFeed").each(function(){
            $($(this).parents(".more")[0]).show()
            });
        $(".moreLink_AssetFeed").each(function(a){
            $(this).click(asset_Feed.showMore)
            })
        },
    showMore:function(j,a){
        if($(this).parent().hasClass("more")){
            var f=$(this).parent().parent()
            }else{
            var f=$("#"+a)
            }
            f.find("p.displayNone").before('<div class="preloader"></div>');
        var g=f.attr("rel");
        var h=g;
        if(h[h.length-1]!="&"&&h[h.length-1]!="?"){
            if(h.indexOf("?")==-1){
                h+="?"
                }else{
                h+="&"
                }
            }
        if(typeof(asset_Feed.offset[f.attr("rel")])=="undefined"){
        if(h.indexOf("maxRows")!=-1){
            var d=h.substring(h.indexOf("maxRows"));
            var c=d.split("=")[1];
            var b=c.split("&")[0];
            if($(this).parent().hasClass("more")&&$(this).parents("#related-content-all").length>0){
                asset_Feed.offset[f.attr("rel")]=parseInt(b)+1
                }else{
                asset_Feed.offset[f.attr("rel")]=1
                }
            }else{
        asset_Feed.offset[f.attr("rel")]=11
        }
    }
h+=asset_Feed.jsonURI.replace("{offset}",asset_Feed.offset[f.attr("rel")]);
$.get(h,null,function(k,e){
    asset_Feed.onLoad(g,k,f)
    },"json");
return false
},
onLoad:function(d,e,c){
    var b=asset_Feed.getType(c.get(0).id);
    asset_Feed.offset[d]=asset_Feed.offset[d]+e.length;
    for(var a=0;a<e.length;a++){
        if(typeof(e[a]["isLast"])!="undefined"&&e[a]["isLast"]==true){
            c.find("p.more").hide();
            break
        }
        switch(e[a]["type"]){
            case"article":
                c.find("p.displayNone").before(asset_Feed.createArticle(e[a]));
                break;
            case"video":
                if(a==0){
                c.find("p.displayNone").before('<div class="checkedBottomStrip clearfix"></div>')
                }
                $(c.find("div.checkedBottomStrip")[c.find("div.checkedBottomStrip").length-1]).append(asset_Feed.createVideo(e[a],a));
                break;
            case"photo":
                c.find("p.displayNone").before(asset_Feed.createPhoto(e[a]));
                break;
            case"event":
                c.find("p.displayNone").before(asset_Feed.createEvent(e[a]));
                break
                }
                c.find("div.preloader").remove();
        if(asset_Feed.offset[c.attr("rel")]<=11&&c.find("h4").length<2){
            c.find("div").eq(0).addClass("first")
            }
        }
    },
createVideo:function(b,c){
    c++;
    if(c%2!=0){
        var a='<div class="subcategory-item first">'
        }else{
        var a='<div class="subcategory-item">'
        }
        a=a.concat('<h3><a href="'+b.url+'">'+b.title+'</a><span class="date">'+b.date+"</span>");
    if(b.comments){
        a=a.concat('<span class="comments-views">'+b.comments+"</span>")
        }
        a=a.concat('</h3>			<a class="video-thumb" href="'+b.url+'"><img alt="" src="'+b.image_url+'"/></a>			<div class="description">				<p>'+b.snippet+'</p>				<a href="'+b.url+'" >'+b.label+"</a>			</div>		</div>");
    return a
    },
createEvent:function(a){
    return'    	<div class="related-event">			<h4 class="clearfix" ><a href="'+a.url+'"><span class="contentheading">'+a.title+'</span></a> <span class="date">'+a.date+'</span></h4>			<a href="'+a.url+'" class="photo"><img src="'+a.image_url+'" alt="" /></a>			<div class="description">				<p>'+a.snippet+'</p>				<a href="'+a.url+'" class="icon-link">'+a.label+"</a>			</div>		</div>		"
    },
createPhoto:function(c){
    var a='<div class="related-gallery">			<h4 class="clearfix"><a href="'+c.url+'"><span class="contentheading">'+c.title+'</span></a> <span class="date">'+c.date+"</span>";
    if(c.comments){
        a=a.concat('<span class="comments-views">'+c.comments+"</span>")
        }
        a=a.concat("</h4>");
    a=a.concat('<ul class="gallery-thumbs">');
    for(var b=0;b<c.featured_images.length;b++){
        if(c.featured_images[b]){
            a=a.concat('<li class="big"><a href="'+c.featured_images[b].url+'"><img src="'+c.featured_images[b].image+'" alt="" /></a></li>')
            }
        }
    for(var b=0;b<c.thumbnails.length;b++){
    if(c.thumbnails[b]){
        a=a.concat('<li><a href="'+c.thumbnails[b].url+'"><img src="'+c.thumbnails[b].image+'" alt="" /></a></li>')
        }
    }
a=a.concat('</ul>			<a href="'+c.url+'">'+c.label+"</a>				</div>");
return a
},
createArticle:function(b){
    var a='<div class="related-article">			<h4 class="clearfix" >				<a href="'+b.url+'"><span class="contentheading">'+b.title+'</span></a> <span class="date">'+b.date+"</span>";
    if(b.comments){
        a=a.concat('<span class="comments-views">'+b.comments+"</span>")
        }
        a=a.concat("</h4>");
    if(b.image_url&&b.image_url!=""){
        a=a.concat('<a class="photo" href="'+b.url+'"><img alt="" src="'+b.image_url+'"/></a>')
        }
        if(b.author&&b.author!=""){
        a=a.concat("<h5>"+translate("by")+" "+b.author+"</h5>")
        }
        a=a.concat("<p>"+b.snippet+'</p>			<a href="'+b.url+'">'+b.label+"</a>				</div>");
    return a
    },
getType:function(a){
    return a.replace("related-content-","")
    }
};
