jQuery(document).ready(function($) {


//Featured Content Fader


	$('#myController').jFlow({
		slides: '#feature',
		controller: '.jFlowControl', // must be class, use . sign
		slideWrapper : '#jFlowSlide', // must be id, use # sign
		selectedWrapper: 'jFlowSelected',  // just pure text, no sign
		width: '733px',
		height: '393px',
		duration: 800,
		prev: '.jFlowPrev', // must be class, use . sign
		next: '.jFlowNext' // must be class, use . sign
	});

	$('li.menu ul').hide();
	$('li.artists').hoverIntent({
		sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)
		interval: 50, // number = milliseconds for onMouseOver polling interval
		over: servReveal, // function = onMouseOver callback (REQUIRED)
		timeout: 45, // number = milliseconds delay before onMouseOut
		out: servHide // function = onMouseOut callback (REQUIRED)
		});
	function servReveal() {
		$('li.artists').addClass('foo');
		$('li.artists ul').slideDown('fast');
		$('li.artists li:last a').addClass('bar');
		}
	function servHide() {
		$('li.artists').removeClass('foo');
		$('li.artists ul').slideUp('fast');
		$('li.artists li:last a').removeClass('bar');
		}

	$('li.releases').hoverIntent({
		sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)
		interval: 200, // number = milliseconds for onMouseOver polling interval
		over: releaseReveal, // function = onMouseOver callback (REQUIRED)
		timeout: 500, // number = milliseconds delay before onMouseOut
		out: releaseHide // function = onMouseOut callback (REQUIRED)
		});
	function releaseReveal() {
		$('li.releases').addClass('foo');
		$('li.releases ul').slideDown('fast');
		$('li.releases li:last a').addClass('bar');
		}
	function releaseHide() {
		$('li.releases').removeClass('foo');
		$('li.releases ul').slideUp('fast');
		$('li.releases li:last a').removeClass('bar');
		}


	$('div .entry>p:first').addClass('woo');
	$('div .entry>.ssg-gplayer:last').addClass('woo');
	$('#buy-box>#shopp:first').addClass('shoppMove');
	$('.entry>#shopp .price.mp3').css('display','none');
	
	$('.mp3Script button').click(function() {
		$('.entry .price.mp3').show('medium');
		//alert ('foo');
		$('div.ssg-gplayer.woo').css('margin-bottom','0');
		$('div .entry>#shopp:last').css('margin-bottom','10px');
		return false;
		});
	

	$('.single .ssg-gplayer .title').toggle(function(){
		$(this).next('object').show();
		$(this).next('object').children('object').show();
		},function(){
		$(this).next('object').hide();
		$(this).next('object').children('object').hide();
		});
		

	$('#sidebar .ssg-gplayer object').attr({width : "188"});


/*	$('.wpa_play').click(function() {
		$(this).addClass('clicked');
		var $wonka = $(this).siblings();
		//$wonka = $wonka.parent().next('#shopp');
//		var $wonka = $('.clicked').siblings();
		//$wonka.css('background-color','blue');
		var $willy = $wonka.parent();
		$willy.addClass('foo');
		//$willy.css('background-color','red');
		$('.foo + script + #shopp').css('margin-top','-37px');
		});
*/
	//$('.single .entry .wp-caption img').wrap('<div class="thePic"></div>');

	var $heavy = $('.single .entry img:last');
	$heavy.wrap('<span class="thePic"></span>');

});