$(document).ready(function() {
	$(".tab_content").hide();
	$("ul.tabs li:first").addClass("active").show();
	$(".tab_content:first").show(); 
	
	//On Click Event
	$("ul.sub_tabs li").click(function() {

		$("ul.sub_tabs li").removeClass("sub_active");
		$(this).addClass("sub_active"); 
		$(".sub_tab_content").hide(); 

		var subActiveTab = $(this).find("a").attr("href");
		$(subActiveTab).fadeIn();
		return false;
	});
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active");
		$(this).addClass("active"); 
		$(".tab_content").hide(); 
		if( $('#vbvideo').length != 0 )
			loadVBVideo();
			
		$(".sub_tab_content").hide(); 
		$("ul.sub_tabs li").removeClass("sub_active");
		$("ul.sub_tabs li.first-on").addClass("sub_active").show();
		$(".sub_tab_content:first").show();
		
		var activeTab = $(this).find("a").attr("href");
		$(activeTab).fadeIn();
		return false;
	});

});
