$(function(){
	$.include('scripts/', [
		'inc/function.js',
		'inc/jquery.pur5.md5.js',
		'inc/jquery.stringify.js',
		'inc/pur5.js',
		'inc/fso.js',
		'inc/pur5.deal.js',
		'taobao/taobao.api.js'
	], function(){
		var layout =  $('#TaobaoApiMonitor'),
			triggerBtn  = $('#menuTBJK'),
			modelPath = layout.attr('modelpath');
		
		$.include(modelPath + 'script/', [
			'taobao.api.monitor.js'
		], function(){
			Tb.Api.Monitor.init(layout);
		});
		
		triggerBtn.unbind('click').attr('onclick', '').click(function(){
			pur5.Pages.topMenuEvent(triggerBtn);
			
			if(!pur5.Cfg.pur5PassWordKey) {
				TradingPass.show(function(){
					pur5.Pages.setPur5PW2(true, function() {
						pur5.Pages.layoutTo(layout.attr('id'));
					});
				});
			} else {
				pur5.Pages.layoutTo(layout.attr('id'));
			}
		});
	});
});