Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(){
- var w=window.jQuery,_$=window.$;
- var D=window.jQuery=window.$=function(a,b){
- return new D.fn.init(a,b)
- }
- ;
- var u=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;
- D.fn=D.prototype={
- init:function(d,b){
- d=d||document;
- if(d.nodeType){
- this[0]=d;
- this.length=1;
- return this
- }
- if(typeof d=="string"){
- var c=u.exec(d);
- if(c&&(c[1]||!b)){
- if(c[1])d=D.clean([c[1]],b);
- else{
- var a=document.getElementById(c[3]);
- if(a){
- if(a.id!=c[3])return D().find(d);
- return D(a)
- }
- d=[]
- }
- }
- else return D(b).find(d)
- }
- else if(D.isFunction(d))return D(document)[D.fn.ready?"ready":"load"](d);
- return this.setArray(D.makeArray(d))
- }
- ,jquery:"1.2.6",size:function(){
- return this.length
- }
- ,length:0,get:function(a){
- return a==undefined?D.makeArray(this):this[a]
- }
- ,pushStack:function(b){
- var a=D(b);
- a.prevObject=this;
- return a
- }
- ,setArray:function(a){
- this.length=0;
- Array.prototype.push.apply(this,a);
- return this
- }
- ,each:function(a,b){
- return D.each(this,a,b)
- }
- ,index:function(b){
- var a=-1;
- return D.inArray(b&&b.jquery?b[0]:b,this)
- }
- ,attr:function(c,a,b){
- var d=c;
- if(c.constructor==String)if(a===undefined)return this[0]&&D[b||"attr"](this[0],c);
- else{
- d={
- }
- ;
- d[c]=a
- }
- return this.each(function(i){
- for(c in d)D.attr(b?this.style:this,c,D.prop(this,d[c],b,i,c))
- }
- )
- }
- ,css:function(b,a){
- if((b=='width'||b=='height')&&parseFloat(a)<0)a=undefined;
- return this.attr(b,a,"curCSS")
- }
- ,text:function(b){
- if(typeof b!="object"&&b!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(b));
- var a="";
- D.each(b||this,function(){
- D.each(this.childNodes,function(){
- if(this.nodeType!=8)a+=this.nodeType!=1?this.nodeValue:D.fn.text([this])
- }
- )
- }
- );
- return a
- }
- ,wrapAll:function(b){
- if(this[0])D(b,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){
- var a=this;
- while(a.firstChild)a=a.firstChild;
- return a
- }
- ).append(this);
- return this
- }
- ,wrapInner:function(a){
- return this.each(function(){
- D(this).contents().wrapAll(a)
- }
- )
- }
- ,wrap:function(a){
- return this.each(function(){
- D(this).wrapAll(a)
- }
- )
- }
- ,append:function(){
- return this.domManip(arguments,true,false,function(a){
- if(this.nodeType==1)this.appendChild(a)
- }
- )
- }
- ,prepend:function(){
- return this.domManip(arguments,true,true,function(a){
- if(this.nodeType==1)this.insertBefore(a,this.firstChild)
- }
- )
- }
- ,before:function(){
- return this.domManip(arguments,false,false,function(a){
- this.parentNode.insertBefore(a,this)
- }
- )
- }
- ,after:function(){
- return this.domManip(arguments,false,true,function(a){
- this.parentNode.insertBefore(a,this.nextSibling)
- }
- )
- }
- ,end:function(){
- return this.prevObject||D([])
- }
- ,find:function(b){
- var c=D.map(this,function(a){
- return D.find(b,a)
- }
- );
- return this.pushStack(/[^+>] [^+>]/.test(b)||b.indexOf("..")>-1?D.unique(c):c)
- }
- ,clone:function(e){
- var f=this.map(function(){
- if(D.browser.msie&&!D.isXMLDoc(this)){
- var a=this.cloneNode(true),container=document.createElement("div");
- container.appendChild(a);
- return D.clean([container.innerHTML])[0]
- }
- else return this.cloneNode(true)
- }
- );
- var d=f.find("*").andSelf().each(function(){
- if(this[E]!=undefined)this[E]=null
- }
- );
- if(e===true)this.find("*").andSelf().each(function(i){
- if(this.nodeType==3)return;
- var c=D.data(this,"events");
- for(var a in c)for(var b in c[a])D.event.add(d[i],a,c[a][b],c[a][b].data)
- }
- );
- return f
- }
- ,filter:function(b){
- return this.pushStack(D.isFunction(b)&&D.grep(this,function(a,i){
- return b.call(a,i)
- }
- )||D.multiFilter(b,this))
- }
- ,not:function(b){
- if(b.constructor==String)if(isSimple.test(b))return this.pushStack(D.multiFilter(b,this,true));
- else b=D.multiFilter(b,this);
- var a=b.length&&b[b.length-1]!==undefined&&!b.nodeType;
- return this.filter(function(){
- return a?D.inArray(this,b)<0:this!=b
- }
- )
- }
- ,add:function(a){
- return this.pushStack(D.unique(D.merge(this.get(),typeof a=='string'?D(a):D.makeArray(a))))
- }
- ,is:function(a){
- return!!a&&D.multiFilter(a,this).length>0
- }
- ,hasClass:function(a){
- return this.is("."+a)
- }
- ,val:function(b){
- if(b==undefined){
- if(this.length){
- var c=this[0];
- if(D.nodeName(c,"select")){
- var e=c.selectedIndex,values=[],options=c.options,one=c.type=="select-one";
- if(e<0)return null;
- for(var i=one?e:0,max=one?e+1:options.length;
- i=0||D.inArray(this.name,b)>=0);
- else if(D.nodeName(this,"select")){
- var a=D.makeArray(b);
- D("option",this).each(function(){
- this.selected=(D.inArray(this.value,a)>=0||D.inArray(this.text,a)>=0)
- }
- );
- if(!a.length)this.selectedIndex=-1
- }
- else this.value=b
- }
- )
- }
- ,html:function(a){
- return a==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(a)
- }
- ,replaceWith:function(a){
- return this.after(a).remove()
- }
- ,eq:function(i){
- return this.slice(i,i+1)
- }
- ,slice:function(){
- return this.pushStack(Array.prototype.slice.apply(this,arguments))
- }
- ,map:function(b){
- return this.pushStack(D.map(this,function(a,i){
- return b.call(a,i,a)
- }
- ))
- }
- ,andSelf:function(){
- return this.add(this.prevObject)
- }
- ,data:function(d,b){
- var a=d.split(".");
- a[1]=a[1]?"."+a[1]:"";
- if(b===undefined){
- var c=this.triggerHandler("getData"+a[1]+"!",[a[0]]);
- if(c===undefined&&this.length)c=D.data(this[0],d);
- return c===undefined&&a[1]?this.data(a[0]):c
- }
- else return this.trigger("setData"+a[1]+"!",[a[0],b]).each(function(){
- D.data(this,d,b)
- }
- )
- }
- ,removeData:function(a){
- return this.each(function(){
- D.removeData(this,a)
- }
- )
- }
- ,domManip:function(g,f,h,d){
- var e=this.length>1,elems;
- return this.each(function(){
- if(!elems){
- elems=D.clean(g,this.ownerDocument);
- if(h)elems.reverse()
- }
- var b=this;
- if(f&&D.nodeName(this,"table")&&D.nodeName(elems[0],"tr"))b=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));
- var c=D([]);
- D.each(elems,function(){
- var a=e?D(this).clone(true)[0]:this;
- if(D.nodeName(a,"script"))c=c.add(a);
- else{
- if(a.nodeType==1)c=c.add(D("script",a).remove());
- d.call(b,a)
- }
- }
- );
- c.each(evalScript)
- }
- )
- }
- }
- ;
- D.fn.init.prototype=D.fn;
- function evalScript(i,a){
- if(a.src)D.ajax({
- url:a.src,async:false,dataType:"script"
- }
- );
- else D.globalEval(a.text||a.textContent||a.innerHTML||"");
- if(a.parentNode)a.parentNode.removeChild(a)
- }
- function now(){
- return+new Date
- }
- D.extend=D.fn.extend=function(){
- var b=arguments[0]||{
- }
- ,i=1,length=arguments.length,deep=false,options;
- if(b.constructor==Boolean){
- deep=b;
- b=arguments[1]||{
- }
- ;
- i=2
- }
- if(typeof b!="object"&&typeof b!="function")b={
- }
- ;
- if(length==i){
- b=this;
- --i
- }
- for(;
- i-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(d,e,c){
- if(e=="width"||e=="height"){
- var b,props={
- position:"absolute",visibility:"hidden",display:"block"
- }
- ,which=e=="width"?["Left","Right"]:["Top","Bottom"];
- function getWH(){
- b=e=="width"?d.offsetWidth:d.offsetHeight;
- var a=0,border=0;
- D.each(which,function(){
- a+=parseFloat(D.curCSS(d,"padding"+this,true))||0;
- border+=parseFloat(D.curCSS(d,"border"+this+"Width",true))||0
- }
- );
- b-=Math.round(a+border)
- }
- if(D(d).is(":visible"))getWH();
- else D.swap(d,props,getWH);
- return Math.max(0,b)
- }
- return D.curCSS(d,e,c)
- }
- ,curCSS:function(f,l,k){
- var e,style=f.style;
- function color(b){
- if(!D.browser.safari)return false;
- var a=defaultView.getComputedStyle(b,null);
- return!a||a.getPropertyValue("color")==""
- }
- if(l=="opacity"&&D.browser.msie){
- e=D.attr(style,"opacity");
- return e==""?"1":e
- }
- if(D.browser.opera&&l=="display"){
- var d=style.outline;
- style.outline="0 solid black";
- style.outline=d
- }
- if(l.match(/float/i))l=y;
- if(!k&&style&&style[l])e=style[l];
- else if(defaultView.getComputedStyle){
- if(l.match(/float/i))l="float";
- l=l.replace(/([A-Z])/g,"-$1").toLowerCase();
- var c=defaultView.getComputedStyle(f,null);
- if(c&&!color(f))e=c.getPropertyValue(l);
- else{
- var g=[],stack=[],a=f,i=0;
- for(;
- a&&color(a);
- a=a.parentNode)stack.unshift(a);
- for(;
- i]*?)\/>/g,function(b,a,c){
- return c.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?b:a+">"
- }
- );
- var f=D.trim(d).toLowerCase(),div=h.createElement("div");
- var e=!f.indexOf("",""]||!f.indexOf("",""]||f.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
Add Comment
Please, Sign In to add comment