
	jQuery(document).ready(function(){
		jQuery('#access ul li').hover(function(){
			jQuery(this).find('ul').parent().find('>a:first-child').toggleClass('jq-hover');
		});
		
		jQuery('.tabcontent').addClass('jq-tabcontent').attr('id', function(e){
			return "tab" + e;
		});
		jQuery('#tabContainer a.post-title').attr("href", function(e, oldval){
				return oldval + "#tab" + e;
		});

	
		jQuery('.entrycontent').addClass('jq-entrycontent');
		
		var tabContainers = jQuery('div.tabcontent');
		tabContainers.hide();
		
		jQuery('#tabContainer a.post-title').click(function () {
				tabContainers.hide();
				jQuery('.entrycontent').hide();
				tabContainers.filter(this.hash).show();
				jQuery('html, body').animate({scrollTop: jQuery("#tabContainer").offset().top - 100}, 500);
				return false;
		});
	
		var openTab = jQuery(location.hash).filter(tabContainers);

		if(openTab.length){
		  jQuery("a[href='"+location.hash+"']").click();
		}
		
		jQuery('.content-instructor:empty').parent().parent().find('a').contents().unwrap();
		
		//WINSOR FIT CLUB Side-menu
		if(jQuery('#side-menu ul> li >ul >li >ul >li').hasClass('current-menu-item')){
			jQuery('#side-menu ul >li >ul >li >ul> li').parent().parent().parent().children().children().children().not((jQuery('.current-menu-item').parent().children())).hide();
		}
		else if (jQuery('#side-menu ul >li> ul> li').hasClass('current-menu-item')){
			jQuery('#side-menu ul >li >ul >li').parent().children().find('ul').not((jQuery('.current-menu-item').children())).hide();
		}
		else {
			jQuery('#side-menu ul> li >ul >li >ul').hide();
		}
	});


function playVid(playerid, vid_num, width, height) {
	var params = { allowScriptAccess: "always", allowFullScreen: "true" };
	var atts = { id: playerid };
	swfobject.embedSWF(
		"http://www.youtube.com/v/"+vid_num+"&version=3&amp;hl=en_US&autoplay=1",
		playerid+"_tag", width, height, "8", null, null, params, atts
	);
}


