$(function() {
 	//add a class of js to the body	
	$('body').addClass('js');

	//launch the beatplayer
	$("#launchBeats").click(function(){
		window.open('/beats/player.html','wimpyMP3player','width=300,height=350');
		return false;
	});

	//do the discography img hover text
	hoverTextImg = $('.page-body .imgGridItem img');
	hoverTextImg.each(function(){
		$(this).mouseover(function(){
			$(this).parent('a').parent('div').find('span').removeClass('imgGridTitle').addClass('imgGridTitleShow');
		});
		$(this).mouseout(function(){
			$(this).parent('a').parent('div').find('span').removeClass('imgGridTitleShow').addClass('imgGridTitle');
		});
	});

	//universal show/hides - needs work
	$(".toggle").toggle(function(){
		$(".collapsable").animate({ height: 'hide', opacity: 'hide' }, 'slow');
	},function(){
		$(".collapsable").animate({ height: 'show', opacity: 'show' }, 'slow');
	});

	//logo hover opacity
	$('h1#logo').each(function(){
		$(this).mouseover(function(){
			$(this).animate({opacity: '.5'}, 'fast');
		});
		$(this).mouseout(function(){
			$(this).animate({opacity: '1'}, 'fast');
		});
	});

	//1bit audio
	oneBit = new OneBit('/js/1bit/1bit.swf');
	oneBit.ready(function(){
		oneBit.specify('color', '#ffffff');
		oneBit.specify('background', '#111111');
		oneBit.specify('playerSize', '10');
		oneBit.specify('position', 'after');
		oneBit.specify('analytics', false);
		oneBit.apply('a.previewAudio');
		$('a.previewAudio').click(function(){
			return false;
		});		
	});

	//tooltips
	//$('a').Tooltip({track: true, delay: 0, showURL: false, opacity: 1, top: -18, left: -18});
		
});//end $(function()