//** Loads albums in overlay using fancybox on the store page.

$(document).ready(function() {

$("#store0, #store1, #store2, #store3, #store4, #store5, #store5, #store6, #store7, #store8, #store9, #store10, #store11, #store12, #store13, #store14, #store15, #store15, #store16, #store17, #store18, #store19, #store20, #store21, #store22, #store23, #store24, #store25, #store26, #store27, #store28, #store29, #store30, #store31, #store32, #store33, #store34, #store35, #store36, #store37, #store38, #store39, #store40, #store41, #store42, #store43, #store44, #store45, #store46, #store47, #store48, #store49, #store50, #store51, #store52, #store53, #store54, #store55, #store56, #store57, #store58, #store59, #store60").fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'fade', 
				'overlayColor'		: '#000',
				'overlayOpacity'	: 0.7,
			});


		});

//** Loads video in overlay using fancybox on the clips page.

$(document).ready(function() {

	$(".video").click(function() {
		$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'fade',
			'overlayColor'		: '#000',
			'overlayOpacity'	: 0.7,
			'title'			: this.title,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			'wmode'				: 'transparent',
			'allowfullscreen'	: 'true', 
			
			}
		});
		
		
		return false;
	});

});
//** Loads video in overlay using fancybox on the clips page.




               
//** Scroll.js used for scrolling within frame on the artists pages.

$(document).ready(function(){
	$(".scroll").click(function(event){
		//prevent the default action for the click event
		event.preventDefault();

		//get the full url - like mysitecom/index.htm#home
		var full_url = this.href;

		//split the url by # and get the anchor target name - home in mysitecom/index.htm#home
		var parts = full_url.split("#");
		var trgt = parts[1];

		//get the top offset of the target anchor
		var target_offset = $("#"+trgt).offset();
		var target_top = target_offset.top;

		//goto that anchor by setting the body scroll top to anchor top
		$('html, body').animate({scrollTop:target_top}, 500);
	});
});




