// THUMBNAIL FADE FROM SW TO COLOUR
// -----------------------------------------------------------------------
$(document).ready(function() {
	$("ul.gallery li").hover(function() { //On hover...
		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'

		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});

		//Animate the image to 0 opacity (fade it out)
		$(this).find("span").stop().animate({opacity: 0}, 300);} , function() { //on hover out...

		//Animate the image back to 100% opacity (fade it back in)
		$(this).find("span").stop().animate({opacity: 1}, 300);
	});
});


// HISTORY BACK
//---------------------------------------------------------------------
function goback (sonsturl) {
	if (history.length > 0) {
		history.back ();
		} else {
		window.location.href(sonsturl);
	}
}


// FANCYBOX
//---------------------------------------------------------------------
$(document).ready(function() {

	/* This is basic - uses default settings */
	$("a#single_image").fancybox();


	/* Using custom settings */
	$("a#inline").fancybox({
		'hideOnContentClick': true
	});

	$("a.group").fancybox({
		'transitionIn' : 'elastic',
		'transitionOut' : 'elastic',
		'zoomSpeedIn': 300,
		'zoomSpeedOut': 300,
		'hideOnContentClick' : false,
		'centerOnScroll': true,
		'overlayShow': true
	});

});


// 1BIT AUDIOPLAYER
//---------------------------------------------------------------------
oneBit = new OneBit('/1bit/1bit.swf');
	oneBit.ready(function() {
		oneBit.specify('color', '#000000');
		oneBit.specify('background', 'transparent');
		oneBit.specify('playerSize', '16');
		oneBit.specify('position', 'before');
		oneBit.specify('analytics', false);
		oneBit.apply('a');
	});
	
	