$(function (){
	$("#musica a").click(function(){
		popup("1.mp3");
	});
	$("li.mMusica a").click(function(){
		popup("1.mp3");
	});

function popup(audio) {
		newwindow=window.open("",'ply','width=160,height=50,left=0,top='+(screen.height+10)+',scrollbars=no');
		newwindow.resizeTo(160,50);
		newwindow.moveTo(0,screen.height);
		if (window.focus) {newwindow.focus()}
		
		/**/
		var playerpath = root+"web-media/swf/";	
		var filename = root+"web-media/mp3/"+audio;
			
		var options = {
			"filepath": root+"web-media/mp3/",										
			"backcolor": "A53D6E",									
			"forecolor": "ffffff",								
			"width": "150",										
			"repeat": "true",										
			"volume": "100",										
			"autoplay": "true",								
			"showdownload": "false",								
			"showfilename": "false"								
		};
		
		var mp3html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
		mp3html += '<html xmlns="http://www.w3.org/1999/xhtml">';
		mp3html += '<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Escuela Internacional de Yoga</title>';
		mp3html += '<style>body {margin: 0 0 0 0;padding: 0;background: #A53D6E;color: #fff;font-size:90%}\n #player {width: 110px;height: 40px;display: block;padding: 0px 0 0 5px;}</style>';
		mp3html += '</head><body><div id="player">';
		
		mp3html += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
		mp3html += 'width="' + options.width + '" height="40" ';
		mp3html += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">';
		mp3html += '<param name="movie" value="' + playerpath + 'singlemp3player.swf?';
		mp3html += 'showDownload=' + options.showdownload + '&file=' + filename + '&autoStart=' + options.autoplay;
		mp3html += '&backColor=' + options.backcolor + '&frontColor=' + options.forecolor;
		mp3html += '&repeatPlay=' + options.repeat + '&songVolume=' + options.volume + '" />';
		mp3html += '<param name="wmode" value="transparent" />';
		mp3html += '<embed wmode="transparent" width="' + options.width + '" height="40" ';
		mp3html += 'src="' + playerpath + 'singlemp3player.swf?'
		mp3html += 'showDownload=' + options.showdownload + '&file=' + filename + '&autoStart=' + options.autoplay;
		mp3html += '&backColor=' + options.backcolor + '&frontColor=' + options.forecolor;
		mp3html += '&repeatPlay=' + options.repeat + '&songVolume=' + options.volume + '" ';
		mp3html += 'type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
		mp3html += '</object>';
		
		mp3html += '</div>';
		mp3html += '</body></html>';
		
		newwindow.document.write(mp3html);
      newwindow.document.close();
		
		return false;
	}
});

