/**
 * Javascript for pages in the stories controller
 * @author Peter
 */
$(document).ready(function() {
	
	$('.thumb:not(.selected)').fadeTo('fast',  0.33);
	
	$('.thumb_box:not(.selected)').hover(function() {
		onState($(this));
	}, function() {
		offState($(this));
	})

	
	$('.thumb').click(function() {
		$(this).attr('id');
	});
	
});

function onState(elm) {
	var thumb = elm.find('.thumb');
	var play = elm.find('.play');
	
	$(thumb).fadeTo('fast',  1);
	//$(play).css('background-image', 'url(../img/btn_play_on.gif)');
}

function offState(elm) {
	var thumb = elm.find('.thumb');
	var play = elm.find('.play');
	
	$(thumb).fadeTo('fast',  0.33);
	//$(play).css('background-image', 'url(../img/btn_play.gif)');
}