  $j(document).ready(function(){
	$j(".labellink").lightBox({
		imageLoading: '/images/lightbox-ico-loading.gif',
		imageBtnClose: '/images/lightbox-btn-close.gif'
	});
	
	$j(".ajaxMore").click(function()
	{
		var tmp = $j(this).parent().next("a");
		if(tmp.hasClass("ajaxTrack"))
		{
			tmp.hide();
		}
	});
	
	$j(".mp3player").live("click", function()
	{
		var newId = $j(this).attr("id");
		var oldId = $j(".player").attr("id");
		var url = "/mvc_stock_mp3/" + newId + ".mp3";
		
		if(oldId != 0)
		{
			$j(".player").before("<img src=\"/images/play.png\"/ class=\"mp3player\" id=" + oldId + ">").remove();
		}
		
		//$(this).before("<object class=\"player\" id=" + newId + " type=\"application/x-shockwave-flash\" data=\"/player.swf\" width=\"140\" height=\"14\"><param name=\"movie\" value=\"/player.swf\" /><param name=\"FlashVars\" " /></object>").remove();
		
		$j(this).before("<embed width=\"140\" height=\"14\" flashvars=\"mp3=" + url  + "&amp;autoplay=1&amp;showstop=1&amp;showvolume=1\" class=\"player\" id=" + newId + " src=\"/player.swf\" type=\"application/x-shockwave-flash\"/>").remove();
	});
	
	$j("a[rel^='prettyPopin']").prettyPopin({
		modal : false, /* true/false */
		width : false, /* false/integer */
		height: false, /* false/integer */
		opacity: 0.5, /* value from 0 to 1 */
		animationSpeed: 'fast', /* slow/medium/fast/integer */
		followScroll: true, /* true/false */
		loader_path: 'images/prettyPopin/loader.gif', /* path to your loading image */
		callback: function(){} /* callback called when closing the popin */
	});
  });
