var sxUtil = sxUtil || {};

sxUtil['tabs'] = function(tab_selector, option, back_url) {
	var op = {
		disabled : [ 0 ],// 禁用第1个
		active : 1,
		cache : false,
		activate: function(event, ui) {
			ui.oldPanel.html('');//清除上一个tab内容
		},
		beforeLoad : function(event, ui) {
			ui.jqXHR.error(function() {
				ui.panel.html("不能加载该标签页。(Page Not Found!)");
			});
		},
		load : function(event, ui) {
			$('.ui-tabs-panel').addClass("col-xs-12");
		}
	};

	op = $.extend(op, option);
	$(tab_selector).tabs(op);
	
	$('#back-to-page').click(function() {
		$('#loadContent').load(back_url, function(e) {
		});
	});

}
