/*
 FusionCharts JavaScript Library jQuery Plugin
 Copyright FusionCharts Technologies LLP
 License Information at <http://www.fusioncharts.com/license>

 @author FusionCharts Technologies LLP
 @version fusioncharts/3.2.4-release.8565
*/
(function(){var j=FusionCharts(["private","extensions.jQueryPlugin"]);if(j!==void 0){var b=window.jQuery,i,k,l;b.FusionCharts=j.core;i=function(a,d){var c,e,f,h;e=d instanceof Array||d instanceof b?Math.min(a.length,d.length):a.length;for(c=0;c<e;c+=1)if(f=d instanceof Array||d instanceof b?d[c]:d,a[c].parentNode)j.core.render(b.extend({},f,{renderAt:a[c]}));else{f=new FusionCharts(b.extend({},f,{renderAt:a[c]}));if(!b.FusionCharts.delayedRender)b.FusionCharts.delayedRender={};b.FusionCharts.delayedRender[f.id]=
a[c];h=document.createElement("script");h.setAttribute("type","text/javascript");/msie/i.test(navigator.userAgent)&&!window.opera?h.text="FusionCharts.items['"+f.id+"'].render();":h.appendChild(document.createTextNode("FusionCharts.items['"+f.id+"'].render();"));a[c].appendChild(h)}return a};j.addEventListener("*",function(a,d){var c;b.extend(a,b.Event("fusioncharts"+a.eventType));a.sender&&a.sender.options&&a.sender.options.containerElementId?(c=a.sender.options.containerElementId,typeof c==="object"?
b(c).trigger(a,d):b("#"+c).length?b("#"+c).trigger(a,d):b(document).trigger(a,d)):b(document).trigger(a,d)});k=function(a){return a.filter(":FusionCharts").add(a.find(":FusionCharts"))};l=function(a,d,c){typeof d==="object"&&a.each(function(){this.configureLink(d,c)})};b.fn.insertFusionCharts=function(a){return i(this,a)};b.fn.appendFusionCharts=function(a){a.insertMode="append";return i(this,a)};b.fn.prependFusionCharts=function(a){a.insertMode="prepend";return i(this,a)};b.fn.attrFusionCharts=function(a,
d){var c=[],b=k(this);if(d!==void 0)return b.each(function(){this.FusionCharts.setChartAttribute(a,d)}),this;if(typeof a==="object")return b.each(function(){this.FusionCharts.setChartAttribute(a)}),this;b.each(function(){c.push(this.FusionCharts.getChartAttribute(a))});return c};b.fn.updateFusionCharts=function(a){var b,c,e,f,h,g={},j=k(this),i=[["swfUrl",!1],["height",!1],["width",!1],["bgColor",!0],["renderer",!0],["dataFormat",!1],["dataSource",!1],["detectFlashVersion",!0],["autoInstallRedirect",
!0],["lang",!0],["scaleMode",!0],["debugMode",!0]];b=0;for(c=i.length;b<c;b+=1)h=i[b][0],a[h]&&(i[b][1]&&(f=!0),g[h]=a[h]);j.each(function(){e=this.FusionCharts;if(f)e.clone(g).render();else{if(g.dataSource!==void 0||g.dataFormat!==void 0)g.dataSource===void 0?e.setChartData(e.args.dataSource,g.dataFormat):g.dataFormat===void 0?e.setChartData(g.dataSource,e.args.dataFormat):e.setChartData(g.dataSource,g.dataFormat);(g.width!==void 0||g.height!==void 0)&&e.resizeTo(g.width,g.height);if(g.swfUrl)e.src=
g.swfUrl,e.render()}});return this};b.fn.cloneFusionCharts=function(a,d){var c,e;typeof a!=="function"&&typeof d==="function"&&(e=a,a=d,d=e);c=[];k(this).each(function(){c.push(this.FusionCharts.clone(d,{},!0))});a.call(b(c),c);return this};b.fn.disposeFusionCharts=function(){k(this).each(function(){this.FusionCharts.dispose();delete this.FusionCharts;this._fcDrillDownLevel===0&&delete this._fcDrillDownLevel});return this};b.fn.convertToFusionCharts=function(a,d){var c=[];if(typeof a.dataConfiguration===
"undefined")a.dataConfiguration={};b.extend(!0,a.dataConfiguration,d);this.each(function(){c.push(b("<div></div>").insertBefore(this).insertFusionCharts(a).get(0))});return b(c)};b.fn.drillDownFusionChartsTo=function(){var a,b,c,e,f,h=k(this);if(typeof this._fcDrillDownLevel==="undefined")this._fcDrillDownLevel=0;a=0;for(b=arguments.length;a<b;a+=1)if(f=arguments[a],f instanceof Array){c=0;for(e=f.length;c<e;c+=1)l(h,f[c],this._fcDrillDownLevel),this._fcDrillDownLevel+=1}else l(h,f,this._fcDrillDownLevel),
this._fcDrillDownLevel+=1;return this};b.extend(b.expr[":"],{FusionCharts:function(a){return a.FusionCharts instanceof j.core}})}})();
