
(function(){var
window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this;}
if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])
selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3])
return jQuery().find(selector);var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret;}}else
return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))
return jQuery(document).ready(selector);if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context;}
return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector));},selector:"",jquery:"1.3.2",size:function(){return this.length;},get:function(num){return num===undefined?Array.prototype.slice.call(this):this[num];},pushStack:function(elems,name,selector){var ret=jQuery(elems);ret.prevObject=this;ret.context=this.context;if(name==="find")
ret.selector=this.selector+(this.selector?" ":"")+selector;else if(name)
ret.selector=this.selector+"."+name+"("+selector+")";return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(typeof name==="string")
if(value===undefined)
return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}
return this.each(function(i){for(name in options)
jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)
value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!=="object"&&text!=null)
return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)
ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).clone();if(this[0].parentNode)
wrap.insertBefore(this[0]);wrap.map(function(){var elem=this;while(elem.firstChild)
elem=elem.firstChild;return elem;}).append(this);}
return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1)
this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1)
this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},push:[].push,sort:[].sort,splice:[].splice,find:function(selector){if(this.length===1){var ret=this.pushStack([],"find",selector);ret.length=0;jQuery.find(selector,this[0],ret);return ret;}else{return this.pushStack(jQuery.unique(jQuery.map(this,function(elem){return jQuery.find(selector,elem);})),"find",selector);}},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML;if(!html){var div=this.ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML;}
return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0];}else
return this.cloneNode(true);});if(events===true){var orig=this.find("*").andSelf(),i=0;ret.find("*").andSelf().each(function(){if(this.nodeName!==orig[i].nodeName)
return;var events=jQuery.data(orig[i],"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data);}}
i++;});}
return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,jQuery.grep(this,function(elem){return elem.nodeType===1;})),"filter",selector);},closest:function(selector){var pos=jQuery.expr.match.POS.test(selector)?jQuery(selector):null,closer=0;return this.map(function(){var cur=this;while(cur&&cur.ownerDocument){if(pos?pos.index(cur)>-1:jQuery(cur).is(selector)){jQuery.data(cur,"closest",closer);return cur;}
cur=cur.parentNode;closer++;}});},not:function(selector){if(typeof selector==="string")
if(isSimple.test(selector))
return this.pushStack(jQuery.multiFilter(selector,this,true),"not",selector);else
selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector==="string"?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return!!selector&&this.is("."+selector);},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,'option'))
return(elem.attributes.value||{}).specified?elem.value:elem.text;if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)
return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery(option).val();if(one)
return value;values.push(value);}}
return values;}
return(elem.value||"").replace(/\r/g,"");}
return undefined;}
if(typeof value==="number")
value+='';return this.each(function(){if(this.nodeType!=1)
return;if(jQuery.isArray(value)&&/radio|checkbox/.test(this.type))
this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)
this.selectedIndex=-1;}else
this.value=value;});},html:function(value){return value===undefined?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,+i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(args,table,callback){if(this[0]){var fragment=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(args,(this[0].ownerDocument||this[0]),fragment),first=fragment.firstChild;if(first)
for(var i=0,l=this.length;i<l;i++)
callback.call(root(this[i],first),this.length>1||i>0?fragment.cloneNode(true):fragment);if(scripts)
jQuery.each(scripts,evalScript);}
return this;function root(elem,cur){return table&&jQuery.nodeName(elem,"table")&&jQuery.nodeName(cur,"tr")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem;}}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)
jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)
elem.parentNode.removeChild(elem);}
function now(){return+new Date;}
jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;}
if(typeof target!=="object"&&!jQuery.isFunction(target))
target={};if(length==i){target=this;--i;}
for(;i<length;i++)
if((options=arguments[i])!=null)
for(var name in options){var src=target[name],copy=options[name];if(target===copy)
continue;if(deep&&copy&&typeof copy==="object"&&!copy.nodeType)
target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)
target[name]=copy;}
return target;};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{},toString=Object.prototype.toString;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)
window.jQuery=_jQuery;return jQuery;},isFunction:function(obj){return toString.call(obj)==="[object Function]";},isArray:function(obj){return toString.call(obj)==="[object Array]";},isXMLDoc:function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&jQuery.isXMLDoc(elem.ownerDocument);},globalEval:function(data){if(data&&/\S/.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval)
script.appendChild(document.createTextNode(data));else
script.text=data;head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length===undefined){for(name in object)
if(callback.apply(object[name],args)===false)
break;}else
for(;i<length;)
if(callback.apply(object[i++],args)===false)
break;}else{if(length===undefined){for(name in object)
if(callback.call(object[name],name,object[name])===false)
break;}else
for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}
return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))
value=value.call(elem,i);return typeof value==="number"&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))
elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)
elem.className=classNames!==undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return elem&&jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}
callback.call(elem);for(var name in options)
elem.style[name]=old[name];},css:function(elem,name,force,extra){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border")
return;jQuery.each(which,function(){if(!extra)
val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;if(extra==="margin")
val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0;else
val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});}
if(elem.offsetWidth!==0)
getWH();else
jQuery.swap(elem,props,getWH);return Math.max(0,Math.round(val));}
return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;if(name=="opacity"&&!jQuery.support.opacity){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}
if(name.match(/float/i))
name=styleFloat;if(!force&&style&&style[name])
ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))
name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle)
ret=computedStyle.getPropertyValue(name);if(name=="opacity"&&ret=="")
ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}
return ret;},clean:function(elems,context,fragment){context=context||document;if(typeof context.createElement==="undefined")
context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;if(!fragment&&elems.length===1&&typeof elems[0]==="string"){var match=/^<(\w+)\s*\/?>$/.exec(elems[0]);if(match)
return[context.createElement(match[1])];}
var ret=[],scripts=[],div=context.createElement("div");jQuery.each(elems,function(i,elem){if(typeof elem==="number")
elem+='';if(!elem)
return;if(typeof elem==="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!jQuery.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)
div=div.lastChild;if(!jQuery.support.tbody){var hasBody=/<tbody/i.test(elem),tbody=!tags.indexOf("<table")&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)
if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)
tbody[j].parentNode.removeChild(tbody[j]);}
if(!jQuery.support.leadingWhitespace&&/^\s/.test(elem))
div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);elem=jQuery.makeArray(div.childNodes);}
if(elem.nodeType)
ret.push(elem);else
ret=jQuery.merge(ret,elem);});if(fragment){for(var i=0;ret[i];i++){if(jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i]);}else{if(ret[i].nodeType===1)
ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))));fragment.appendChild(ret[i]);}}
return scripts;}
return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)
return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&elem.parentNode)
elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)
throw"type property can't be changed";elem[name]=value;}
if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))
return elem.getAttributeNode(name).nodeValue;if(name=="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:elem.nodeName.match(/(button|input|object|select|textarea)/i)?0:elem.nodeName.match(/^(a|area)$/i)&&elem.href?0:undefined;}
return elem[name];}
if(!jQuery.support.style&&notxml&&name=="style")
return jQuery.attr(elem.style,"cssText",value);if(set)
elem.setAttribute(name,""+value);var attr=!jQuery.support.hrefNormalized&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}
if(!jQuery.support.opacity&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+
(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}
return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}
name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)
elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||typeof array==="string"||jQuery.isFunction(array)||array.setInterval)
ret[0]=array;else
while(i)
ret[--i]=array[i];}
return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)
if(array[i]===elem)
return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(!jQuery.support.getAll){while((elem=second[i++])!=null)
if(elem.nodeType!=8)
first[pos++]=elem;}else
while((elem=second[i++])!=null)
first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}
return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)
if(!inv!=!callback(elems[i],i))
ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)
ret[ret.length]=value;}
return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,'0'])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")
ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret),name,selector);};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector);for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems);}
return this.pushStack(ret,name,selector);};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)
this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames,state){if(typeof state!=="boolean")
state=!jQuery.className.has(this,classNames);jQuery.className[state?"add":"remove"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).length){jQuery("*",this).add([this]).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)
this.parentNode.removeChild(this);}},empty:function(){jQuery(this).children().remove();while(this.firstChild)
this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}
var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)
id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])
jQuery.cache[id]={};if(data!==undefined)
jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])
break;if(!name)
jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)
elem.removeAttribute(expando);}
delete jQuery.cache[id];}},queue:function(elem,type,data){if(elem){type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!q||jQuery.isArray(data))
q=jQuery.data(elem,type,jQuery.makeArray(data));else if(data)
q.push(data);}
return q;},dequeue:function(elem,type){var queue=jQuery.queue(elem,type),fn=queue.shift();if(!type||type==="fx")
fn=queue[0];if(fn!==undefined)
fn.call(elem);}});jQuery.fn.extend({data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)
data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},queue:function(type,data){if(typeof type!=="string"){data=type;type="fx";}
if(data===undefined)
return jQuery.queue(this[0],type);return this.each(function(){var queue=jQuery.queue(this,type,data);if(type=="fx"&&queue.length==1)
queue[0].call(this);});},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type);});}});(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString;var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;if(context.nodeType!==1&&context.nodeType!==9)
return[];if(!selector||typeof selector!=="string"){return results;}
var parts=[],m,set,checkSet,check,mode,extra,prune=true;chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break;}}
if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector])
selector+=parts.shift();set=posProcess(selector,set);}}}else{var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&context.parentNode?context.parentNode:context,isXML(context));set=Sizzle.filter(ret.expr,ret.set);if(parts.length>0){checkSet=makeArray(set);}else{prune=false;}
while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();}
if(pop==null){pop=context;}
Expr.relative[cur](checkSet,pop,isXML(context));}}
if(!checkSet){checkSet=set;}
if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector);}
if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else if(context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}else{makeArray(checkSet,results);}
if(extra){Sizzle(extra,context,results,seed);if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1);}}}}}
return results;};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set);};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[];}
for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.match[type].exec(expr))){var left=RegExp.leftContext;if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break;}}}}
if(!set){set=context.getElementsByTagName("*");}
return{set:set,expr:expr};};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[];}
if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true;}else if(match===true){continue;}}
if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true;}else{curLoop[i]=false;}}else if(pass){result.push(item);anyFound=true;}}}}
if(found!==undefined){if(!inplace){curLoop=result;}
expr=expr.replace(Expr.match[type],"");if(!anyFound){return[];}
break;}}}
if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr;}else{break;}}
old=expr;}
return curLoop;};var Expr=Sizzle.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(elem){return elem.getAttribute("href");}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase();}
for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}
checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part;}}
if(isPartStrNotTag){Sizzle.filter(part,checkSet,true);}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false;}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part;}}
if(isPartStr){Sizzle.filter(part,checkSet,true);}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}
checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML);},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}
checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML);}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[];}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i]);}}
return ret.length===0?null:ret;}},TAG:function(match,context){return context.getElementsByTagName(match[1]);}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match;}
for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace)
result.push(elem);}else if(inplace){curLoop[i]=false;}}}
return false;},ID:function(match){return match[1].replace(/\\/g,"");},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}
return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase();},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;}
match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];}
if(match[2]==="~="){match[4]=" "+match[4]+" ";}
return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);}
return false;}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;}
return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true;},parent:function(elem){return!!elem.firstChild;},empty:function(elem){return!elem.firstChild;},has:function(elem,i,match){return!!Sizzle(match[3],elem).length;},header:function(elem){return/h\d/i.test(elem.nodeName);},text:function(elem){return"text"===elem.type;},radio:function(elem){return"radio"===elem.type;},checkbox:function(elem){return"checkbox"===elem.type;},file:function(elem){return"file"===elem.type;},password:function(elem){return"password"===elem.type;},submit:function(elem){return"submit"===elem.type;},image:function(elem){return"image"===elem.type;},reset:function(elem){return"reset"===elem.type;},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON";},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName);}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return i<match[3]-0;},gt:function(elem,i,match){return i>match[3]-0;},nth:function(elem,i,match){return match[3]-0==i;},eq:function(elem,i,match){return match[3]-0==i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0;}else if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false;}}
return true;}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case'only':case'first':while(node=node.previousSibling){if(node.nodeType===1)return false;}
if(type=='first')return true;node=elem;case'last':while(node=node.nextSibling){if(node.nodeType===1)return false;}
return true;case'nth':var first=match[2],last=match[3];if(first==1&&last==0){return true;}
var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count;}}
parent.sizcache=doneName;}
var diff=elem.nodeIndex-last;if(first==0){return diff==0;}else{return(diff%first==0&&diff/first>=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);}
var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results;}
return array;};try{Array.prototype.slice.call(document.documentElement.childNodes);}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i]);}}else{for(var i=0;array[i];i++){ret.push(array[i]);}}}
return ret;};}
var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true;}
return ret;};}else if("sourceIndex"in document.documentElement){sortOrder=function(a,b){var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true;}
return ret;};}else if(document.createRange){sortOrder=function(a,b){var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.selectNode(a);aRange.collapse(true);bRange.selectNode(b);bRange.collapse(true);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true;}
return ret;};}
(function(){var form=document.createElement("form"),id="script"+(new Date).getTime();form.innerHTML="<input name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};}
root.removeChild(form);})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}}
results=tmp;}
return results;};}
div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};}})();if(document.querySelectorAll)(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;}
Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra);}catch(e){}}
return oldSizzle(query,context,extra,seed);};Sizzle.find=oldSizzle.find;Sizzle.filter=oldSizzle.filter;Sizzle.selectors=oldSizzle.selectors;Sizzle.matches=oldSizzle.matches;})();if(document.getElementsByClassName&&document.documentElement.getElementsByClassName)(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0)
return;div.lastChild.className="e";if(div.getElementsByClassName("e").length===1)
return;Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}
elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(elem.nodeName===cur){match=elem;break;}
elem=elem[dir];}
checkSet[i]=match;}}}
function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}
elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(typeof cur!=="string"){if(elem===cur){match=true;break;}}else if(Sizzle.filter(cur,[elem]).length>0){match=elem;break;}}
elem=elem[dir];}
checkSet[i]=match;}}}
var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16;}:function(a,b){return a!==b&&(a.contains?a.contains(b):true);};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&isXML(elem.ownerDocument);};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");}
selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet);}
return Sizzle.filter(later,tmpSet);};jQuery.find=Sizzle;jQuery.filter=Sizzle.filter;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;Sizzle.selectors.filters.hidden=function(elem){return elem.offsetWidth===0||elem.offsetHeight===0;};Sizzle.selectors.filters.visible=function(elem){return elem.offsetWidth>0||elem.offsetHeight>0;};Sizzle.selectors.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};jQuery.multiFilter=function(expr,elems,not){if(not){expr=":not("+expr+")";}
return Sizzle.matches(expr,elems);};jQuery.dir=function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)
matched.push(cur);cur=cur[dir];}
return matched;};jQuery.nth=function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])
if(cur.nodeType==1&&++num==result)
break;return cur;};jQuery.sibling=function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)
r.push(n);}
return r;};return;window.Sizzle=Sizzle;})();jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)
return;if(elem.setInterval&&elem!=window)
elem=window;if(!handler.guid)
handler.guid=this.guid++;if(data!==undefined){var fn=handler;handler=this.proxy(fn);handler.data=data;}
var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(arguments.callee.elem,arguments):undefined;});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();handler.type=namespaces.slice().sort().join(".");var handlers=events[type];if(jQuery.event.specialAll[type])
jQuery.event.specialAll[type].setup.call(elem,data,namespaces);if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem,data,namespaces)===false){if(elem.addEventListener)
elem.addEventListener(type,handle,false);else if(elem.attachEvent)
elem.attachEvent("on"+type,handle);}}
handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)
return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types===undefined||(typeof types==="string"&&types.charAt(0)=="."))
for(var type in events)
this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}
jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");if(events[type]){if(handler)
delete events[type][handler.guid];else
for(var handle in events[type])
if(namespace.test(events[type][handle].type))
delete events[type][handle];if(jQuery.event.specialAll[type])
jQuery.event.specialAll[type].teardown.call(elem,namespaces);for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem,namespaces)===false){if(elem.removeEventListener)
elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)
elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}
ret=null;delete events[type];}}});}
for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(event,data,elem,bubbling){var type=event.type||event;if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true;}
if(!elem){event.stopPropagation();if(this.global[type])
jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type])
jQuery.event.trigger(event,data,this.handle.elem);});}
if(!elem||elem.nodeType==3||elem.nodeType==8)
return undefined;event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event);}
event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle)
handle.apply(elem,data);if((!elem[type]||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)
event.result=false;if(!bubbling&&elem[type]&&!event.isDefaultPrevented()&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}
this.triggered=false;if(!event.isPropagationStopped()){var parent=elem.parentNode||elem.ownerDocument;if(parent)
jQuery.event.trigger(event,data,parent,true);}},handle:function(event){var all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;var namespaces=event.type.split(".");event.type=namespaces.shift();all=!namespaces.length&&!event.exclusive;var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||namespace.test(handler.type)){event.handler=handler;event.data=handler.data;var ret=handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}
if(event.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(event){if(event[expando])
return event;var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop];}
if(!event.target)
event.target=event.srcElement||document;if(event.target.nodeType==3)
event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)
event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}
if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))
event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)
event.metaKey=event.ctrlKey;if(!event.which&&event.button)
event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy=proxy||function(){return fn.apply(this,arguments);};proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:bindReady,teardown:function(){}}},specialAll:{live:{setup:function(selector,namespaces){jQuery.event.add(this,namespaces[0],liveHandler);},teardown:function(namespaces){if(namespaces.length){var remove=0,name=RegExp("(^|\\.)"+namespaces[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type))
remove++;});if(remove<1)
jQuery.event.remove(this,namespaces[0],liveHandler);}}}}};jQuery.Event=function(src){if(!this.preventDefault)
return new jQuery.Event(src);if(src&&src.type){this.originalEvent=src;this.type=src.type;}else
this.type=src;this.timeStamp=now();this[expando]=true;};function returnFalse(){return false;}
function returnTrue(){return true;}
jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e)
return;if(e.preventDefault)
e.preventDefault();e.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e)
return;if(e.stopPropagation)
e.stopPropagation();e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;while(parent&&parent!=this)
try{parent=parent.parentNode;}
catch(e){parent=this;}
if(parent!=this){event.type=event.data;jQuery.event.handle.apply(this,arguments);}};jQuery.each({mouseover:'mouseenter',mouseout:'mouseleave'},function(orig,fix){jQuery.event.special[fix]={setup:function(){jQuery.event.add(this,orig,withinElement,fix);},teardown:function(){jQuery.event.remove(this,orig,withinElement);}};});jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result;}},toggle:function(fn){var args=arguments,i=1;while(i<args.length)
jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)
fn.call(document,jQuery);else
jQuery.readyList.push(fn);return this;},live:function(type,fn){var proxy=jQuery.event.proxy(fn);proxy.guid+=this.selector+type;jQuery(document).bind(liveConvert(type,this.selector),this.selector,proxy);return this;},die:function(type,fn){jQuery(document).unbind(liveConvert(type,this.selector),fn?{guid:fn.guid+this.selector+type}:null);return this;}});function liveHandler(event){var check=RegExp("(^|\\.)"+event.type+"(\\.|$)"),stop=true,elems=[];jQuery.each(jQuery.data(this,"events").live||[],function(i,fn){if(check.test(fn.type)){var elem=jQuery(event.target).closest(fn.data)[0];if(elem)
elems.push({elem:elem,fn:fn});}});elems.sort(function(a,b){return jQuery.data(a.elem,"closest")-jQuery.data(b.elem,"closest");});jQuery.each(elems,function(){if(this.fn.call(this.elem,event,this.fn.data)===false)
return(stop=false);});return stop;}
function liveConvert(type,selector){return["live",type,selector.replace(/\./g,"`").replace(/ /g,"|")].join(".");}
jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document,jQuery);});jQuery.readyList=null;}
jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);jQuery.ready();},false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);jQuery.ready();}});if(document.documentElement.doScroll&&window==window.top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}
jQuery.ready();})();}
jQuery.event.add(window,"load",jQuery.ready);}
jQuery.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(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});jQuery(window).bind('unload',function(){for(var id in jQuery.cache)
if(id!=1&&jQuery.cache[id].handle)
jQuery.event.remove(jQuery.cache[id].handle.elem);});(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+(new Date).getTime();div.style.display="none";div.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 all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return;}
jQuery.support={leadingWhitespace:div.firstChild.nodeType==3,tbody:!div.getElementsByTagName("tbody").length,objectAll:!!div.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"));}catch(e){}
root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id];}
root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",arguments.callee);});div.cloneNode(true).fireEvent("onclick");}
jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display='none';});root=script=div=all=a=null;})();var styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat";jQuery.props={"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!=="string")
return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}
var type="GET";if(params)
if(jQuery.isFunction(params)){callback=params;params=null;}else if(typeof params==="object"){params=jQuery.param(params);type="POST";}
var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")
self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);if(callback)
self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?jQuery.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(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}
return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}
return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return window.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(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string")
s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))
s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))
s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}
if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)
s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}
if(head)
head.removeChild(script);};}
if(s.dataType=="script"&&s.cache==null)
s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}
if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}
if(s.global&&!jQuery.active++)
jQuery.event.trigger("ajaxStart");var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=location.host)){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)
script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();script.onload=script.onreadystatechange=null;head.removeChild(script);}};}
head.appendChild(script);return undefined;}
var requestDone=false;var xhr=s.xhr();if(s.username)
xhr.open(type,s.url,s.async,s.username,s.password);else
xhr.open(type,s.url,s.async);try{if(s.data)
xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)
xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}
if(s.beforeSend&&s.beforeSend(xhr,s)===false){if(s.global&&!--jQuery.active)
jQuery.event.trigger("ajaxStop");xhr.abort();return false;}
if(s.global)
jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(xhr.readyState==0){if(ival){clearInterval(ival);ival=null;if(s.global&&!--jQuery.active)
jQuery.event.trigger("ajaxStop");}}else if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}
status=isTimeout=="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s);}catch(e){status="parsererror";}}
if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}
if(s.ifModified&&modRes)
jQuery.lastModified[s.url]=modRes;if(!jsonp)
success();}else
jQuery.handleError(s,xhr,status);complete();if(isTimeout)
xhr.abort();if(s.async)
xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)
setTimeout(function(){if(xhr&&!requestDone)
onreadystatechange("timeout");},s.timeout);}
try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}
if(!s.async)
onreadystatechange();function success(){if(s.success)
s.success(data,status);if(s.global)
jQuery.event.trigger("ajaxSuccess",[xhr,s]);}
function complete(){if(s.complete)
s.complete(xhr,status);if(s.global)
jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)
jQuery.event.trigger("ajaxStop");}
return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)
jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223;}catch(e){}
return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url];}catch(e){}
return false;},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")
throw"parsererror";if(s&&s.dataFilter)
data=s.dataFilter(data,type);if(typeof data==="string"){if(type=="script")
jQuery.globalEval(data);if(type=="json")
data=window["eval"]("("+data+")");}
return data;},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+'='+encodeURIComponent(value);};if(jQuery.isArray(a)||a.jquery)
jQuery.each(a,function(){add(this.name,this.value);});else
for(var j in a)
if(jQuery.isArray(a[j]))
jQuery.each(a[j],function(){add(j,this);});else
add(j,jQuery.isFunction(a[j])?a[j]():a[j]);return s.join("&").replace(/%20/g,"+");}});var elemdisplay={},timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type;});return obj;}
jQuery.fn.extend({show:function(speed,callback){if(speed){return this.animate(genFx("show",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var tagName=this[i].tagName,display;if(elemdisplay[tagName]){display=elemdisplay[tagName];}else{var elem=jQuery("<"+tagName+" />").appendTo("body");display=elem.css("display");if(display==="none")
display="block";elem.remove();elemdisplay[tagName]=display;}
jQuery.data(this[i],"olddisplay",display);}}
for(var i=0,l=this.length;i<l;i++){this[i].style.display=jQuery.data(this[i],"olddisplay")||"";}
return this;}},hide:function(speed,callback){if(speed){return this.animate(genFx("hide",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none")
jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"));}
for(var i=0,l=this.length;i<l;i++){this[i].style.display="none";}
return this;}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn==null||bool?this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]();}):this.animate(genFx("toggle",3),fn,fn2);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType==1&&jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)
return opt.complete.call(this);if((p=="height"||p=="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}
if(opt.overflow!=null)
this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))
e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}
if(parts[1])
end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
e.custom(start,val,"");}});return true;});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)
this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)
if(timers[i].elem==this){if(gotoEnd)
timers[i](true);timers.splice(i,1);}});if(!gotoEnd)
this.dequeue();return this;}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback);};});jQuery.extend({speed:function(speed,easing,fn){var opt=typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)
jQuery(this).dequeue();if(jQuery.isFunction(opt.old))
opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)
options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)
this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style)
this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))
return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd);}
t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)
if(!timers[i]())
timers.splice(i--,1);if(!timers.length){clearInterval(timerId);timerId=undefined;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)
if(this.options.curAnim[i]!==true)
done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")
this.elem.style.display="block";}
if(this.options.hide)
jQuery(this.elem).hide();if(this.options.hide||this.options.show)
for(var p in this.options.curAnim)
jQuery.attr(this.elem.style,p,this.options.orig[p]);this.options.complete.call(this.elem);}
return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}
return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null)
fx.elem.style[fx.prop]=fx.now+fx.unit;else
fx.elem[fx.prop]=fx.now;}}});if(document.documentElement["getBoundingClientRect"])
jQuery.fn.offset=function(){if(!this[0])return{top:0,left:0};if(this[0]===this[0].ownerDocument.body)return jQuery.offset.bodyOffset(this[0]);var box=this[0].getBoundingClientRect(),doc=this[0].ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left};};else
jQuery.fn.offset=function(){if(!this[0])return{top:0,left:0};if(this[0]===this[0].ownerDocument.body)return jQuery.offset.bodyOffset(this[0]);jQuery.offset.initialized||jQuery.offset.initialize();var elem=this[0],offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView.getComputedStyle(elem,null),top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){computedStyle=defaultView.getComputedStyle(elem,null);top-=elem.scrollTop,left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop,left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.tagName)))
top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0;prevOffsetParent=offsetParent,offsetParent=elem.offsetParent;}
if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible")
top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0;prevComputedStyle=computedStyle;}
if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static")
top+=body.offsetTop,left+=body.offsetLeft;if(prevComputedStyle.position==="fixed")
top+=Math.max(docElem.scrollTop,body.scrollTop),left+=Math.max(docElem.scrollLeft,body.scrollLeft);return{top:top,left:left};};jQuery.offset={initialize:function(){if(this.initialized)return;var body=document.body,container=document.createElement('div'),innerDiv,checkDiv,table,td,rules,prop,bodyMarginTop=body.style.marginTop,html='<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>';rules={position:'absolute',top:0,left:0,margin:0,border:0,width:'1px',height:'1px',visibility:'hidden'};for(prop in rules)container.style[prop]=rules[prop];container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild,checkDiv=innerDiv.firstChild,td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);innerDiv.style.overflow='hidden',innerDiv.style.position='relative';this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);body.style.marginTop='1px';this.doesNotIncludeMarginInBodyOffset=(body.offsetTop===0);body.style.marginTop=bodyMarginTop;body.removeChild(container);this.initialized=true;},bodyOffset:function(body){jQuery.offset.initialized||jQuery.offset.initialize();var top=body.offsetTop,left=body.offsetLeft;if(jQuery.offset.doesNotIncludeMarginInBodyOffset)
top+=parseInt(jQuery.curCSS(body,'marginTop',true),10)||0,left+=parseInt(jQuery.curCSS(body,'marginLeft',true),10)||0;return{top:top,left:left};}};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}
return results;},offsetParent:function(){var offsetParent=this[0].offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))
offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return null;return val!==undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom",lower=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],lower,false,"padding"):null;};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],lower,false,margin?"margin":"border"):null;};var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(document.documentElement["client"+name],document.body["scroll"+name],document.documentElement["scroll"+name],document.body["offset"+name],document.documentElement["offset"+name]):size===undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,typeof size==="string"?size:size+"px");};});})();

var BlueGrass={};if(typeof(MarketWatch)=="undefined")
var MarketWatch=new(function(){this.Sample={area:"sample"};this.Section={area:"section"};this.Investing={area:"investing"};this.Story={area:"story"};this.News={area:"news"};this.Community={area:"community"};this.Community.InstrumentPicker={area:"community"};this.Search={area:"search"};this.MarketState={component:"marketstate"};this.Member={component:"member"};this.DockingBar={component:"dockingbar"};this.DockingBar.Portfolio={component:"dockingbar"};this.DayParting={component:"dayparting"};this.MarketsNews={component:"marketsnews"};this.Panels={component:"panels"};this.Kiosk={component:"kiosk"};this.BreakingNews={component:"breakingnews"};this.MultiQuote={component:"multiquote"};this.Investing.AdvancedCharts={area:"investing"};this.Investing.AdvancedCharts.Cookie={area:"investing"};this.UI={component:"ui"};this.FishHawk={component:"fishhawk"};var _baseUrl="";this.setBaseUrl=function(url){_baseUrl=url;};this.getBaseUrl=function(){return _baseUrl;};})();if(typeof(string)=="undefined"){var string=(new function(){return{IsNullOrEmpty:function(theString){return(typeof(theString)=="undefined"||!theString||theString.length==0);}}}());}
else{string.IsNullOrEmpty=function(theString){return(typeof(theString)=="undefined"||!theString||theString.length==0);}}
String.prototype.IndexOf=function(val){return this.indexOf(val);}
String.prototype.Substring=function(start){return this.substring(start);}
var Html=new(function(){var thunk=this;var _headlineModelLink=function(text,object,options){var area=options.area||options.Area||"story";var controller=options.controller||options.Controller||"story";var action=null;var guid=object.DocGuid;var attr=null;var queryString="guid="+object.DocGuid.Value;text=object.HeadlineText;if(options&&typeof(options.MaxLength)=="number")
text=text.substring(0,options.MaxLength);if(typeof(object.ContentType)=="number")
object.ContentType=_getContentType(object.ContentType);if(object.ContentType=="headline"){if(typeof(options.LinkDocType90)=="undefined"||options.LinkDocType90==null||options.LinkDocType90==true){if(object.Instruments&&object.Instruments.length>0&&object.Instruments[0].Ticker){if(typeof(options.LinkTickerAsHeadline)!="undefined"&&options.LinkTickerAsHeadline){return _instrumentModelLink(text,object.Instruments[0],{});}
return"["+_instrumentModelLink(object.Instruments[0].Ticker,object.Instruments[0],{})+"] "+text;}}
return text;}
else if(object.ContentType=="nofollow"){attr='rel="nofollow"';}
if(object.SeoHeadlineFragment&&object.SeoHeadlineFragment.length>0){controller=null;action=object.SeoHeadlineFragment.substr(1);queryString=null;}
return thunk.ActionLink(text,area,controller,action,queryString,attr);};var _instrumentModelLink=function(text,object,options){var area=options.area||options.Area||"investing";var controller=options.controller||options.Controller||"stock";if(!object.Ticker)
return;if(object.Type)
controller=_getInstrumentType(object.Type);if(!text||text.length==0)
text=object.Ticker
var area="investing";var action=object.Ticker+"/overview";var queryString="";if(object.CountryCode&&object.CountryCode.toLowerCase()!="us")
queryString="?countrycode="+object.CountryCode;return thunk.ActionLink(text,area,controller,action,queryString,null);};var _getContentType=function(type){switch(type){case 1:return"story";case 2:return"audio";case 3:return"video";case 4:return"nofollow";case 5:return"headline";}
return"story";};var _getInstrumentType=function(instrumentType){if(typeof(instrumentType)=="number"){switch(instrumentType){case 0:return"bond";case 2:return"currency";case 1:case 3:case 4:case 7:return"fund";case 5:return"future";case 6:return"index";case 8:case 9:case 10:return"option";}}
else if(instrumentType=="bond"||instrumentType=="currency"||instrumentType=="fund"||instrumentType=="future"||instrumentType=="index"||instrumentType=="option")
return instrumentType;return"stock";}
this.ModelLink=function(textOrObject,objectOrOptions,options){var text=textOrObject;var object=objectOrOptions;if(typeof(textOrObject)!="string"){text="";object=textOrObject;options=objectOrOptions;}
if(!options)options={};if(object.HeadlineText){return _headlineModelLink(text,object,options);}
else if(object.Ticker){return _instrumentModelLink(text,object,options);}};this.ActionLink=function(text,area,controller,action,queryString,attr){var link='<a '+(attr?attr:'')+' href="'+MarketWatch.getBaseUrl()+'/'+area+(controller?'/'+controller:'')+(action?'/'+action:'')+(queryString?'?'+queryString:'')+'">'+text+'</a>';return link;};this.GetShortDateStampMarkup=function(utcTimestamp,offset){if(typeof(BlueGrass)!="undefined"&&BlueGrass.Utility){var date=BlueGrass.Utility.convertToExchangeTime(utcTimestamp,offset);var now=new Date();var diff=now.getTime()-date.getTime();if(diff>86400000||now.getUTCDate()!=date.getUTCDate())
return"<span>"+date.dateFormat("m/d")+"</span>";var formatted=date.dateFormat("g:ia");return"<span>"+formatted.substring(0,formatted.length-1)+"</span>";}
return"<span>&nbsp;</span>";};this.GetTimeAgoMarkup=function(utcTimestamp,offset){if(typeof(BlueGrass)!="undefined"&&BlueGrass.Utility){var date=BlueGrass.Utility.convertToExchangeTime(utcTimestamp,offset);var now=new Date();var nowUtc=new Date().getTime();var easternNow=BlueGrass.Utility.convertToExchangeTime(nowUtc+"",offset);var diff=easternNow.getTime()-date.getTime();var formatted=date.dateFormat("g:ia Today");if(diff>86400000||now.getUTCDate()!=date.getUTCDate())
return"<span>"+date.dateFormat("g:ia n/d/y")+"</span>";else if(diff<=3600000){var ceiling=Math.ceil(diff/60000);if(ceiling==0)
formatted="< 1 min ago"
else
formatted=ceiling+" min ago";}
return"<span class='timeAgo'><span>"+formatted+"</span>"+"<span class='invisible'>"+date.dateFormat("g:ia n/d/y")+"</span></span>";}
return"<span>&nbsp;</span>";};this.GetShortTimeAgoMarkup=function(utcTimestamp,offset){if(typeof(BlueGrass)!="undefined"&&BlueGrass.Utility){var date=BlueGrass.Utility.convertToExchangeTime(utcTimestamp,offset);var now=new Date();var nowUtc=new Date().getTime();var easternNow=BlueGrass.Utility.convertToExchangeTime(nowUtc+"",offset);var diff=easternNow.getTime()-date.getTime();var formatted=date.dateFormat("g:ia");if(easternNow.getDay()!=date.getDay())
return"<span>"+date.dateFormat("n/d/y")+"</span>";else if(diff<=3600000){var ceiling=Math.ceil(diff/60000);if(ceiling==0)
formatted="< 1 min ago"
else
formatted=ceiling+" min ago";}
return"<span class='timeAgo short'><span>"+formatted+"</span>"+"<span class='invisible'>"+date.dateFormat("g:ia n/d/y")+"</span></span>";}
return"<span>&nbsp;</span>";};})();

$.extend(MarketWatch.Member,function(){MarketWatch.Member.UserLevel={unknown:0,mktw:1,community:2}
var _UserLevel=MarketWatch.Member.UserLevel.unknown;var signInDlgWidth=230,regDlgWidth=360,jitDlgWidth=640,jitCmtyDlg,jitMktwDlg,signInDlg,init=false,signInAnchor;var target=window.location.href;var _init=function(container){if(!init){var dialogs=$("#signInDialog, #jitCmtySignInDialog, #jitMktwSignInDialog");if(container)
dialogs=container;$("input.userName",dialogs).keydown(function(event){if(event.keyCode==$.ui.keyCode.ENTER){_submitLogin(this);}});$("input.password",dialogs).keydown(function(event){if(event.keyCode==$.ui.keyCode.ENTER){_submitLogin(this);}});$("input.login-button",dialogs).click(function(e){_submitLogin(this);});$("input.register-button",dialogs).click(function(e){var submit=true,span=$("#emailMsg")[0];if(span!=undefined){if(span.innerHTML.length>0){submit=false;$("#EmailAddress").focus();}}
if(submit){_submitRegistration(this);}});$("a.closeLink",dialogs).click(function(e){e.preventDefault();if($("#signInDialog")[0]!=undefined&&$("#signInDialog").dialog('isOpen')){$("#signInDialog").dialog('close');}else if($("#jitMktwSignInDialog")[0]!=undefined&&$("#jitMktwSignInDialog").dialog('isOpen')){$("#jitMktwSignInDialog").dialog('close');}else if($("#jitCmtySignInDialog")[0]!=undefined&&$("#jitCmtySignInDialog").dialog('isOpen')){$("#jitCmtySignInDialog").dialog('close');}});$("a.site-reg-link",dialogs).click(function(e){var href=$(this).attr("href");if(href!=undefined&&href.indexOf("returnURL")<0){href+=(href.indexOf("?")>=0)?"&":"?";href+='returnURL='+window.location.href;$(this).attr("href",href);}});$("#displayName").blur(function(){if($("#registerForm").validate().element("#displayName")){var c=$("#displayName")[0];var v=$(c).val();$.ajax({type:"POST",url:"CheckDisplayName",data:"displayName="+v,success:function(msg){$("#idAvailable")[0].innerHTML=msg;}});}});$("#displayName").keydown(function(){$("#idAvailable")[0].innerHTML='';});$("#EmailAddress").blur(function(){if($("#registerForm").validate().element("#EmailAddress")){var c=$("#EmailAddress")[0];var v=$(c).val();_checkEmailAddress(v);}});if(!container)
init=true;}}
var _submitLogin=function(element){var form=$(element).parents().find('form')[0];var ret=$(form).find("#returnUrl")[0];if(ret.value=="")
ret.value=target;var persist=$(form).find("#persist")[0];persist.value=$(form).find("input.remChk")[0].checked?"true":"false";form.submit();}
var _submitRegistration=function(element){var form=$(element).parents().find('form')[0];if($(form).validate().form()){form.submit();}}
var _signIn=function(e){_init();if(signInDlg==undefined){var ma=$("#memberarea");signInAnchor=new Array();if(ma!=undefined){var scrollTop=$(window).scrollTop();var scrollLeft=$(window).scrollLeft();signInAnchor[0]=((ma.position().left-scrollLeft)+ma.width()-signInDlgWidth-15);signInAnchor[1]=(ma.position().top+ma.height()-scrollTop);}
signInDlg=$("#signInDialog").dialog({bgiframe:true,autoOpen:false,width:signInDlgWidth,modal:false,position:[signInAnchor[0],signInAnchor[1]],draggable:false,resizable:false,zIndex:1000001});}
if(!$(signInDlg).dialog('isOpen')){e.preventDefault();$(signInDlg).dialog('open');$(signInDlg).find('input.userName').focus();}}
var _jitCmtyLogin=function(){_init();if(jitCmtyDlg==undefined){jitCmtyDlg=$("#jitCmtySignInDialog").dialog({bgiframe:true,autoOpen:false,width:jitDlgWidth,modal:true,position:'center',draggable:false,resizable:false,zIndex:1000000});}
$(jitCmtyDlg).dialog('open');$(jitCmtyDlg).find('input.userName').focus();}
var _jitMktwLogin=function(){_init();if(jitMktwDlg==undefined){jitMktwDlg=$("#jitMktwSignInDialog").dialog({bgiframe:true,autoOpen:false,width:jitDlgWidth,modal:true,position:'center',draggable:false,resizable:false,zIndex:1000000});}
$(jitMktwDlg).dialog('open');$(jitMktwDlg).find('input.userName').focus();}
var _recalcPosition=function(signInAnchor){var ma=$("#memberarea");if(ma!=undefined){var scrollTop=$(window).scrollTop();var scrollLeft=$(window).scrollLeft();var signInL=(ma.position().left-scrollLeft)+ma.width()-signInDlgWidth-15;var signInT=signInAnchor[1]-scrollTop;if(signInDlg){$(signInDlg).dialog('option','position',[signInL,signInT]);}}}
var _checkEmailAddress=function(address){$.ajax({type:"POST",url:"CheckEmailAddress",data:"email="+address,success:function(msg){$("#emailMsg")[0].innerHTML=msg;if(msg.length>0){$("#emailMsg").show();}else{$("#emailMsg").hide();}}});}
var _isMktwMember=function(){return(_UserLevel>=MarketWatch.Member.UserLevel.mktw);}
var _isCommunityMember=function(){return(_UserLevel>=MarketWatch.Member.UserLevel.community);}
var _checkLevel=function(e){if(($(this).hasClass("cmnty-asset")&&!_isCommunityMember())||($(this).hasClass("mktw-asset")&&!_isMktwMember()))
_jitLogin();}
var _bindAssets=function(e){e.preventDefault();var container=$(this);container.unbind("mouseover");container.find(".cmnty-asset").bind("click",function(e){e.preventDefault();if(!_isCommunityMember())
_jitCmtyLogin();});container.find(".mktw-asset").bind("click",function(e){e.preventDefault();if(!_isMktwMember())
_jitMktwLogin();});}
$(document).ready(function(){$('#signInLink').click(function(e){_signIn(e);});var dialogs=$("#signInDialog, #jitCmtySignInDialog, #jitMktwSignInDialog");$("div.assetContainer").mouseover(_bindAssets);$(window).scroll(function(e){if(signInAnchor){_recalcPosition(signInAnchor);}});$(window).resize(function(e){if(signInAnchor){_recalcPosition(signInAnchor);}});});return{init:function(){_init($("#maincontent"));},startCmtyJitLogin:function(targetHref){if(targetHref==undefined){target=window.location.href;}else{target=targetHref;}
_jitCmtyLogin();},startMktwJitLogin:function(targetHref){if(targetHref==undefined){target=window.location.href;}else{target=targetHref;}
_jitMktwLogin();},setUserLevel:function(level){_UserLevel=level;},isMktwMember:function(){return _isMktwMember();},isCommunityMember:function(){return _isCommunityMember();}};}());

var ScrillaZilla=function(){return{Escort:function(){var _clients=[];var _lateLoad=[];var _ghostLoad=[];var _commonData={};var _forwardData=function(data){for(var key in data)
_commonData[key]=data[key];for(var i=0;i<_clients.length;i++)
_clients[i].receive(data);}
var _newOrd=function(){return Math.ceil(Math.random()*100000000);}
var _getClient=function(eleId){if(!eleId)
return null;for(var i=0;i<_clients.length;i++){if(_clients[i].Element.attr("id")===eleId)
return _clients[i];}
return null;}
$(function(){setTimeout(function(){while(_lateLoad.length>0){var client=_lateLoad.shift();client.load();}
_lateLoad=null;while(_ghostLoad.length>0){var client=$(_ghostLoad.shift());if(client.length>0){}}
document.write=function(contents){var displayAd1=$("#ad_DisplayAd1");displayAd1.append(contents);displayAd1.css("width","auto");displayAd1.css("height","auto");};setTimeout(ScrillaZilla.Escort.getMoney,481000);},300);});return{getMoney:function(){var newOrd=_newOrd();var client=_getClient("ad_DisplayAd1");if(typeof(client)!="undefined"&&client&&client.Data.refresh)
client.update(newOrd);setTimeout(ScrillaZilla.Escort.getMoney,481000);},addClient:function(client){_clients.push(client);if(client.Data.lateLoad)
_lateLoad.push(client);return client;},getClient:function(eleId){return _getClient(eleId);},addGhostLoad:function(clientId){_ghostLoad.push(clientId);},newOrd:function(){var ord=_newOrd();return ord;}}}(),Client:function(element,data){var _element=$(element);var _data=data;return{Data:_data,Element:_element,load:function(callback){_element.html(this.createTag());},createTag:function(){if(_data.type==="script"){_element.width(_element.outerWidth());_element.height(_element.outerHeight());return"<script type=\"text/javascript\" src=\""+_data.src+_data.ord+"\"></script>";}
return"<iframe src=\""+_data.src+_data.ord+"?\" width=\""+_data.width+"\" height=\""+_data.height+"\" frameborder=\"0\" scrolling=\"no\" allowtransparency=\"true\" marginheight=\"0\" marginwidth=\"0\" border=\"0\"></iframe>"},update:function(newOrd){_data.ord=newOrd;_element.html(this.createTag());},receive:function(data){for(key in data)
_data[key]=data[key];}}}}}();

if(!document.createElement('canvas').getContext){(function(){var m=Math;var mr=m.round;var ms=m.sin;var mc=m.cos;var abs=m.abs;var sqrt=m.sqrt;var Z=10;var Z2=Z/2;function getContext(){return this.context_||(this.context_=new CanvasRenderingContext2D_(this));}
var slice=Array.prototype.slice;function bind(f,obj,var_args){var a=slice.call(arguments,2);return function(){return f.apply(obj,a.concat(slice.call(arguments)));};}
var G_vmlCanvasManager_={init:function(opt_doc){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var doc=opt_doc||document;doc.createElement('canvas');doc.attachEvent('onreadystatechange',bind(this.init_,this,doc));}},init_:function(doc){if(!doc.namespaces['g_vml_']){doc.namespaces.add('g_vml_','urn:schemas-microsoft-com:vml','#default#VML');}
if(!doc.namespaces['g_o_']){doc.namespaces.add('g_o_','urn:schemas-microsoft-com:office:office','#default#VML');}
if(!doc.styleSheets['ex_canvas_']){var ss=doc.createStyleSheet();ss.owningElement.id='ex_canvas_';ss.cssText='canvas{display:inline-block;overflow:hidden;'+'text-align:left;width:300px;height:150px}'+'g_vml_\\:*{behavior:url(#default#VML)}'+'g_o_\\:*{behavior:url(#default#VML)}';}
var els=doc.getElementsByTagName('canvas');for(var i=0;i<els.length;i++){this.initElement(els[i]);}},initElement:function(el,width,height){if(!el.getContext){this.width=width;this.height=height;el.getContext=getContext;el.attachEvent('onpropertychange',onPropertyChange);el.attachEvent('onresize',onResize);var attrs=el.attributes;if(attrs.width&&attrs.width.specified){el.style.width=attrs.width.nodeValue+'px';}else{el.width=el.clientWidth;}
if(attrs.height&&attrs.height.specified){el.style.height=attrs.height.nodeValue+'px';}else{el.height=el.clientHeight;}}
return el;}};function onPropertyChange(e){var el=e.srcElement;switch(e.propertyName){case'width':el.style.width=el.attributes.width.nodeValue+'px';el.getContext().clearRect();break;case'height':el.style.height=el.attributes.height.nodeValue+'px';el.getContext().clearRect();break;}}
function onResize(e){var el=e.srcElement;if(el.firstChild){el.firstChild.style.width=el.clientWidth+'px';el.firstChild.style.height=el.clientHeight+'px';}}
var dec2hex=[];for(var i=0;i<16;i++){for(var j=0;j<16;j++){dec2hex[i*16+j]=i.toString(16)+j.toString(16);}}
function createMatrixIdentity(){return[[1,0,0],[0,1,0],[0,0,1]];}
function matrixMultiply(m1,m2){var result=createMatrixIdentity();for(var x=0;x<3;x++){for(var y=0;y<3;y++){var sum=0;for(var z=0;z<3;z++){sum+=m1[x][z]*m2[z][y];}
result[x][y]=sum;}}
return result;}
function copyState(o1,o2){o2.fillStyle=o1.fillStyle;o2.lineCap=o1.lineCap;o2.lineJoin=o1.lineJoin;o2.lineWidth=o1.lineWidth;o2.miterLimit=o1.miterLimit;o2.shadowBlur=o1.shadowBlur;o2.shadowColor=o1.shadowColor;o2.shadowOffsetX=o1.shadowOffsetX;o2.shadowOffsetY=o1.shadowOffsetY;o2.strokeStyle=o1.strokeStyle;o2.globalAlpha=o1.globalAlpha;o2.arcScaleX_=o1.arcScaleX_;o2.arcScaleY_=o1.arcScaleY_;o2.lineScale_=o1.lineScale_;}
function processStyle(styleString){var str,alpha=1;styleString=String(styleString);if(styleString.substring(0,3)=='rgb'){var start=styleString.indexOf('(',3);var end=styleString.indexOf(')',start+1);var guts=styleString.substring(start+1,end).split(',');str='#';for(var i=0;i<3;i++){str+=dec2hex[Number(guts[i])];}
if(guts.length==4&&styleString.substr(3,1)=='a'){alpha=guts[3];}}else{str=styleString;}
return{color:str,alpha:alpha};}
function processLineCap(lineCap){switch(lineCap){case'butt':return'flat';case'round':return'round';case'square':default:return'square';}}
function CanvasRenderingContext2D_(surfaceElement){this.m_=createMatrixIdentity();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle='#000';this.fillStyle='#000';this.lineWidth=1;this.lineJoin='miter';this.lineCap='butt';this.miterLimit=Z*1;this.globalAlpha=1;this.canvas=surfaceElement;var el=surfaceElement.ownerDocument.createElement('div');el.style.width=G_vmlCanvasManager_.width;el.style.height=G_vmlCanvasManager_.height;el.style.overflow='hidden';el.style.position='absolute';surfaceElement.appendChild(el);this.element_=el;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1;}
var contextPrototype=CanvasRenderingContext2D_.prototype;contextPrototype.clearRect=function(){this.element_.innerHTML='';this.currentPath_=[];};contextPrototype.beginPath=function(){this.currentPath_=[];};contextPrototype.moveTo=function(aX,aY){var p=this.getCoords_(aX,aY);this.currentPath_.push({type:'moveTo',x:p.x,y:p.y});this.currentX_=p.x;this.currentY_=p.y;};contextPrototype.lineTo=function(aX,aY){var p=this.getCoords_(aX,aY);this.currentPath_.push({type:'lineTo',x:p.x,y:p.y});this.currentX_=p.x;this.currentY_=p.y;};contextPrototype.bezierCurveTo=function(aCP1x,aCP1y,aCP2x,aCP2y,aX,aY){var p=this.getCoords_(aX,aY);var cp1=this.getCoords_(aCP1x,aCP1y);var cp2=this.getCoords_(aCP2x,aCP2y);bezierCurveTo(this,cp1,cp2,p);};function bezierCurveTo(self,cp1,cp2,p){self.currentPath_.push({type:'bezierCurveTo',cp1x:cp1.x,cp1y:cp1.y,cp2x:cp2.x,cp2y:cp2.y,x:p.x,y:p.y});self.currentX_=p.x;self.currentY_=p.y;}
contextPrototype.quadraticCurveTo=function(aCPx,aCPy,aX,aY){var cp=this.getCoords_(aCPx,aCPy);var p=this.getCoords_(aX,aY);var cp1={x:this.currentX_+2.0/3.0*(cp.x-this.currentX_),y:this.currentY_+2.0/3.0*(cp.y-this.currentY_)};var cp2={x:cp1.x+(p.x-this.currentX_)/3.0,y:cp1.y+(p.y-this.currentY_)/3.0};bezierCurveTo(this,cp1,cp2,p);};contextPrototype.arc=function(aX,aY,aRadius,aStartAngle,aEndAngle,aClockwise){aRadius*=Z;var arcType=aClockwise?'at':'wa';var xStart=aX+mc(aStartAngle)*aRadius-Z2;var yStart=aY+ms(aStartAngle)*aRadius-Z2;var xEnd=aX+mc(aEndAngle)*aRadius-Z2;var yEnd=aY+ms(aEndAngle)*aRadius-Z2;if(xStart==xEnd&&!aClockwise){xStart+=0.125;}
var p=this.getCoords_(aX,aY);var pStart=this.getCoords_(xStart,yStart);var pEnd=this.getCoords_(xEnd,yEnd);this.currentPath_.push({type:arcType,x:p.x,y:p.y,radius:aRadius,xStart:pStart.x,yStart:pStart.y,xEnd:pEnd.x,yEnd:pEnd.y});};contextPrototype.rect=function(aX,aY,aWidth,aHeight){this.moveTo(aX,aY);this.lineTo(aX+aWidth,aY);this.lineTo(aX+aWidth,aY+aHeight);this.lineTo(aX,aY+aHeight);this.closePath();};contextPrototype.strokeRect=function(aX,aY,aWidth,aHeight){this.beginPath();this.moveTo(aX,aY);this.lineTo(aX+aWidth,aY);this.lineTo(aX+aWidth,aY+aHeight);this.lineTo(aX,aY+aHeight);this.closePath();this.stroke();this.currentPath_=[];};contextPrototype.fillRect=function(aX,aY,aWidth,aHeight){this.beginPath();this.moveTo(aX,aY);this.lineTo(aX+aWidth,aY);this.lineTo(aX+aWidth,aY+aHeight);this.lineTo(aX,aY+aHeight);this.closePath();this.fill();this.currentPath_=[];};contextPrototype.createLinearGradient=function(aX0,aY0,aX1,aY1){var gradient=new CanvasGradient_('gradient');gradient.x0_=aX0;gradient.y0_=aY0;gradient.x1_=aX1;gradient.y1_=aY1;return gradient;};contextPrototype.createRadialGradient=function(aX0,aY0,aR0,aX1,aY1,aR1){var gradient=new CanvasGradient_('gradientradial');gradient.x0_=aX0;gradient.y0_=aY0;gradient.r0_=aR0;gradient.x1_=aX1;gradient.y1_=aY1;gradient.r1_=aR1;return gradient;};contextPrototype.drawImage=function(image,var_args){var dx,dy,dw,dh,sx,sy,sw,sh;var oldRuntimeWidth=image.runtimeStyle.width;var oldRuntimeHeight=image.runtimeStyle.height;image.runtimeStyle.width='auto';image.runtimeStyle.height='auto';var w=image.width;var h=image.height;image.runtimeStyle.width=oldRuntimeWidth;image.runtimeStyle.height=oldRuntimeHeight;if(arguments.length==3){dx=arguments[1];dy=arguments[2];sx=sy=0;sw=dw=w;sh=dh=h;}else if(arguments.length==5){dx=arguments[1];dy=arguments[2];dw=arguments[3];dh=arguments[4];sx=sy=0;sw=w;sh=h;}else if(arguments.length==9){sx=arguments[1];sy=arguments[2];sw=arguments[3];sh=arguments[4];dx=arguments[5];dy=arguments[6];dw=arguments[7];dh=arguments[8];}else{throw Error('Invalid number of arguments');}
var d=this.getCoords_(dx,dy);var w2=sw/2;var h2=sh/2;var vmlStr=[];var W=10;var H=10;vmlStr.push(' <g_vml_:group',' coordsize="',Z*W,',',Z*H,'"',' coordorigin="0,0"',' style="width:',W,'px;height:',H,'px;position:absolute;');if(this.m_[0][0]!=1||this.m_[0][1]){var filter=[];filter.push('M11=',this.m_[0][0],',','M12=',this.m_[1][0],',','M21=',this.m_[0][1],',','M22=',this.m_[1][1],',','Dx=',mr(d.x/Z),',','Dy=',mr(d.y/Z),'');var max=d;var c2=this.getCoords_(dx+dw,dy);var c3=this.getCoords_(dx,dy+dh);var c4=this.getCoords_(dx+dw,dy+dh);max.x=m.max(max.x,c2.x,c3.x,c4.x);max.y=m.max(max.y,c2.y,c3.y,c4.y);vmlStr.push('padding:0 ',mr(max.x/Z),'px ',mr(max.y/Z),'px 0;filter:progid:DXImageTransform.Microsoft.Matrix(',filter.join(''),", sizingmethod='clip');")}else{vmlStr.push('top:',mr(d.y/Z),'px;left:',mr(d.x/Z),'px;');}
vmlStr.push(' ">','<g_vml_:image src="',image.src,'"',' style="width:',Z*dw,'px;',' height:',Z*dh,'px;"',' cropleft="',sx/w,'"',' croptop="',sy/h,'"',' cropright="',(w-sx-sw)/w,'"',' cropbottom="',(h-sy-sh)/h,'"',' />','</g_vml_:group>');this.element_.insertAdjacentHTML('BeforeEnd',vmlStr.join(''));};contextPrototype.stroke=function(aFill){var lineStr=[];var lineOpen=false;var a=processStyle(aFill?this.fillStyle:this.strokeStyle);var color=a.color;var opacity=a.alpha*this.globalAlpha;var W=10;var H=10;lineStr.push('<g_vml_:shape',' filled="',!!aFill,'"',' style="position:absolute;width:',W,'px;height:',H,'px;"',' coordorigin="0 0" coordsize="',Z*W,' ',Z*H,'"',' stroked="',!aFill,'"',' path="');var newSeq=false;var min={x:null,y:null};var max={x:null,y:null};for(var i=0;i<this.currentPath_.length;i++){var p=this.currentPath_[i];var c;switch(p.type){case'moveTo':c=p;lineStr.push(' m ',mr(p.x),',',mr(p.y));break;case'lineTo':lineStr.push(' l ',mr(p.x),',',mr(p.y));break;case'close':lineStr.push(' x ');p=null;break;case'bezierCurveTo':lineStr.push(' c ',mr(p.cp1x),',',mr(p.cp1y),',',mr(p.cp2x),',',mr(p.cp2y),',',mr(p.x),',',mr(p.y));break;case'at':case'wa':lineStr.push(' ',p.type,' ',mr(p.x-this.arcScaleX_*p.radius),',',mr(p.y-this.arcScaleY_*p.radius),' ',mr(p.x+this.arcScaleX_*p.radius),',',mr(p.y+this.arcScaleY_*p.radius),' ',mr(p.xStart),',',mr(p.yStart),' ',mr(p.xEnd),',',mr(p.yEnd));break;}
if(p){if(min.x==null||p.x<min.x){min.x=p.x;}
if(max.x==null||p.x>max.x){max.x=p.x;}
if(min.y==null||p.y<min.y){min.y=p.y;}
if(max.y==null||p.y>max.y){max.y=p.y;}}}
lineStr.push(' ">');if(!aFill){var lineWidth=this.lineScale_*this.lineWidth;if(lineWidth<1){opacity*=lineWidth;}
lineStr.push('<g_vml_:stroke',' opacity="',opacity,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',processLineCap(this.lineCap),'"',' weight="',lineWidth,'px"',' color="',color,'" />');}else if(typeof this.fillStyle=='object'){var fillStyle=this.fillStyle;var angle=0;var focus={x:0,y:0};var shift=0;var expansion=1;if(fillStyle.type_=='gradient'){var x0=fillStyle.x0_/this.arcScaleX_;var y0=fillStyle.y0_/this.arcScaleY_;var x1=fillStyle.x1_/this.arcScaleX_;var y1=fillStyle.y1_/this.arcScaleY_;var p0=this.getCoords_(x0,y0);var p1=this.getCoords_(x1,y1);var dx=p1.x-p0.x;var dy=p1.y-p0.y;angle=Math.atan2(dx,dy)*180/Math.PI;if(angle<0){angle+=360;}
if(angle<1e-6){angle=0;}}else{var p0=this.getCoords_(fillStyle.x0_,fillStyle.y0_);var width=max.x-min.x;var height=max.y-min.y;focus={x:(p0.x-min.x)/width,y:(p0.y-min.y)/height};width/=this.arcScaleX_*Z;height/=this.arcScaleY_*Z;var dimension=m.max(width,height);shift=2*fillStyle.r0_/dimension;expansion=2*fillStyle.r1_/dimension-shift;}
var stops=fillStyle.colors_;stops.sort(function(cs1,cs2){return cs1.offset-cs2.offset;});var length=stops.length;var color1=stops[0].color;var color2=stops[length-1].color;var opacity1=stops[0].alpha*this.globalAlpha;var opacity2=stops[length-1].alpha*this.globalAlpha;var colors=[];for(var i=0;i<length;i++){var stop=stops[i];colors.push(stop.offset*expansion+shift+' '+stop.color);}
lineStr.push('<g_vml_:fill type="',fillStyle.type_,'"',' method="none" focus="100%"',' color="',color1,'"',' color2="',color2,'"',' colors="',colors.join(','),'"',' opacity="',opacity2,'"',' g_o_:opacity2="',opacity1,'"',' angle="',angle,'"',' focusposition="',focus.x,',',focus.y,'" />');}else{lineStr.push('<g_vml_:fill color="',color,'" opacity="',opacity,'" />');}
lineStr.push('</g_vml_:shape>');this.element_.insertAdjacentHTML('beforeEnd',lineStr.join(''));};contextPrototype.fill=function(){this.stroke(true);}
contextPrototype.closePath=function(){this.currentPath_.push({type:'close'});};contextPrototype.getCoords_=function(aX,aY){var m=this.m_;return{x:Z*(aX*m[0][0]+aY*m[1][0]+m[2][0])-Z2,y:Z*(aX*m[0][1]+aY*m[1][1]+m[2][1])-Z2}};contextPrototype.save=function(){var o={};copyState(this,o);this.aStack_.push(o);this.mStack_.push(this.m_);this.m_=matrixMultiply(createMatrixIdentity(),this.m_);};contextPrototype.restore=function(){copyState(this.aStack_.pop(),this);this.m_=this.mStack_.pop();};contextPrototype.translate=function(aX,aY){var m1=[[1,0,0],[0,1,0],[aX,aY,1]];this.m_=matrixMultiply(m1,this.m_);};contextPrototype.rotate=function(aRot){var c=mc(aRot);var s=ms(aRot);var m1=[[c,s,0],[-s,c,0],[0,0,1]];this.m_=matrixMultiply(m1,this.m_);};contextPrototype.scale=function(aX,aY){this.arcScaleX_*=aX;this.arcScaleY_*=aY;var m1=[[aX,0,0],[0,aY,0],[0,0,1]];var m=this.m_=matrixMultiply(m1,this.m_);var det=m[0][0]*m[1][1]-m[0][1]*m[1][0];this.lineScale_=sqrt(abs(det));};contextPrototype.clip=function(){};contextPrototype.arcTo=function(){};contextPrototype.createPattern=function(){return new CanvasPattern_;};function CanvasGradient_(aType){this.type_=aType;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[];}
CanvasGradient_.prototype.addColorStop=function(aOffset,aColor){aColor=processStyle(aColor);this.colors_.push({offset:aOffset,color:aColor.color,alpha:aColor.alpha});};function CanvasPattern_(){}
G_vmlCanvasManager=G_vmlCanvasManager_;CanvasRenderingContext2D=CanvasRenderingContext2D_;CanvasGradient=CanvasGradient_;CanvasPattern=CanvasPattern_;})();}

var Thunderball={ChartScalingV2:{CalculateDelta2:function(preferredDivisionCount,preferMoreDivisions,allowNoGap,dMin,dMax,dStart,dFinish){if(!dMin){dMin=0;}
if(!dMax){dMax=1;}
if(preferredDivisionCount<=1||preferredDivisionCount==null||preferredDivisionCount==undefined){dStart.value=dMin;dFinish.value=dMax;return dMax-dMin;}
if(dMax<dMin){var Tmp=dMin;dMin=dMax;dMax=Tmp;}
var dMax=Math.abs(dMax);if(dMax==0)dMax=1;var Tol=5.0e-6;if((dMax-dMin)/dMax<=Tol){if(dMax<0)
dMax=0;else if(dMax==0)
dMax=1;else
dMin=0;}
var dGears=[10,5,2.5,2,1];var dBestDifference=-1;var dBestLineCount=-1;var dBestMax=0;var dBestMin=0;var dBestDelta=0;var dRange=dMax-dMin;var dRangeDivision=dRange/preferredDivisionCount;Math.log10=function(n){return this.log(n)/this.log(10);}
var dDivisionMagnitude=Math.log10(dRangeDivision);var nDivisionMultiplier=parseInt(Math.floor(dDivisionMagnitude));for(var nMagAdditive=1;nMagAdditive>-2;nMagAdditive--){for(var i=0;i<dGears.length;i++){var dTmpDelta=dGears[i]*Math.pow(10,nDivisionMultiplier+nMagAdditive);var dTmpMax=Thunderball.ChartScalingV2.Math.RoundUpToMultiple(dMax,dTmpDelta,allowNoGap);var dTmpMin=Thunderball.ChartScalingV2.Math.RoundDownToMultiple(dMin,dTmpDelta,allowNoGap);var dLineCount=Math.round((dTmpMax-dTmpMin)/dTmpDelta)+1;var dDiff=Math.abs(preferredDivisionCount-dLineCount);if((dBestDifference==-1)||(dDiff<=dBestDifference)){if(preferMoreDivisions||(dLineCount<=preferredDivisionCount)){dBestDifference=dDiff;dBestLineCount=dLineCount;dBestMax=dTmpMax;dBestMin=dTmpMin;dBestDelta=dTmpDelta;}}}}
dFinish.value=dBestMax;dStart.value=dBestMin;return dBestDelta;},Math:{RoundUpToMultiple:function(val,multiple,inclusive){var dRemainder=Math.abs(val%multiple);if((dRemainder==0)&&inclusive)
return val;if(val>0)
return val+(multiple-dRemainder);else
return val+dRemainder;},RoundDownToMultiple:function(val,multiple,inclusive){var dRemainder=Math.abs(val%multiple);if((dRemainder==0)&&inclusive)
return val;if(val>0)
return val-dRemainder;else
return val-(multiple-dRemainder);}}},Utilities:{canvas_compatible:false,Requesters:[],check_canvas:function(){try{this.canvas_compatible=!!(document.createElement('canvas').getContext('2d'));}catch(e){this.canvas_compatible=!!(document.createElement('canvas').getContext);}
return this.canvas_compatible;},DataUpdater:function(data){for(var i=0;i<Thunderball.Utilities.Requesters.length;i++){if(Thunderball.Utilities.Requesters[i].requestId==data.requestId){Thunderball.Utilities.Requesters[i].data=data;Thunderball.Utilities.Requesters[i]._didLoad();Thunderball.Utilities.Requesters.splice(i,1);}}},GetData:function(chart){var requestObject=chart.buildRequest();$.ajax({type:"POST",url:chart.url,dataType:"json",data:requestObject,success:function(data){if(data!=null){var chartdata=data[0].Value;chartdata.requestId=chart.requestId;Thunderball.Utilities.DataUpdater(chartdata);data=null;}}});requestObject=null;},FormatDate:function(dateString){if(typeof dateString=="string"){var dateTime=new Date();if(dateString.indexOf("-")>=0){dateString=dateString.substring(6,dateString.length-7);}
else{dateString=dateString.substring(6,dateString.length-2);}
dateTime.setTime(dateString);return dateTime;}
else{return dateString;}},drawXaxisLines:function(chart){if(chart.style.verticalGridLineStyle){var ctx=chart.drawingContext;chart._bump=true;ctx.beginPath();var ticks=chart._timeLines;for(var i=0;i<ticks.length;i++){var x=ticks[i];ctx.moveTo(x+0.5,chart.height);ctx.lineTo(x+0.5,0);}
ctx.strokeStyle=chart.style.verticalGridLineStyle;ctx.stroke();}
if(chart.style.verticalGridLineStyle_Opaque){var ctx=chart.drawingContext;chart._bump=true;ctx.beginPath();var ticks=chart._opaqueTimeLines;for(var i=0;i<ticks.length;i++){var x=ticks[i];ctx.moveTo(x+0.5,chart.height);ctx.lineTo(x+0.5,0);}
ctx.strokeStyle=chart.style.verticalGridLineStyle_Opaque;ctx.stroke();}
chart._timeLines=[];chart._opaqueTimeLines=[];},addXAxisLabels:function(chart){var labelsToCreate=chart._xAxisLabels;var self=chart;var target=self.targetSelector;var TotalHeight=self.height;var XAxisContent="";var elmWidth=30;var elmWidthCenter;if(!self.style.xAxisLabelPadding){self.style.xAxisLabelPadding=20;}
XAxisContent="<div style='position:relative width:"+self.width+"px; height:"+self.style.xAxisLabelPadding+"px'>";for(var i=0;i<labelsToCreate.length;i++){elmWidthCenter=labelsToCreate[i].x-(elmWidth/2);XAxisContent=XAxisContent+"<div style='position: absolute; top:"+TotalHeight+"px;left:"+elmWidthCenter+"px;width:"+elmWidth+"px' class='xValueLbl'>"+labelsToCreate[i].element+"</div>";}
XAxisContent=XAxisContent+"</div>";target.append(XAxisContent);},addTick:function(Data,Symbol,Timestamp,Price,Offset){var Sessions=Thunderball.Utilities._getSessionByTicker(Data,Symbol);if(Sessions!=null){var timestamp=BlueGrass.Utility.convertToExchangeTime(Timestamp,Offset);var where=Thunderball.Utilities._findXSession(Sessions,timestamp,Data.BarFactor);if(where&&where.x){where.Session.Trades[where.x]=Price;if(where.Session.Low&&where.Session.Low.Price>Price){where.Session.Low.Price=Price;where.Session.Low.Index=where.x;}
if(where.Session.High&&where.Session.High.Price<Price){where.Session.High.Price=Price;where.Session.High.Index=where.x;}
return where;}}
return where;},_findXSession:function(Sessions,Timestamp,BarFactor){Timestamp=new Date(Timestamp);for(var i=0;i<Sessions.length;i++){var Session=Sessions[i];var ten_days=1000*60*60*24*10;if(Session.Stop.getTime()-Session.Start.getTime()<=ten_days){if(Session.Start<=Timestamp&&Timestamp<=Session.Stop){var x=(Timestamp.getTime()-Session.Start.getTime())/BarFactor;return{x:parseInt(x),Session:Session,Historical:false};}}
else{return{x:null,Session:null,Historical:true};}}
return{x:null,Session:null,Historical:false};},_getSessionByTicker:function(ChartData,Symbol){var s=Symbol.toUpperCase();for(var i=0;i<ChartData.Data.length;i++){if(ChartData.Data[i].Key==s){return ChartData.Data[i].Value.Sessions;}}
return null;}}};

var LargeChartStyle={background:"#f0f7f2",border:"#d4e0e0",closelineStyle:"#A2A2A2",highIndicatorStyle:"#ff8800",highlowLineStyle:"rgba(251,136,11,0.4)",horizontalGridLineStyle:"rgba(180,201,202,0.5)",lowIndicatorStyle:"#ff8800",mainLineStyle:"#296466",mainPriceLineFill:"rgba(132,201,202,0.25)",mainPriceLineWidth:2,maxPriceLines:10,verticalGridLineStyle:"rgba(180,201,202,0.5)",verticalGridLineStyle_Opaque:"rgba(180,201,202,1.0)",vPadding:25,YAxisLabelStyle:0,YAxisLabelHeight:16,showDecimals:1,regionStyles:{0:'#cde2e0',1:'#cde2e0',2:'rgba(51,51,51,0.06)'},comparelineStyles:{0:'#cc3333',1:'#3b8dad',2:'#c9932e',3:'#b78383',4:'#8eb3bc',5:'#dbb782'}};var NormalChartStyle={background:"#f0f7f2",border:"#d4e0e0",closelineStyle:"#A2A2A2",horizontalGridLineStyle:"rgba(180,201,202,0.5)",highIndicatorStyle:"#ff8800",highlowLineStyle:"rgba(251,136,11,0.4)",lowIndicatorStyle:"#ff8800",mainLineStyle:"#296466",mainPriceLineFill:"rgba(132,201,202,0.25)",mainPriceLineWidth:2,maxPriceLines:5,verticalGridLineStyle:"rgba(180,201,202,0.5)",verticalGridLineStyle_Opaque:"rgba(180,201,202,1.0)",vPadding:10,YAxisLabelStyle:0,YAxisLabelHeight:16,showDecimals:1,regionStyles:{0:'#cde2e0',1:'#cde2e0',2:'rgba(51,51,51,0.06)'},comparelineStyles:{0:'#cc3333',1:'#3b8dad',2:'#c9932e',3:'#b78383',4:'#8eb3bc',5:'#dbb782'}};var NormalChartStyleNoDecimals={background:"#f0f7f2",border:"#d4e0e0",closelineStyle:"#A2A2A2",horizontalGridLineStyle:"rgba(180,201,202,0.5)",highIndicatorStyle:"#ff8800",highlowLineStyle:"rgba(251,136,11,0.4)",lowIndicatorStyle:"#ff8800",mainLineStyle:"#296466",mainPriceLineFill:"rgba(132,201,202,0.25)",mainPriceLineWidth:2,maxPriceLines:6,verticalGridLineStyle:"rgba(180,201,202,0.5)",verticalGridLineStyle_Opaque:"rgba(180,201,202,1.0)",vPadding:12,YAxisLabelStyle:0,YAxisLabelHeight:16,showDecimals:1,regionStyles:{0:'#cde2e0',1:'#cde2e0',2:'rgba(51,51,51,0.06)'},comparelineStyles:{0:'#cc3333',1:'#3b8dad',2:'#c9932e',3:'#b78383',4:'#8eb3bc',5:'#dbb782'}};var SmallChartStyle={closelineStyle:"#A2A2A2",highIndicatorStyle:"#ff8800",lowIndicatorStyle:"#ff8800",mainLineStyle:"#296466",mainPriceLineFill:"rgba(132,201,202,0.25)",mainPriceLineWidth:2,maxPriceLines:0,vPadding:5,YAxisLabelStyle:0,YAxisLabelHeight:16,showDecimals:1,regionStyles:{0:'',1:'',2:''},comparelineStyles:{0:'#cc3333',1:'#3b8dad',2:'#c9932e',3:'#b78383',4:'#8eb3bc',5:'#dbb782'}};var SparkLineStyle={background:"#f0f7f2",closelineStyle:"#A2A2A2",highStyle:"#0AC92B",lowStyle:"#99182C",regionStyles:{0:'#cde2e0',1:'#cde2e0',2:''},type:"Spark"};var IndexChartStyle={background:"#f0f7f2",border:"#d4e0e0",closelineStyle:"#A2A2A2",horizontalGridLineStyle:"rgba(180,201,202,0.5)",highIndicatorStyle:"#ff8800",highlowLineStyle:"rgba(251,136,11,0.4)",lowIndicatorStyle:"#ff8800",mainLineStyle:"#296466",mainPriceLineFill:"rgba(132,201,202,0.25)",mainPriceLineWidth:2,maxPriceLines:4,verticalGridLineStyle:"rgba(180,201,202,0.5)",verticalGridLineStyle_Opaque:"rgba(180,201,202,1.0)",vPadding:12,YAxisLabelStyle:1,YAxisLabelHeight:12,showDecimals:1,regionStyles:{0:'#cde2e0',1:'#cde2e0',2:'rgba(51,51,51,0.06)'},comparelineStyles:{0:'#cc3333',1:'#3b8dad',2:'#c9932e',3:'#b78383',4:'#8eb3bc',5:'#dbb782'}};function LegacyChart(container,legacyQueryString,width,height){var _chartBox=$(container);var _legacyQueryString=legacyQueryString;var _width=width;var _height=height;var _showChart=function(){_chartBox.html("");$('<img src="//www.marketwatch.com/charts/big.chart'+_legacyQueryString+'" width="'+_width+'" height="'+_height+'"/>').appendTo(_chartBox).get(0);}
return{ShowChart:function(){_showChart();},UpdateChart:function(time,freq,startdate,enddate){_showChart();},ChangeSymbol:function(symbol){_showChart();}}}
function EmbeddedChart(container,style,width,height,time,freq,startdate,enddate,chartdata,symbol){var _chartBox=$(container);var _style=style;var _width=width;var _height=height;var _time=time;var _freq=freq;var _startdate=startdate;var _enddate=enddate;var _pagedata=null;var _currentsymbol=null;var _firstsymbol=symbol;var _symbolCount=0;var _chart=null;var _tick=false;var _ticktimeout=null;var _currentchannel=null;var _connection=null;var _url="/Market/ECProxy/ChartData";var _setPageData=function(data){if(data!=null&&data!=undefined&&data.length>0){if(_pagedata==null){_pagedata=[];}
for(var i=0;i<data.length;i++){if(data[i].Value!=null&&data[i].Value!=undefined){_pagedata[data[i].Key]=data[i].Value;if(_pagedata[data[i].Key].Data!=null){for(var j=0;j<_pagedata[data[i].Key].Data.length;j++){for(var k=0;k<_pagedata[data[i].Key].Data[j].Value.Sessions.length;k++){var session=_pagedata[data[i].Key].Data[j].Value.Sessions[k];session.Start=new Date(Thunderball.Utilities.FormatDate(session.Start));session.Stop=new Date(Thunderball.Utilities.FormatDate(session.Stop));}}}}}}}
var _showChart=function(symbol){if(_pagedata==null){_chart=new JSChart(_chartBox,symbol.split('|'),_width,_height,_style,_freq,_time,_startdate,_enddate,undefined,MarketWatch.getBaseUrl()+_url);_currentsymbol=symbol;}
else{if(symbol!=_currentsymbol){if(_chart!=null){_pagedata[_currentsymbol]=_chart.data;_chart.data=null;_chart=null;}
var symbols=symbol.split('|');_chart=new JSChart(_chartBox,symbols,_width,_height,_style,_freq,_time,_startdate,_enddate,_pagedata[symbol],MarketWatch.getBaseUrl()+_url);_currentsymbol=symbol;_symbolCount=symbols.length;}}}
_setPageData(chartdata);var _refreshPageData=function(){var symbols=[]
for(var symbol in _pagedata){symbols.push(symbol);}
_refreshData(symbols,"mo");}
var _refreshData=function(symbols,cachekey){requestObject={freq:_freq,time:_time,Symbol:symbols,StartDate:_startdate,EndDate:_enddate,Width:_width,Height:_height,CacheKey:cachekey};$.ajax({type:"POST",url:MarketWatch.getBaseUrl()+_url,dataType:"json",data:requestObject,success:function(data){if(data!=null){_setPageData(data);data=null;if(_chart!=null){_chart.data=_pagedata[_currentsymbol];_chart._didLoad();}}}});requestObject=null;}
var _reloadChart=function(){if(_chart!=null){_chart.time=_time;_chart.freq=_freq;_chart.startDate=_startdate;_chart.endDate=_enddate;_chart.reload();}}
return{ShowChart:function(symbol){if(symbol===undefined){symbol=_firstsymbol;}
symbol=symbol.toUpperCase();if(symbol!=_currentsymbol){_showChart(symbol);if(_ticktimeout){clearTimeout(_ticktimeout);}
if(_tick){_ticktimeout=setTimeout(this.TickSubscribe,500);}}},TickSubscribe:function(){if(_chart!=null){_tick=true;var chartSubscribeCallback=function(message){if(_chart!=null&&_chart.data!=null&&_symbolCount==1){for(var symbol in _pagedata){for(var i=0;i<_pagedata[symbol].Data.length;i++){if(_pagedata[symbol].Data[i].Value.BlueGrassChannel!=null&&_pagedata[symbol].Data[i].Value.BlueGrassChannel.toLowerCase()==message.h.t){if(symbol.toUpperCase()===_currentsymbol.toUpperCase()){_chart.addTick(symbol,message.b.z,message.b.l,message.b.e);}
break;}}}}};var chartConnectionCallback=function(connection,type){if(type=="connect"){_connection=connection;if(_pagedata[_currentsymbol]!=null){_currentchannel=_connection.subscribe(_pagedata[_currentsymbol].Data[0].Value.BlueGrassChannel,chartSubscribeCallback);}}};if(_currentchannel!=null){_currentchannel.removeCallback(chartSubscribeCallback);}
if(_connection!=null){if(_pagedata[_currentsymbol]!=null){_currentchannel=_connection.subscribe(_pagedata[_currentsymbol].Data[0].Value.BlueGrassChannel,chartSubscribeCallback);}}
else{if(BlueGrass!==null&&BlueGrass.Runtime!==null){BlueGrass.Runtime.openConnection({},chartConnectionCallback);}}}},UpdateAllCharts:function(time,freq,startdate,enddate){if(_chart!=null){this.UpdateChart(time,freq,startdate,enddate);setTimeout(_refreshPageData,5);}},UpdateChart:function(time,freq,startdate,enddate){if(_chart!=null){_time=time;_freq=freq;_startdate=startdate;_enddate=enddate;_reloadChart();}},ChangeSymbol:function(symbol){if(_chart!=null){_currentsymbol=symbol;_chart.setSymbols(symbol.split('|'));_symbolCount=_chart.symbols.length;_reloadChart();}},SetChartRefresh:function(rate){setInterval(_refreshPageData,rate);}}}
var JSChart=function(targetSelector,symbols,width,height,style,freq,time,startDate,endDate,data,url){this.targetSelector=targetSelector;if(style===undefined){this.style=LargeChartStyle;}
else{this.style=style;}
if(url!==undefined){this.url=url;}
this.width=width;this.height=height;this.symbols=symbols;this.selectedSymbol=symbols[0];if(freq===undefined){this.freq="1mi";}
else{this.freq=freq;}
if(time===undefined){this.time="1dy";}
else{this.time=time;}
if(startDate!==undefined){this.startDate=startDate;}
if(endDate!==undefined){this.endDate=endDate;}
var self=this;if(data===undefined){$(function(){self.reload();});}
else{self.preload(data);}};JSChart.prototype={freq:"1mi",time:"1dy",unit:"Minute",url:"./HistoricChartData.aspx",span:1,step:1,startDate:'',endDate:'',data:null,selectedSymbol:null,width:0,height:0,drawingContext:null,style:null,highPrice:null,highPoint:{"x":null,"y":null},lowPoint:{"x":null,"y":null},lowPrice:null,lastPoint:{"x":null,"y":null},lastPrice:null,closePrice:null,buildRequest:function(){var requestObject;var symbol="";for(var i=0;i<this.symbols.length;i++){if(i>0){symbol+="|";}
symbol+=this.symbols[i];}
requestObject={freq:this.freq,time:this.time,Symbol:symbol,StartDate:this.startDate,EndDate:this.endDate,Width:this.width};return requestObject;},lastTickPrice:0,lastTickChange:0,lastTickX:0,addTick:function(tickSymbol,Timestamp,Price,offSet){var where=Thunderball.Utilities.addTick(this.data,tickSymbol,Timestamp,Price,offSet);if(where.Historical==false){if(where.x==null){return;}
else{if(Price!=this.lastTickPrice){this.lastTickChange=Price-this.lastTickPrice;this.lastTickPrice=Price;}else if(where.x==this.lastTickX){return;}
this.lastTickX=where.x;this._didLoad();}}},setSymbols:function(symbols){this.symbols=symbols;this.selectedSymbol=symbols[0];},reload:function(){this._resetState();var d=new Date();var requestId=this.symbols[0]+d.getTime();this.requestId=requestId;Thunderball.Utilities.Requesters.push(this);Thunderball.Utilities.GetData(this);},preload:function(data){this._resetState();this.data=data;this._didLoad();},_resetState:function(){this.lastTickPrice=this.lastTickChange=this.lastTickX=0;},redraw:function(){this._prepareCanvas();this._clearLabels();var ctx=this.drawingContext;ctx.clearRect(0,0,this.width,this.height);ctx.save();this._drawChartBackground();var Data=Thunderball.Utilities._getSessionByTicker(this.data,this.selectedSymbol);if(Data!=null){for(var i=0;i<Data.length;i++){this._drawRegions(Data[i]);}
if(this.style.type=='Spark'){this._drawSpark(Data[Data.length-1]);}else{this._determineTypeOfChart(Data);this._setHLC(Data);this._fillTrades(Data);this._drawPriceLines();this._createYAxisLabels(this.symbols.length);Thunderball.Utilities.addXAxisLabels(this);Thunderball.Utilities.drawXaxisLines(this);this._drawCloseLines(Data);var st=this.style;if(this.highPoint.y!=this.lowPoint.y){this._priceIndicator(this.highPoint,"",st.highIndicatorStyle,"highLbl",false);this._priceIndicator(this.lowPoint,"",st.lowIndicatorStyle,"lowLbl",false);}
this._priceIndicator(this.lastPoint,"","","lastLbl",true);this._strokeTrades(Data,this.style.mainLineStyle);this._drawChartBorder();if(this.highPoint.y!=this.lowPoint.y){this._drawHorizontalLine(this.highPoint.y);this._drawHorizontalLine(this.lowPoint.y);}
this.startTime=this.overallStartTime;if(this.symbols.length>1){for(var j=1;j<this.symbols.length;j++){var Session=Thunderball.Utilities._getSessionByTicker(this.data,this.symbols[j]);if(Session!=null){var compareColor='black';if(j<=6){compareColor=this.style.comparelineStyles[j-1];}
this._strokeTrades(Session,compareColor);}}}}}
ctx.restore();},_x:0,_xscale:0,_y:0,_yscale:0,_bump:false,_fillStyle:'black',_padding:0,_events:[],_barFactor:0,_barSize:1,_priceLines:[],_timeLines:[],_opaqueTimeLines:[],_historical:false,_customDateRange:false,_chartUnit:1,_displayUnit:1,_xAxisLabels:[],_findOpaqueGridLines:function(){var xAxisInfo=this._xAxisLabels;var timeLines=this._timeLines;var data=this.data;var opaqueTimeLines=[];this._opaqueTimeLines=[];if(this._displayUnit===1||this._displayUnit===2){for(var i=0;i<xAxisInfo.length;i++){var patt=/^M$|^T$|^W$|^F$|^S$/;if(xAxisInfo[i].element.match(patt)){opaqueTimeLines.push(xAxisInfo[i].x);}}}else{for(var i=0;i<xAxisInfo.length;i++){var patt=/^\d{2}$/;if(xAxisInfo[i].element.match(patt)&&i!=0||(xAxisInfo[i].element.match(patt)&&data.CustomDateRange&&xAxisInfo[i].x!==(.5*timeLines[0]))){opaqueTimeLines.push(xAxisInfo[i].x);}}}
if(opaqueTimeLines.length>0){for(var i=0;i<opaqueTimeLines.length;i++){this._opaqueTimeLines.push(opaqueTimeLines[i]);}}},_didLoad:function(){if(this.data.Error){var target=this.targetSelector;var errorMessage="<div style='position: absolute; top:0px;left:0px; class='xValueLbl'>Error, the chart cannot be displayed.</div>";var ctx=this.drawingContext;if(ctx!=null){ctx.clearRect(0,0,this.width,this.height);this._clearLabels();target.append(errorMessage);}
return;}
var data=this.data.Data;if(data.length>1){var tradesExist=false;for(var i=0;i<data.length;i++){var value=data[i].Value;var sessions=value.Sessions;for(var j=0;j<sessions.length;j++){if(sessions[j].Trades.length>0){tradesExist=true;continue;}}}
if(!tradesExist){var target=this.targetSelector;var errorMessage="<div style='position: absolute; top:0px;left:0px; class='xValueLbl'>One or more of the symbols you have chosen does not contain trade data for this time frame. Please choose a longer timeframe.</div>";var ctx=this.drawingContext;if(ctx!=null){ctx.clearRect(0,0,this.width,this.height);this._clearLabels();target.append(errorMessage);}
return;}}
this._barFactor=this.data.BarFactor;this._barSize=this.data.BarSize;this._chartUnit=this.data.xAxisLabelInfo.chartUnit;this._displayUnit=this.data.xAxisLabelInfo.displayUnit;this._timeLines=this.data.xAxisLabelsObj.timeLines;this._xAxisLabels=this.data.xAxisLabelsObj.ElementList;if(this._displayUnit===1||this._displayUnit===2||this._displayUnit===3){this._findOpaqueGridLines();}
this._customDateRange=this.data.CustomDateRange;try{for(var j=0;j<this.symbols.length;j++){var Sessions=Thunderball.Utilities._getSessionByTicker(this.data,this.symbols[j]);if(Sessions!=null){if(this.symbols.length>1){this._changeDataToPercentage(Sessions);}
$.each(Sessions,function(i,Session){if(Session.Trades===undefined){Session.Trades=[];}
if(Session.Events===undefined){Session.Events=[];}
if(Session.News===undefined){Session.News=[];}
if(Session.Weight===undefined){}
if(Session.Start===undefined){}
if(Session.Stop===undefined){}
var sessionStartFormat=Thunderball.Utilities.FormatDate(Session.Start);var sessionStopFormat=Thunderball.Utilities.FormatDate(Session.Stop);Session.Start=new Date(sessionStartFormat);Session.Stop=new Date(sessionStopFormat);});this._layoutSessions(Sessions);}}}
catch(e){}
this._autoScale(this.data.Data);this.redraw();},_changeDataToPercentage:function(Sessions){var basePrice=null;for(var k=0;k<Sessions.length;k++){var trades=Sessions[k].Trades;for(var l=0;l<trades.length;l++){if(trades[l]!==null&&basePrice===null){basePrice=trades[l];break;}}
if(basePrice!==null){break;}}
if(basePrice!==null&&basePrice>0){for(var k=0;k<Sessions.length;k++){var trades=Sessions[k].Trades;for(var l=0;l<trades.length;l++){if(trades[l]!==null){trades[l]=100*((trades[l]-basePrice)/basePrice);}}
if(Sessions[k].Low!==null){Sessions[k].Low.Price=100*((Sessions[k].Low.Price-basePrice)/basePrice);}
if(Sessions[k].High!==null){Sessions[k].High.Price=100*((Sessions[k].High.Price-basePrice)/basePrice);}}}},_drawHorizontalLine:function(y){if(this.style.highlowLineStyle){var ctx=this.drawingContext;this._bump=true;ctx.beginPath();ctx.lineWidth=1;ctx.moveTo(0,y+0.5);ctx.lineTo(this.width,y+0.5);ctx.strokeStyle=this.style.highlowLineStyle;ctx.stroke();}},_priceIndicator:function(point,string,style,cssClass,lastPoint){if(point.x===null||point.y===null){return;}
if(lastPoint){if(point.x>this.width-3){point.x=this.width-3;}
var y=point.y-10;var x=point.x-2;if(this.lastTickChange<0){lastPointIcon="<div class='chartDownIndicator'></div>";}
else if(this.lastTickChange>0){lastPointIcon="<div class='chartUpIndicator'></div>";}
else{lastPointIcon="<div class='chartIndicator'></div>";y=point.y-3;}
var elm="<div style='position: absolute; top:"+y+"px;left:"+x+"px; ' class ='lastPointAnimated'>"+lastPointIcon+"</div>"
this.targetSelector.append(elm);return;}else{this._drawRoundDot(style,point.x,point.y,3);}},_createYAxisLabels:function(type){if(!this.style.maxPriceLines)return;var decimalsToShow=2;var YAxisContent="";var displayValue="";var x,y,p;var elmHeight=this.style.YAxisLabelHeight;var excludeLabel=[];if(!this.style.yAxisLabelPadding){this.style.yAxisLabelPadding=2;}
function addCommas(nStr){nStr+='';x=nStr.split('.');x1=x[0];x2=x.length>1?'.'+x[1]:'';var rgx=/(\d+)(\d{3})/;while(rgx.test(x1)){x1=x1.replace(rgx,'$1'+','+'$2');}
return x1+x2;}
function decimalsNeeded(indexLength,range){if(range===0)
return 0;var maxDecimals=6;var range=Math.round(range*1000000)/1000000;var tickMultiplier=1;var decimals=0;while(decimals<=maxDecimals){var tickValue=indexLength*tickMultiplier;tickValue=tickValue.toFixed(maxDecimals);if(range>=tickValue){if(decimals==1){decimals=2;}
return decimals;}
tickMultiplier=tickMultiplier*0.1;decimals++;}
return decimals;}
if(this._priceLines.length>1){this._priceLines.sort(function(a,b){return a-b});var firstValue=this._priceLines[0];var lastValue=this._priceLines[this._priceLines.length-1];var diffValue=lastValue-firstValue;var totalNumber=this._priceLines.length-1;if(this.style.showDecimals===0){decimalsToShow=0;}else{decimalsToShow=decimalsNeeded(totalNumber,diffValue);}}
try{var current=false;for(var i=this._priceLines.length-1;i>=0;i--){var drawLabel=true;p=this._priceLines[i];if(this._priceLines[i]===this.lastPrice){y=(this.ty(p)-(elmHeight/2)-1);}else if(this._priceLines[i]===this.highPrice){y=(this.ty(p)-elmHeight);}else if(this._priceLines[i]===this.lowPrice){y=this.ty(p)-1;}else if(this._priceLines[i]===this.closePrice){y=(this.ty(p)-(elmHeight/2)-1);}else{y=this.ty(p)-(elmHeight/2);}
x=this.style.yAxisLabelPadding+this.width;if(this.style.YAxisLabelStyle===1){for(var j=0;j<this._priceLines.length;j++){if(this._priceLines[i]!=this.lastPrice&&j!=i&&excludeLabel[j]!=1){var cp=this._priceLines[j];if(this._priceLines[j]===this.lastPrice){cy=(this.ty(cp)-(elmHeight/2))-1;}else if(this._priceLines[j]===this.closePrice){cy=(this.ty(cp)-(elmHeight/2))-1;}else if(this._priceLines[j]===this.highPrice){cy=(this.ty(cp)-elmHeight)-1;}else if(this._priceLines[j]===this.lowPrice){cy=this.ty(cp)-1;}else{drawLabel=false;}
if(Math.abs(Math.abs(cy)-Math.abs(y))<elmHeight+1){if(this._priceLines[j]!=this.closePrice){drawLabel=false;excludeLabel[i]=1;}}}}}
if(type>1){displayValue=p.toFixed(decimalsToShow)+"%";}
else{displayValue=p.toFixed(decimalsToShow);}
var labelClass="priceLbl";if(this.style.YAxisLabelStyle===1){var width=5;if(this._priceLines[i]===this.lastPrice&&(this._priceLines[i]>=this.closePrice||this.closePrice===null)&&!current){labelClass="currentPriceUpLbl";current=true;}else if(this._priceLines[i]===this.lastPrice&&this._priceLines[i]<this.closePrice&&!current){labelClass="currentPriceDownLbl";current=true;}else if(this._priceLines[i]===this.lowPrice){if(this.lowPrice===this.lastPrice&&current){drawLabel=false;}
labelClass="lowLbl";}else if(this._priceLines[i]===this.highPrice){if(this.highPrice===this.lastPrice&&current){drawLabel=false;}
labelClass="highLbl";}else if(this.closePrice&&this._priceLines[i]===this.closePrice){if(this.closePrice===this.lastPrice&&current){drawLabel=false;}
labelClass="closeLineLbl";}}
if(drawLabel===true&&this.style.YAxisLabelStyle===1){YAxisContent=YAxisContent+"<div style='position: absolute; top:"+y+"px;left:"+x+"px; ' class ='"+labelClass+"X'></div>"+"<div style='position: absolute; top:"+y+"px;left:"+(x+width)+"px; ' class='"+labelClass+"'>"+addCommas(displayValue)+"</div>";}else if(drawLabel===true){YAxisContent=YAxisContent+"<div style='position: absolute; top:"+y+"px;left:"+x+"px; ' class='"+labelClass+"'>"+addCommas(displayValue)+"</div>"}}}
catch(e){}
this.targetSelector.append(YAxisContent);},_determineTypeOfChart:function(Sessions){if(Sessions.length>=1&&Sessions[0].Regions.length>=1){var numberOfRegions=Sessions[0].Regions.length;if(numberOfRegions==1&&Sessions[0].Regions[0].Type!=4){this._historical=true;}
else{this._historical=false;}}},_setHLC:function(Sessions){this.lastPoint.x=null;this.lastPoint.y=null;this.lowPoint.x=null;this.lowPoint.y=null;this.highPoint.x=null;this.highPoint.y=null;var MinMax=this._getMinMax(Sessions,false);var needsBump=false;if(this.data.Data[0].Value.IsIndex===1&&this._barSize===60){needsBump=true;}
if(MinMax.MinPoint!=null||MinMax.Min!=null){this.lowPoint=MinMax.MinPoint;}
if(MinMax.MaxPoint!=null||MinMax.Max!=null){this.highPoint=MinMax.MaxPoint;}
for(var i=0;i<Sessions.length;i++){var Session=Sessions[i];this._setSession(Session);if(Session.Trades&&Session.Trades.length!==0){var lastIndex=Session.Trades.length-1;var price=Session.Trades[lastIndex];if(price){this.lastPoint.y=this.ty(price);if(this._historical){this.lastPoint.x=this.tx(lastIndex/this._barSize);}else{if(needsBump){this.lastPoint.x=this.tx(lastIndex+0.5);}else{this.lastPoint.x=this.tx(lastIndex);}}}
else{for(var j=lastIndex;j>=0;j--){price=Session.Trades[j];if(price){this.lastPoint.y=this.ty(price);if(this._historical){this.lastPoint.x=this.tx(j/this._barSize);}else{if(needsBump){this.lastPoint.x=this.tx(j+0.5);}else{this.lastPoint.x=this.tx(lastIndex);}}
break;}}}}}},_drawRoundIndicator:function(color,x,y,circleSize){if(x!==null&&y!==null){var ctx=this.drawingContext;ctx.fillStyle=color;ctx.beginPath();ctx.arc(x,y,3,0,Math.PI*2,true);ctx.fill();ctx.strokeStyle=color;ctx.beginPath();ctx.save();ctx.lineWidth=1.5;ctx.arc(x,y,circleSize,0,Math.PI*2,true);ctx.stroke();ctx.restore();}},_drawRoundDot:function(color,x,y,size){if(x!==null&&y!==null){var ctx=this.drawingContext;ctx.fillStyle=color;ctx.beginPath();ctx.arc(x,y,size,0,Math.PI*2,true);ctx.fill();}},_drawNewsOverlay:function(Sessions){this._bump=false;for(var i=0;i<Sessions.length;i++){this._setSession(Sessions[i]);var news=Sessions[i].News;for(var j=0;j<news.length;j++){var story=news[j];var x=this.tx(story.At);var p;var Trades=Sessions[i].Trades;for(var k=0;k<Trades.length&&k<story.At;k++){if(Trades[k]){p=Trades[k];}}
if(p){var newsLink=$('<a></a>').attr('href',story.Url);var icon=$('<img />').attr('border',0).attr('src',this.style.newsBackground).attr('title',story.Text).appendTo(newsLink);}}}},_drawPriceLines:function(){if(this.style.horizontalGridLineStyle){var ctx=this.drawingContext;this._bump=true;ctx.beginPath();var ticks=this._priceLines;for(var i=0;i<ticks.length;i++){var y=this.ty(ticks[i]);ctx.moveTo(0,y);ctx.lineTo(this.width,y);}
ctx.strokeStyle=this.style.horizontalGridLineStyle;ctx.stroke();}},_drawChartBorder:function(){if(this.style.border){var ctx=this.drawingContext;ctx.beginPath();ctx.strokeStyle=this.style.border;ctx.strokeRect(0,0,this.width,this.height);}},_drawChartBackground:function(){if(this.style.background){var ctx=this.drawingContext;ctx.beginPath();ctx.fillStyle=this.style.background;ctx.fillRect(0,0,this.width,this.height);}},_drawCloseLines:function(Sessions){var ctx=this.drawingContext;this._bump=true;var x=0;ctx.beginPath();for(var i=0;i<Sessions.length;i++){var session=Sessions[i];this._setSession(session);var w=session.SessionWidth;var x2=x+w;if(session.PreviousClose!==undefined&&session.PreviousClose!==null&&(this.symbols.length==1)){var y=this.ty(session.PreviousClose);ctx.moveTo(x,y);ctx.lineTo(x2,y);}
x=x2;}
ctx.strokeStyle=this.style.closelineStyle;ctx.stroke();},_drawRegions:function(session){var ctx=this.drawingContext;this._setSession(session);this._bump=false;for(var i=0;i<session.Regions.length;i++){var Region=session.Regions[i];var Color=this._regionStyles[Region.Type];if(!Color||Color==this.style.background){continue;}
var x1=this.tx(Region.Start);var x2;if(i===0&&this._barSize===60&&(Region.Stop+Region.Start>0)){x2=this.tx(Region.Stop+0.5);}else{x2=this.tx(Region.Stop);}
ctx.fillStyle=Color;ctx.fillRect(x1,0,x2-x1,this.height);}},_buildTradePath:function(Sessions){var ctx=this.drawingContext;var data=this.data;var isIndex=data.Data[0].Value.IsIndex;var first=true;var x=0;var firstx;var prev=null;var last;for(var i=0;i<Sessions.length;i++){var Session=Sessions[i];this._setSession(Session);if(Session.Trades){for(var j=0;j<Session.Trades.length;j++){var price=Session.Trades[j];if(price==null){if(prev==null)continue;price=prev;}
prev=price;var y=this.ty(price);if(this._historical){x=this.tx(j/this._barSize);}else{if(isIndex===1&&this._barSize===60){x=this.tx(j+0.5);}else{x=this.tx(j);}}
if(first){firstx=x;ctx.moveTo(0,y);ctx.lineTo(firstx,y);first=false;}else{ctx.lineTo(x,y);}}}}
return{firstx:firstx,lastx:x};},_strokeFillTrades:function(Sessions,strokeStyle){var ctx=this.drawingContext;ctx.save();ctx.lineWidth=this.style.mainPriceLineWidth;ctx.strokeStyle=strokeStyle;ctx.beginPath();this._bump=true;var x=this._buildTradePath(Sessions);if(x.lastx!=undefined&&x.firstx!=undefined){ctx.stroke();ctx.lineTo(x.lastx,this.height);ctx.lineTo(0,this.height);ctx.fillStyle=this.style.mainPriceLineFill;ctx.fill();}
ctx.restore();},_strokeTrades:function(Sessions,strokeStyle){var ctx=this.drawingContext;ctx.save();ctx.miterLimit=0;ctx.lineJoin="round";ctx.lineWidth=this.style.mainPriceLineWidth;ctx.strokeStyle=strokeStyle;ctx.beginPath();this._bump=true;var x=this._buildTradePath(Sessions);ctx.stroke();ctx.restore();},_fillTrades:function(Sessions){var ctx=this.drawingContext;ctx.fillStyle=this._fillStyle;ctx.beginPath();this._bump=false;var points=this._buildTradePath(Sessions);if(points.lastx!=undefined&&points.firstx!=undefined){ctx.lineTo(points.lastx,this.height);ctx.lineTo(0,this.height);}
ctx.fill();},_precomputeStyles:function(){if(this.style.gradientFillStyle){this._fillStyle=this._makeStyle(this.style.gradientFillStyle);}
if(this.style.mainPriceLineFill){this._fillStyle=this.style.mainPriceLineFill;}
this._regionStyles={};var styles=this.style.regionStyles;for(var style in styles){this._regionStyles[style]=this._makeStyle(styles[style]);}},_prepareCanvas:function(){if(!this.drawingContext||this.drawingContext===null){var canvasWidth=this.width;var canvasHeight=this.height;this.targetSelector.html("");if(canvasWidth<=0||canvasHeight<=0){throw"Invalid dimensions - width = "+canvasWidth+", height = "+canvasHeight;}
var canvas=document.createElement('canvas');canvas.setAttribute('width',canvasWidth);canvas.setAttribute('height',canvasHeight);this.targetSelector.get(0).appendChild(canvas);if(!Thunderball.Utilities.check_canvas()){canvas=window.G_vmlCanvasManager.initElement(canvas,canvasWidth,canvasHeight);}
this.drawingContext=canvas.getContext("2d");}
this._precomputeStyles();},_clearLabels:function(){$(this.targetSelector).children("div").remove();},_layoutSessions:function(Sessions){var TotalSessionWeight=0;$.each(Sessions,function(i,s){TotalSessionWeight+=s.Weight;});var x=0;for(var i=0;i<Sessions.length;i++){var Session=Sessions[i];var SessionWidth;SessionWidth=Math.floor(this.width*Session.Weight/TotalSessionWeight);Session.SessionWidth=SessionWidth;Session._x=x;x+=SessionWidth;var SessionStart=Session.Start.getTime();var SessionStop=Session.Stop.getTime();var SessionTime=SessionStop-SessionStart;Session._xscale=SessionWidth*this._barFactor/(SessionTime);}},_autoScale:function(Data){var Min=null;var Max=null;var High=null;var Low=null;var Close=null;var self=this;var chartValueIndicators=this.style.YAxisLabelStyle;$.each(Data,function(i,Sessions){var includePreviousClose=true;if(self.symbols.length>1||Sessions.Value===undefined||Sessions.Value.Sessions===undefined||Sessions.Value.Sessions.length<1||Sessions.Value.Sessions[0].PreviousClose===undefined||Sessions.Value.Sessions[0].PreviousClose===null){includePreviousClose=false;}
var MinMax=self._getMinMax(Sessions.Value.Sessions,includePreviousClose);if(chartValueIndicators===1){self._determineLastTrade(Sessions.Value.Sessions[Sessions.Value.Sessions.length-1].Trades);Low=MinMax.Low;High=MinMax.High;if(includePreviousClose){Close=Sessions.Value.Sessions[0].PreviousClose;self.closePrice=Close;}}
if(!Min||MinMax.Min<Min){Min=MinMax.Min;}
if(!Max||MinMax.Max>Max){Max=MinMax.Max;}});function dStart(){this.value=0;}
function dFinish(){this.value=0;}
if(this.style.maxPriceLines>=1){var dFinishObj=new dFinish();var dStartObj=new dStart();var scale=Thunderball.ChartScalingV2.CalculateDelta2(this.style.maxPriceLines,false,true,Min,Max,dStartObj,dFinishObj);if(dStartObj.value<0&&self.symbols.length===1){scale=Thunderball.ChartScalingV2.CalculateDelta2(Math.round(this.style.maxPriceLines/2),false,true,Min,Max,dStartObj,dFinishObj);}
if(chartValueIndicators===1){if(High===null&&Low===null){if(close!=null){Max=Close+(Close*.01);Min=Close-(Close*.01);}else{Max=1;Min=0;}}
this._priceLines=[];var ticks=this._priceLines;if(Low!=null){ticks.push(Low);this.lowPrice=Low;}
if(this.lastPrice!=null){ticks.push(this.lastPrice);}
if((!(Close===undefined||Close===null))){ticks.push(Close);if(High!=null){ticks.push(High);this.highPrice=High;}}else{if(High!=null){ticks.push(High);this.highPrice=High;}}}else{Min=Math.min(Min,dStartObj.value);Max=Math.max(Max,dFinishObj.value);this._priceLines=[];var ticks=this._priceLines;if(scale>0){for(var p=dStartObj.value;p<=dFinishObj.value+((dFinishObj.value-dStartObj.value)*.05);p+=scale){ticks[ticks.length]=p;}}}}
var pad=this.style.vPadding;var height=this.height-2.0*pad;if(Max-Min===0){if(Max<Min){var Tmp=Min;Min=Max;Max=Tmp;}
var Max=Math.abs(Max);if(Max==0)
Max=1;if(Max<0)
Max=0;else if(Max==0)
Max=1;else
Min=0;}
this._yscale=-height/(Max-Min);this._y=height-Min*this._yscale+pad;},_setSession:function(session){this._xscale=session._xscale;this._x=session._x;},tx:function(x){return Math.floor(this._xscale*x+this._x)+(this._bump?0.5:0);},ty:function(y){return Math.floor(this._yscale*y+this._y)+(this._bump?0.5:0);},_makeStyle:function(spec){var steps=spec.split('-');if(steps.length==2){var gradient=this.drawingContext.createLinearGradient(0,0,0,this.height);gradient.addColorStop(0,steps[0]);gradient.addColorStop(1,steps[1]);return gradient;}else{return spec;}},_determineLastTrade:function(Trades){var latestPrice=null;for(var k=Trades.length-1;k>=0&&latestPrice===null;k--){if(Trades[k]){latestPrice=Trades[k];}}
this.lastPrice=latestPrice;},_getMinMax:function(Sessions,IncludePreviousClose){var MinPoint;var MaxPoint;var Min;var Max;var LowPrice;var HighPrice;var SessionHighPoint={Index:null,Price:null,SessionIndex:null};var SessionLowPoint={Index:null,Price:null,SessionIndex:null};if(IncludePreviousClose&&Sessions[0].PreviousClose!==null){Max=Min=Sessions[0].PreviousClose;}
var needsBump=false;if(this.data.Data[0].Value.IsIndex===1&&this._barSize===60){needsBump=true;}
for(var i=0;i<Sessions.length;i++){var Session=Sessions[i];this._setSession(Session);if(!Session.Trades){Session.Trades=[];}
var Low=Session.Low;var High=Session.High;if(Low||High){if(Low&&(!Min||Low.Price<Min)){Min=Low.Price;if(this._historical){MinPoint={x:this.tx(Low.Index/this._barSize),y:this.ty(Min)};}
else{if(needsBump){MinPoint={x:this.tx(Low.Index+0.5),y:this.ty(Min)};}else{MinPoint={x:this.tx(Low.Index),y:this.ty(Min)};}}
SessionLowPoint.Index=Low.Index;SessionLowPoint.Price=Low.Price;SessionLowPoint.SessionIndex=i;}
if(High&&(!Max||High.Price>Max)){Max=High.Price;if(this._historical){MaxPoint={x:this.tx(High.Index/this._barSize),y:this.ty(Max)};}
else{if(needsBump){MaxPoint={x:this.tx(High.Index+0.5),y:this.ty(Max)};}else{MaxPoint={x:this.tx(High.Index),y:this.ty(Max)};}}
SessionHighPoint.Index=High.Index;SessionHighPoint.Price=High.Price;SessionHighPoint.SessionIndex=i;}
if(Low&&(!LowPrice||Low.Price<LowPrice)){LowPrice=Low.Price;}
if(High&&(!HighPrice||High.Price>HighPrice)){HighPrice=High.Price;}}}
var UniqueHighPoint=null;var UniqueLowPoint=null;if(SessionHighPoint.Index!=null&&SessionHighPoint.Price!=null&&SessionHighPoint.SessionIndex!=null){if(SessionHighPoint.SessionIndex<Sessions.length&&SessionHighPoint.Index<Sessions[SessionHighPoint.SessionIndex].Trades.length){UniqueHighPoint=SessionHighPoint.Price;HighPrice=SessionHighPoint.Price;}}
if(SessionLowPoint.Index!=null&&SessionLowPoint.Price!=null&&SessionLowPoint.SessionIndex!=null){if(SessionLowPoint.SessionIndex<Sessions.length&&SessionLowPoint.Index<Sessions[SessionLowPoint.SessionIndex].Trades.length){UniqueLowPoint=SessionLowPoint.Price;LowPrice=SessionLowPoint.Price;}}
if(UniqueHighPoint!==null&&UniqueLowPoint!==null)
{if(SessionLowPoint.SessionIndex==SessionHighPoint.SessionIndex)
{if(SessionLowPoint.Index!==SessionHighPoint.Index)
{Sessions[SessionLowPoint.SessionIndex].Trades[SessionLowPoint.Index]=UniqueLowPoint;Sessions[SessionHighPoint.SessionIndex].Trades[SessionHighPoint.Index]=UniqueHighPoint;}}
else
{Sessions[SessionLowPoint.SessionIndex].Trades[SessionLowPoint.Index]=UniqueLowPoint;Sessions[SessionHighPoint.SessionIndex].Trades[SessionHighPoint.Index]=UniqueHighPoint;}}
else if(UniqueHighPoint!==null)
{Sessions[SessionHighPoint.SessionIndex].Trades[SessionHighPoint.Index]=UniqueHighPoint;}
else if(UniqueLowPoint!==null)
{Sessions[SessionLowPoint.SessionIndex].Trades[SessionLowPoint.Index]=UniqueLowPoint;}
return({Min:Min,Max:Max,Low:LowPrice,High:HighPrice,MinPoint:MinPoint,MaxPoint:MaxPoint});}};
/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();

function embedPlayerByVideoId(videoId,divId,height,width){if(videoId.indexOf('{')==-1){videoId='{'+videoId+'}';}
if(!height||!width){width="287";height="162";}
var microPlayerId="MicroPlayer_"+Math.floor(Math.random()*1000000);var flashPlayerPath="http://s.wsj.net/media/swf/microPlayer.swf";var flashstring="videoGUID="+videoId+"&playerid=2001&configURL="+escape("http://wsj.vo.llnwd.net/o28/players/")+"&autoStart=false&allowPlayerPopup=0";if(swfobject.getFlashPlayerVersion().major>=9){swfobject.embedSWF(flashPlayerPath,divId,width,height,"9.0.0","",{},{flashvars:flashstring,allowscriptaccess:"always",wmode:"transparent",seamlesstabbing:false,swliveconnect:true},{id:microPlayerId});}
else{nonSupportingFlashPlayer(divId);}}
function nonSupportingFlashPlayer(divId){var str='';str+='<table width="100%" cellspacing="1" cellpadding="2" bordercolor="#336699" border="2">';str+='<tbody>';str+='<tr>';str+='</tr>';str+='<tr>';str+='<td align="left">';str+='<span style="font-size: 12px;">';str+='The version of Adobe Flash Player required to view this interactive has not been found.';str+='<br/>';str+='To enjoy our complete interactive experience, please download a free copy of the latest version of Adobe Flash Player ';str+='<b>';str+='<a target="_blank" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">here.</a>';str+='</b>';str+='</span>';str+='</td>';str+='</tr>';str+='</tbody>';str+='</table>';document.getElementById(divId).innerHTML=str;}
