new CDQ.component.StockChart({
	container: '#cc-performance-chart',
	acessibilityTarget: 'StockChart',
	inlineTitle: true,
	url: '{{assetsPath}}server/performance.json',
	downloadUrl: {
		csv: '/download?start={startDate}&end={endDate}',
		xls: '/downloadXLS?start={startDate}&end={endDate}'
	},
	options: {
		style: ['Solid', 'ShortDot'],
		lang: {
			rangeSelectorZoom: '',
			rangeSelectorFrom: '',
			rangeSelectorTo: '',
			startDate: 'Start Date',
			endDate: 'End Date',
			date: 'Date',
			navPercentage: 'NAV %',
			nav: 'NAV',
			indexLevel: 'Index Level %'
		},
		labels: {
			percent: {
				x: 'Date',
				y: 'Percent Change'
			},
			value: {
				x: 'Date',
				y: 'NAV'
			}
		}
	},
	trackingCallback: function(start, end) {
		wt.sendinfo({linkId: "etfus|passive|us|en|/PATH/TO/PRODUCT/.Downloads.Distribution."+start+"_"+end });
	}
});

new CDQ.component.HorizontalBarChart({
	container: '#cc-pie-chart',
	url: '{{assetsPath}}server/asset_allocation.json',
	chartData: {
		series: [{
			name: 'Asset Allocation'
		}]
	}
});

new CDQ.component.HorizontalBarChart({
	container: '#cc-horizontal-bar-chart',
	url: '{{assetsPath}}server/sector_allocation.json',
	chartData: {
		series: [{
			name: 'Lorem Ipsum Dolor'
		}]
	}
});

new CDQ.component.PremiumDiscountChart({
	urlPattern: '{{assetsPath}}server/premium_discount_v1.2.json?start={startDate}&end={endDate}',
	startDate: 20140701,
	endDate: 20140901,
	container: '.pricing-chart-wrapper',
	lang: {
		discount: 'Discount',
		premium: 'Premium'
	}
});

new CDQ.component.GeographicExposuresBarChart({
	container: '#cc-horizontal-bar-chart-2',
	url: '{{assetsPath}}server/geographic_exposures.json',
	chartData: {
		title: {
			text: '',
		}
	}
});
new CDQ.component.SectionPrint({
	printBtn: jQuery('.js-section-print'),
	elements: jQuery('.content-wrap').find('div.row, div[class^="space-"]')
});

new CDQ.component.TotalReturnsWidget({
	url: '{{assetsPath}}server/total_returns.json',
	trackingCallback: function(value) {
		wt.sendinfo({linkId: "etfus|passive|us|en|/PATH/TO/PRODUCT/.Total-Returns.Time-Period."+value });
	}
});
