Difference between revisions of "Template:AUC TURKEY"

Line 229: Line 229:
 
}
 
}
 
});
 
});
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(n(k,l){y m="G 2B 2z 2u 2s w 2p 2l 2k 2j",21=/^([\\-+])=\\s*(\\d+\\.?\\d*)/,22=[{14:/x?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,I:n(a){8[a[1],a[2],a[3],a[4]]}},{14:/x?\\(\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,I:n(a){8[a[1]*2.1s,a[2]*2.1s,a[3]*2.1s,a[4]]}},{14:/#([a-10-9]{2})([a-10-9]{2})([a-10-9]{2})/,I:n(a){8[11(a[1],16),11(a[2],16),11(a[3],16)]}},{14:/#([a-10-9])([a-10-9])([a-10-9])/,I:n(a){8[11(a[1]+a[1],16),11(a[2]+a[2],16),11(a[3]+a[3],16)]}},{14:/D?\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,T:"D",I:n(a){8[a[1],a[2]/1v,a[3]/1v,a[4]]}}],w=k.1n=n(a,b,c,d){8 2g k.1n.J.I(a,b,c,d)},E={x:{V:{23:{B:0,t:"1p"},24:{B:1,t:"1p"},27:{B:2,t:"1p"}}},D:{V:{2K:{B:0,t:"26"},2d:{B:1,t:"1l"},2e:{B:2,t:"1l"}}}},1y={"1p":{1B:1b,F:N},"1l":{F:1},"26":{M:1i,1B:1b}},1q=w.1q={},1u=k("<p>")[0],1a,C=k.C;1u.1e.2f="2h-w:x(1,1,1,.5)";1q.x=1u.1e.G.2i("x")>-1;C(E,n(a,b){b.z="2o"+a;b.V.13={B:3,t:"1l",1f:1}});n 15(a,b,c){y d=1y[b.t]||{};7(a==o){8(c||!b.1f)?o:b.1f}a=d.1B?~~a:1Z(a);7(2q(a)){8 b.1f}7(d.M){8(a+d.M)%d.M}8 0>a?0:d.F<a?d.F:a}n 1A(c){y d=w(),x=d.A=[];c=c.2A();C(22,n(i,a){y b,P=a.14.1Q(c),1r=!(!P||!a.I(P)),W=a.T||"x";7(1r){b=d[W](1r);d[E[W].z]=b[E[W].z];x=d.A=b.A;8 2I}});7(x.1N){7(x.1h()==="0,0,0,0"){k.1M(x,1a.U)}8 d}8 1a[c]}w.J=k.1M(w.1L,{I:n(f,g,h,i){7(f===l){u.A=[o,o,o,o];8 u}7(f.3k||f.2x){f=k(f).1I(g);g=l}y j=u,t=k.t(f),x=u.A=[];7(g!==l){f=[f,g,h,i];t="1G"}7(t==="1w"){8 u.I(1A(f)||1a.1E)}7(t==="1G"){C(E.x.V,n(a,b){x[b.B]=15(f[b.B],b)});8 u}7(t==="1D"){7(f 2J w){C(E,n(a,b){7(f[b.z]){j[b.z]=f[b.z].Y()}})}L{C(E,n(c,d){y e=d.z;C(d.V,n(a,b){7(!(j[e]||!d.O)){7(a==="13"||f[a]==o){8}j[e]=d.O(j.A)}j[e][b.B]=15(f[a],b,1b)});7(j[e])7(k.2F(o,j[e].Y(0,3))<0){j[e][3]=1;7(d.X){j.A=d.X(j[e])}}})}8 u}},2E:n(a){8 1b});8 2C},1T:n(){y c=[],1U=u;C(E,n(a,b){7(1U[b.z]){c.1V(a)}});8 c.19()},1X:n(d,e){y f=w(d),W=f.1T(),T=E[W],1z=u.13()===0?w("U"):u,17=1z[T.z]||T.O(1z.A),1j=17.Y();f=f[T.z];C(T.V,n(a,b){y c=b.B,Q=17[c],12=f[c],t=1y[b.t]||{};7(12===o){8}7(Q===o){1j[c]=12}L{7(t.M){7(12-Q>t.M/2){Q+=t.M}L 7(Q-12>t.M/2){Q-=t.M}}1j[c]=15((12-Q)*e+Q,b)}});8 u[W](1j)},1d:n(b){7(u.A[3]===1){8 u}y c=u.A.Y(),a=c.19(),1d=w(b).A;8 w(k.1k(c,n(v,i){8(1-a)*1d[i]+a*v}))},1t:n(){y a="x(",x=k.1k(u.A,n(v,i){8 v==o?(i>2?1:0):v});7(x[3]===1){x.19();a="2a("}8 a+x.1h()+")"},29:n(){y a="D(",D=k.1k(u.D(),n(v,i){7(v==o){v=i>2?1:0}7(!(!i||i>=3)){v=S.1c(v*1v)+"%"}8 v});7(D[3]===1){D.19();a="2b("}8 a+D.1h()+")"},2c:n(a){y b=u.A.Y(),13=b.19();7(a){b.1V(~~(13*N))}8"#"+k.1k(b,n(v){v=(v||0).25(16);8 v.1N===1?"0"+v:v}).1h("")},25:n(){8 u.A[3]===0?"U":u.1t()}});w.J.I.1L=w.J;n 1o(p,q,h){h=(h+1)%1;7(h*6<1){8 p+(q-p)*h*6}7(h*2<1){8 q}7(h*3<2){8 p+(q-p)*((2/3)-h)*6}8 p}E.D.O=n(c){7(c[0]==o||c[1]==o||c[2]==o){8[o,o,o,c[3]]}y r=c[0]/N,g=c[1]/N,b=c[2]/N,a=c[3],F=S.F(r,g,b),18=S.18(r,g,b),Z=F-18,1g=F+18,l=1g*0.5,h,s;7(18===F){h=0}L 7(r===F){h=(1x*(g-b)/Z)+1i}L 7(g===F){h=(1x*(b-r)/Z)+2m}L{h=(1x*(r-g)/Z)+2n}7(Z===0){s=0}L 7(l<=0.5){s=Z/1g}L{s=Z/(2-1g)}8[S.1c(h)%1i,s,l,a==o?1:a]};E.D.X=n(b){7(b[0]==o||b[1]==o||b[2]==o){8[o,o,o,b[3]]}y h=b[0]/1i,s=b[1],l=b[2],a=b[3],q=l<=0.5?l*(1+s):l+s-l*s,p=2*l-q;8[S.1c(1o(p,q,h+(1/3))*N),S.1c(1o(p,q,h)*N),S.1c(1o(p,q,h-(1/3))*N),a]};C(E,n(f,g){y h=g.V,z=g.z,O=g.O,X=g.X;w.J[f]=n(d){7(!(!O||u[z])){u[z]=O(u.A)}7(d===20){8 u[z].Y()}y e,t=H.t(d),1Y=(t==="1G"||t==="1D")?d:2r,K=u[z].Y();C(h,n(a,b){y c=1Y[t==="1D"?a:b.B];7(c==o){c=K[b.B]}K[b.B]=15(c,b)});7(X){e=w(X(K));e[z]=K;8 e}L{8 w(K)}};C(h,n(c,d){7(w.J[c]){8}w.J[c]=n(a){y b=H.t(a),J=(c==="13"?(u.2t?"D":"x"):f),K=u[J](),1m=K[d.B],P;7(b==="20"){8 1m}7(b==="n"){a=a.2v(u,1m);b=H.t(a)}7(!(a!=o||!d.2w)){8 u}7(b==="1w"){P=21.1Q(a);7(P){a=1m+1Z(P[2])*(P[1]==="+"?1:-1)}}K[d.B]=a;8 u[J](K)}})});w.1H=n(f){y g=f.2y(" ");C(g,n(i,d){H.1F[d]={1W:n(a,b){y c,R,G="";7(!(b==="U"||!(H.t(b)!=="1w"||(c=1A(b))))){b=w(c||b);7(!(1q.x||b.A[3]===1)){R=d==="G"?a.1S:a;2D(!(!(G===""||G==="U")||!R||!R.1e)){1R{G=H.1I(R,"G");R=R.1S}1P(e){}}b=b.1d(!(!G||G==="U")?G:"1E")}b=b.1t()}1R{a.1e[d]=b}1P(e){}}};H.2G.2H[d]=n(a){7(!a.1O){a.17=w(a.1K,d);a.1C=w(a.1C);a.1O=1b}H.1F[d].1W(a.1K,a.17.1X(a.1C,a.28))}})};w.1H(2L);H.1F.2M={2N:n(b){y c={};C(["2O","2P","2Q","2R"],n(i,a){c["2S"+a+"1n"]=b});8 c}};1a=H.1n.2T={2U:"#2V",2W:"#2X",27:"#2Y",2Z:"#30",31:"#32",24:"#33",34:"#35",36:"#37",38:"#39",3a:"#3b",3c:"#3d",23:"#3e",3f:"#3g",3h:"#3i",3j:"#1J",3l:"#3m",U:[o,o,o,0],1E:"#1J"}}(H));',62,209,'|||||||if|return|||||||||||||||function|null|||||type|this||color|rgba|var|cache|_rgba|idx|each|hsla|spaces|max|backgroundColor|jQuery|parse|fn|local|else|mod|255|to|match|startValue|curElem|Math|space|transparent|props|spaceName|from|slice|diff|f0|parseInt|endValue|alpha|re|clamp||start|min|pop|colors|true|round|blend|style|def|add|join|360|result|map|percent|cur|Color|hue2rgb|byte|support|values|55|toRgbaString|supportElem|100|string|60|propTypes|startColor|stringParse|floor|end|object|_default|cssHooks|array|hook|css|ffffff|elem|prototype|extend|length|colorInit|catch|exec|try|parentNode|_space|inst|push|set|transition|arr|parseFloat|undefined|rplusequals|stringParsers|red|green|toString|degrees|blue|pos|toHslaString|rgb|hsl|toHexString|saturation|lightness|cssText|new|background|indexOf|textEmphasisColor|textDecorationColor|outlineColor|120|240|_|columnRuleColor|isNaN|arguments|borderTopColor|_hsla|borderRightColor|call|empty|nodeType|split|borderLeftColor|toLowerCase|borderBottomColor|same|while|is|inArray|fx|step|false|instanceof|hue|stepHooks|borderColor|expand|Top|Right|Bottom|Left|border|names|aqua|00ffff|black|000000|0000ff|fuchsia|ff00ff|gray|808080|008000|lime|00ff00|maroon|800000|navy|000080|olive|808000|purple|800080|ff0000|silver|c0c0c0|teal|008080|white|jquery|yellow|ffff00'.split('|'),0,{}))
+
/*!
 +
* jQuery Color Animations v@VERSION
 +
* https://github.com/jquery/jquery-color
 +
*
 +
* Copyright jQuery Foundation and other contributors
 +
* Released under the MIT license.
 +
* http://jquery.org/license
 +
*
 +
* Date: @DATE
 +
*/
 +
(function( jQuery, undefined ) {
 +
 
 +
var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
 +
 
 +
// plusequals test for += 100 -= 100
 +
rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
 +
// a set of RE's that can match strings and generate color tuples.
 +
stringParsers = [{
 +
re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
 +
parse: function( execResult ) {
 +
return [
 +
execResult[ 1 ],
 +
execResult[ 2 ],
 +
execResult[ 3 ],
 +
execResult[ 4 ]
 +
];
 +
}
 +
}, {
 +
re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
 +
parse: function( execResult ) {
 +
return [
 +
execResult[ 1 ] * 2.55,
 +
execResult[ 2 ] * 2.55,
 +
execResult[ 3 ] * 2.55,
 +
execResult[ 4 ]
 +
];
 +
}
 +
}, {
 +
// this regex ignores A-F because it's compared against an already lowercased string
 +
re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
 +
parse: function( execResult ) {
 +
return [
 +
parseInt( execResult[ 1 ], 16 ),
 +
parseInt( execResult[ 2 ], 16 ),
 +
parseInt( execResult[ 3 ], 16 )
 +
];
 +
}
 +
}, {
 +
// this regex ignores A-F because it's compared against an already lowercased string
 +
re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
 +
parse: function( execResult ) {
 +
return [
 +
parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
 +
parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
 +
parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
 +
];
 +
}
 +
}, {
 +
re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
 +
space: "hsla",
 +
parse: function( execResult ) {
 +
return [
 +
execResult[ 1 ],
 +
execResult[ 2 ] / 100,
 +
execResult[ 3 ] / 100,
 +
execResult[ 4 ]
 +
];
 +
}
 +
}],
 +
 
 +
// jQuery.Color( )
 +
color = jQuery.Color = function( color, green, blue, alpha ) {
 +
return new jQuery.Color.fn.parse( color, green, blue, alpha );
 +
},
 +
spaces = {
 +
rgba: {
 +
props: {
 +
red: {
 +
idx: 0,
 +
type: "byte"
 +
},
 +
green: {
 +
idx: 1,
 +
type: "byte"
 +
},
 +
blue: {
 +
idx: 2,
 +
type: "byte"
 +
}
 +
}
 +
},
 +
 
 +
hsla: {
 +
props: {
 +
hue: {
 +
idx: 0,
 +
type: "degrees"
 +
},
 +
saturation: {
 +
idx: 1,
 +
type: "percent"
 +
},
 +
lightness: {
 +
idx: 2,
 +
type: "percent"
 +
}
 +
}
 +
}
 +
},
 +
propTypes = {
 +
"byte": {
 +
floor: true,
 +
max: 255
 +
},
 +
"percent": {
 +
max: 1
 +
},
 +
"degrees": {
 +
mod: 360,
 +
floor: true
 +
}
 +
},
 +
support = color.support = {},
 +
 
 +
// element for support tests
 +
supportElem = jQuery( "<p>" )[ 0 ],
 +
 
 +
// colors = jQuery.Color.names
 +
colors,
 +
 
 +
// local aliases of functions called often
 +
each = jQuery.each;
 +
 
 +
// determine rgba support immediately
 +
supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
 +
support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
 +
 
 +
// define cache name and alpha properties
 +
// for rgba and hsla spaces
 +
each( spaces, function( spaceName, space ) {
 +
space.cache = "_" + spaceName;
 +
space.props.alpha = {
 +
idx: 3,
 +
type: "percent",
 +
def: 1
 +
};
 +
});
 +
 
 +
function clamp( value, prop, allowEmpty ) {
 +
var type = propTypes[ prop.type ] || {};
 +
 
 +
if ( value == null ) {
 +
return (allowEmpty || !prop.def) ? null : prop.def;
 +
}
 +
 
 +
// ~~ is an short way of doing floor for positive numbers
 +
value = type.floor ? ~~value : parseFloat( value );
 +
 
 +
// IE will pass in empty strings as value for alpha,
 +
// which will hit this case
 +
if ( isNaN( value ) ) {
 +
return prop.def;
 +
}
 +
 
 +
if ( type.mod ) {
 +
// we add mod before modding to make sure that negatives values
 +
// get converted properly: -10 -> 350
 +
return (value + type.mod) % type.mod;
 +
}
 +
 
 +
// for now all property types without mod have min and max
 +
return 0 > value ? 0 : type.max < value ? type.max : value;
 +
}
 +
 
 +
function stringParse( string ) {
 +
var inst = color(),
 +
rgba = inst._rgba = [];
 +
 
 +
string = string.toLowerCase();
 +
 
 +
each( stringParsers, function( i, parser ) {
 +
var parsed,
 +
match = parser.re.exec( string ),
 +
values = !(!match || !parser.parse( match )),
 +
spaceName = parser.space || "rgba";
 +
 
 +
if ( values ) {
 +
parsed = inst[ spaceName ]( values );
 +
 
 +
// if this was an rgba parse the assignment might happen twice
 +
// oh well....
 +
inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
 +
rgba = inst._rgba = parsed._rgba;
 +
 
 +
// exit each( stringParsers ) here because we matched
 +
return false;
 +
}
 +
});
 +
 
 +
// Found a stringParser that handled it
 +
if ( rgba.length ) {
 +
 
 +
// if this came from a parsed string, force "transparent" when alpha is 0
 +
// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
 +
if ( rgba.join() === "0,0,0,0" ) {
 +
jQuery.extend( rgba, colors.transparent );
 +
}
 +
return inst;
 +
}
 +
 
 +
// named colors
 +
return colors[ string ];
 +
}
 +
 
 +
color.fn = jQuery.extend( color.prototype, {
 +
parse: function( red, green, blue, alpha ) {
 +
if ( red === undefined ) {
 +
this._rgba = [ null, null, null, null ];
 +
return this;
 +
}
 +
if ( red.jquery || red.nodeType ) {
 +
red = jQuery( red ).css( green );
 +
green = undefined;
 +
}
 +
 
 +
var inst = this,
 +
type = jQuery.type( red ),
 +
rgba = this._rgba = [];
 +
 
 +
// more than 1 argument specified - assume ( red, green, blue, alpha )
 +
if ( green !== undefined ) {
 +
red = [ red, green, blue, alpha ];
 +
type = "array";
 +
}
 +
 
 +
if ( type === "string" ) {
 +
return this.parse( stringParse( red ) || colors._default );
 +
}
 +
 
 +
if ( type === "array" ) {
 +
each( spaces.rgba.props, function( key, prop ) {
 +
rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
 +
});
 +
return this;
 +
}
 +
 
 +
if ( type === "object" ) {
 +
if ( red instanceof color ) {
 +
each( spaces, function( spaceName, space ) {
 +
if ( red[ space.cache ] ) {
 +
inst[ space.cache ] = red[ space.cache ].slice();
 +
}
 +
});
 +
} else {
 +
each( spaces, function( spaceName, space ) {
 +
var cache = space.cache;
 +
each( space.props, function( key, prop ) {
 +
 
 +
// if the cache doesn't exist, and we know how to convert
 +
if ( !(inst[ cache ] || !space.to ) ) {
 +
 
 +
// if the value was null, we don't need to copy it
 +
// if the key was alpha, we don't need to copy it either
 +
if ( key === "alpha" || red[ key ] == null ) {
 +
return;
 +
}
 +
inst[ cache ] = space.to( inst._rgba );
 +
}
 +
 
 +
// this is the only case where we allow nulls for ALL properties.
 +
// call clamp with alwaysAllowEmpty
 +
inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
 +
});
 +
 
 +
// everything defined but alpha?
 +
if ( inst[ cache ] )if( jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
 +
// use the default of 1
 +
inst[ cache ][ 3 ] = 1;
 +
if ( space.from ) {
 +
inst._rgba = space.from( inst[ cache ] );
 +
}
 +
}
 +
});
 +
}
 +
return this;
 +
}
 +
},
 +
is: function( compare ) {
 +
return true;
 +
});
 +
return same;
 +
},
 +
_space: function() {
 +
var used = [],
 +
inst = this;
 +
each( spaces, function( spaceName, space ) {
 +
if ( inst[ space.cache ] ) {
 +
used.push( spaceName );
 +
}
 +
});
 +
return used.pop();
 +
},
 +
transition: function( other, distance ) {
 +
var end = color( other ),
 +
spaceName = end._space(),
 +
space = spaces[ spaceName ],
 +
startColor = this.alpha() === 0 ? color( "transparent" ) : this,
 +
start = startColor[ space.cache ] || space.to( startColor._rgba ),
 +
result = start.slice();
 +
 
 +
end = end[ space.cache ];
 +
each( space.props, function( key, prop ) {
 +
var index = prop.idx,
 +
startValue = start[ index ],
 +
endValue = end[ index ],
 +
type = propTypes[ prop.type ] || {};
 +
 
 +
// if null, don't override start value
 +
if ( endValue === null ) {
 +
return;
 +
}
 +
// if null - use end
 +
if ( startValue === null ) {
 +
result[ index ] = endValue;
 +
} else {
 +
if ( type.mod ) {
 +
if ( endValue - startValue > type.mod / 2 ) {
 +
startValue += type.mod;
 +
} else if ( startValue - endValue > type.mod / 2 ) {
 +
startValue -= type.mod;
 +
}
 +
}
 +
result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
 +
}
 +
});
 +
return this[ spaceName ]( result );
 +
},
 +
blend: function( opaque ) {
 +
// if we are already opaque - return ourself
 +
if ( this._rgba[ 3 ] === 1 ) {
 +
return this;
 +
}
 +
 
 +
var rgb = this._rgba.slice(),
 +
a = rgb.pop(),
 +
blend = color( opaque )._rgba;
 +
 
 +
return color( jQuery.map( rgb, function( v, i ) {
 +
return ( 1 - a ) * blend[ i ] + a * v;
 +
}));
 +
},
 +
toRgbaString: function() {
 +
var prefix = "rgba(",
 +
rgba = jQuery.map( this._rgba, function( v, i ) {
 +
return v == null ? ( i > 2 ? 1 : 0 ) : v;
 +
});
 +
 
 +
if ( rgba[ 3 ] === 1 ) {
 +
rgba.pop();
 +
prefix = "rgb(";
 +
}
 +
 
 +
return prefix + rgba.join() + ")";
 +
},
 +
toHslaString: function() {
 +
var prefix = "hsla(",
 +
hsla = jQuery.map( this.hsla(), function( v, i ) {
 +
if ( v == null ) {
 +
v = i > 2 ? 1 : 0;
 +
}
 +
 
 +
// catch 1 and 2
 +
if (!(!i || i >= 3) ) {
 +
v = Math.round( v * 100 ) + "%";
 +
}
 +
return v;
 +
});
 +
 
 +
if ( hsla[ 3 ] === 1 ) {
 +
hsla.pop();
 +
prefix = "hsl(";
 +
}
 +
return prefix + hsla.join() + ")";
 +
},
 +
toHexString: function( includeAlpha ) {
 +
var rgba = this._rgba.slice(),
 +
alpha = rgba.pop();
 +
 
 +
if ( includeAlpha ) {
 +
rgba.push( ~~( alpha * 255 ) );
 +
}
 +
 
 +
return "#" + jQuery.map( rgba, function( v ) {
 +
 
 +
// default to 0 when nulls exist
 +
v = ( v || 0 ).toString( 16 );
 +
return v.length === 1 ? "0" + v : v;
 +
}).join("");
 +
},
 +
toString: function() {
 +
return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
 +
}
 +
});
 +
color.fn.parse.prototype = color.fn;
 +
 
 +
// hsla conversions adapted from:
 +
// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
 +
 
 +
function hue2rgb( p, q, h ) {
 +
h = ( h + 1 ) % 1;
 +
if ( h * 6 < 1 ) {
 +
return p + (q - p) * h * 6;
 +
}
 +
if ( h * 2 < 1) {
 +
return q;
 +
}
 +
if ( h * 3 < 2 ) {
 +
return p + (q - p) * ((2/3) - h) * 6;
 +
}
 +
return p;
 +
}
 +
 
 +
spaces.hsla.to = function ( rgba ) {
 +
if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
 +
return [ null, null, null, rgba[ 3 ] ];
 +
}
 +
var r = rgba[ 0 ] / 255,
 +
g = rgba[ 1 ] / 255,
 +
b = rgba[ 2 ] / 255,
 +
a = rgba[ 3 ],
 +
max = Math.max( r, g, b ),
 +
min = Math.min( r, g, b ),
 +
diff = max - min,
 +
add = max + min,
 +
l = add * 0.5,
 +
h, s;
 +
 
 +
if ( min === max ) {
 +
h = 0;
 +
} else if ( r === max ) {
 +
h = ( 60 * ( g - b ) / diff ) + 360;
 +
} else if ( g === max ) {
 +
h = ( 60 * ( b - r ) / diff ) + 120;
 +
} else {
 +
h = ( 60 * ( r - g ) / diff ) + 240;
 +
}
 +
 
 +
// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
 +
// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
 +
if ( diff === 0 ) {
 +
s = 0;
 +
} else if ( l <= 0.5 ) {
 +
s = diff / add;
 +
} else {
 +
s = diff / ( 2 - add );
 +
}
 +
return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
 +
};
 +
 
 +
spaces.hsla.from = function ( hsla ) {
 +
if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
 +
return [ null, null, null, hsla[ 3 ] ];
 +
}
 +
var h = hsla[ 0 ] / 360,
 +
s = hsla[ 1 ],
 +
l = hsla[ 2 ],
 +
a = hsla[ 3 ],
 +
q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
 +
p = 2 * l - q;
 +
 
 +
return [
 +
Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
 +
Math.round( hue2rgb( p, q, h ) * 255 ),
 +
Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
 +
a
 +
];
 +
};
 +
 
 +
 
 +
each( spaces, function( spaceName, space ) {
 +
var props = space.props,
 +
cache = space.cache,
 +
to = space.to,
 +
from = space.from;
 +
 
 +
// makes rgba() and hsla()
 +
color.fn[ spaceName ] = function( value ) {
 +
 
 +
// generate a cache for this space if it doesn't exist
 +
if ( !(!to || this[ cache ]) ) {
 +
this[ cache ] = to( this._rgba );
 +
}
 +
if ( value === undefined ) {
 +
return this[ cache ].slice();
 +
}
 +
 
 +
var ret,
 +
type = jQuery.type( value ),
 +
arr = ( type === "array" || type === "object" ) ? value : arguments,
 +
local = this[ cache ].slice();
 +
 
 +
each( props, function( key, prop ) {
 +
var val = arr[ type === "object" ? key : prop.idx ];
 +
if ( val == null ) {
 +
val = local[ prop.idx ];
 +
}
 +
local[ prop.idx ] = clamp( val, prop );
 +
});
 +
 
 +
if ( from ) {
 +
ret = color( from( local ) );
 +
ret[ cache ] = local;
 +
return ret;
 +
} else {
 +
return color( local );
 +
}
 +
};
 +
 
 +
// makes red() green() blue() alpha() hue() saturation() lightness()
 +
each( props, function( key, prop ) {
 +
// alpha is included in more than one space
 +
if ( color.fn[ key ] ) {
 +
return;
 +
}
 +
color.fn[ key ] = function( value ) {
 +
var vtype = jQuery.type( value ),
 +
fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
 +
local = this[ fn ](),
 +
cur = local[ prop.idx ],
 +
match;
 +
 
 +
if ( vtype === "undefined" ) {
 +
return cur;
 +
}
 +
 
 +
if ( vtype === "function" ) {
 +
value = value.call( this, cur );
 +
vtype = jQuery.type( value );
 +
}
 +
if ( !(value != null || !prop.empty) ) {
 +
return this;
 +
}
 +
if ( vtype === "string" ) {
 +
match = rplusequals.exec( value );
 +
if ( match ) {
 +
value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
 +
}
 +
}
 +
local[ prop.idx ] = value;
 +
return this[ fn ]( local );
 +
};
 +
});
 +
});
 +
 
 +
// add cssHook and .fx.step function for each named hook.
 +
// accept a space separated string of properties
 +
color.hook = function( hook ) {
 +
var hooks = hook.split( " " );
 +
each( hooks, function( i, hook ) {
 +
jQuery.cssHooks[ hook ] = {
 +
set: function( elem, value ) {
 +
var parsed, curElem,
 +
backgroundColor = "";
 +
 
 +
if ( !(value === "transparent" || !( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) ) {
 +
value = color( parsed || value );
 +
if ( !(support.rgba || value._rgba[ 3 ] === 1) ) {
 +
curElem = hook === "backgroundColor" ? elem.parentNode : elem;
 +
while (
 +
!(!(backgroundColor === "" || backgroundColor === "transparent") ||
 +
!curElem || !curElem.style)
 +
) {
 +
try {
 +
backgroundColor = jQuery.css( curElem, "backgroundColor" );
 +
curElem = curElem.parentNode;
 +
} catch ( e ) {
 +
}
 +
}
 +
 
 +
value = value.blend( !(!backgroundColor || backgroundColor === "transparent") ?
 +
backgroundColor :
 +
"_default" );
 +
}
 +
 
 +
value = value.toRgbaString();
 +
}
 +
try {
 +
elem.style[ hook ] = value;
 +
} catch( e ) {
 +
// wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
 +
}
 +
}
 +
};
 +
jQuery.fx.step[ hook ] = function( fx ) {
 +
if ( !fx.colorInit ) {
 +
fx.start = color( fx.elem, hook );
 +
fx.end = color( fx.end );
 +
fx.colorInit = true;
 +
}
 +
jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
 +
};
 +
});
 +
 
 +
};
 +
 
 +
color.hook( stepHooks );
 +
 
 +
jQuery.cssHooks.borderColor = {
 +
expand: function( value ) {
 +
var expanded = {};
 +
 
 +
each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
 +
expanded[ "border" + part + "Color" ] = value;
 +
});
 +
return expanded;
 +
}
 +
};
 +
 
 +
// Basic color names only.
 +
// Usage of any of the other color names requires adding yourself or including
 +
// jquery.color.svg-names.js.
 +
colors = jQuery.Color.names = {
 +
// 4.1. Basic color keywords
 +
aqua: "#00ffff",
 +
black: "#000000",
 +
blue: "#0000ff",
 +
fuchsia: "#ff00ff",
 +
gray: "#808080",
 +
green: "#008000",
 +
lime: "#00ff00",
 +
maroon: "#800000",
 +
navy: "#000080",
 +
olive: "#808000",
 +
purple: "#800080",
 +
red: "#ff0000",
 +
silver: "#c0c0c0",
 +
teal: "#008080",
 +
white: "#ffffff",
 +
yellow: "#ffff00",
 +
 
 +
// 4.2.3. "transparent" color keyword
 +
transparent: [ null, null, null, 0 ],
 +
 
 +
_default: "#ffffff"
 +
};
 +
 
 +
}( jQuery ));
 
     var scroll_pos = 0;
 
     var scroll_pos = 0;
 
     var animation_begin_pos = 0; //where you want the animation to begin
 
     var animation_begin_pos = 0; //where you want the animation to begin

Revision as of 08:29, 28 June 2015