Index: podpress.css
===================================================================
--- podpress.css	(Revision 210539)
+++ podpress.css	(Arbeitskopie)
@@ -79,6 +79,10 @@
 	clear:left;
 }
 
+.podPress_videoplayer_wrapper:hover {
+	cursor:pointer;
+}
+
 /* Navi
 ************************************************/
 
Index: podpress.js
===================================================================
--- podpress.js	(Revision 210539)
+++ podpress.js	(Arbeitskopie)
@@ -33,99 +33,50 @@
 		refPlayerDiv.innerHTML = podPressGenerateVideoPreview (strPlayerDiv, strMediaFile, numWidth, numHeight, strPreviewImg);
 	}
 
-	function podPressGenerateVideoPreview (strPlayerDiv, strMediaFile, numWidth, numHeight, strPreviewImg, bPreviewOnly, forEditor) {
-		if (typeof numWidth == 'undefined') {
-			numWidth = 320;
-		}
-		if (typeof numHeight == 'undefined') {
-			numHeight = 240;
-		}
-		if (typeof strPreviewImg == 'undefined') {
-			strPreviewImg = podPressDefaultPreviewImage;
-		}
-		if (typeof bPreviewOnly == 'undefined') {
-			bPreviewOnly = false;
-		}
+	function podPressGenerateVideoPreview (strPlayerDiv, strMediaFile, numWidth, numHeight, strPreviewImg, bPreviewOnly) {
+		if (typeof numWidth == 'undefined') { numWidth = 320; }
+		if (typeof numHeight == 'undefined') { numHeight = 240; }
+		if (typeof strPreviewImg == 'undefined') { strPreviewImg = podPressDefaultPreviewImage; }
+		if (typeof bPreviewOnly == 'undefined') { bPreviewOnly = false; }
 
-		if(numHeight < 80) {
-			strPreviewImg = podPressBackendURL+'images/vpreview_center_text.png';
-		}
+		if (false == bPreviewOnly) {
+			var strOnclick= ' onclick="javascript:podPressShowHidePlayer('+strPlayerDiv+', \''+strMediaFile+'\', '+numWidth+', '+numHeight+', \'force\'); return false;"';
+		} else {
+			var strOnclick= ''; // for a preview of this preview player at the player settings page on the admin pages
+		}	
 
-		var strTopBgWidth = numWidth-14;
-		var strBottomBgWidth = numWidth - 126;
-		var strTableWidth = numWidth+14;
-		var strDimensions = numWidth+':'+numHeight;
-
 		var strResult = '';
-		// This "if"-condition is only a kind of a quick fix. The Box-Model layout will be used for the blog pages and the old table based layout for the editor pages.
-		// This should be cleaned up in future versions.
-		if (true != forEditor) {
-			strResult += '<div class="podPress_videoplayer_wrapper" style="width: '+strTableWidth+'px; padding:0px; margin:0px; display:block; background-color:#ff0000;">';
-			strResult += '	<div class="podPress_videoplayer_toprow" style="width:100%; padding:0px; margin:0px;">';
-			strResult += '		<img src="'+podPressBackendURL+'images/vpreview_top_left.png" style="width:7px; height:27px; float:left; padding:0px; margin:0px;" alt="."/>';
-			strResult += '		<span style="height:27px; border:0px; display:block; float:left; padding:0px; margin:0px; width: '+numWidth+'px; text-align:center; background:url(\''+podPressBackendURL+'images/vpreview_top_background.png\'); background-repeat: repeat-x;"><img src="'+podPressBackendURL+'images/vpreview_top_middle.png" style="width:119px; height:27px padding:0px; margin:0px; border:0px;" alt="." /></span>';
-			strResult += '		<img src="'+podPressBackendURL+'images/vpreview_top_right.png" style="width:7px; height:27px; float:left; padding:0px; margin:0px;" alt="." />';
-			strResult += '	</div>';
-			
-			strResult += '	<div class="podPress_videoplayer_middlerow" style="width:100%; padding:0px; margin:0px; background-color:#ffff00;">';
-			strResult += '		<span style="width:7px; height:'+numHeight+'px; padding:0px; margin:0px; display:block; float:left; background:url(\''+podPressBackendURL+'images/vpreview_left_background.png\'); background-repeat:repeat-y;"></span>';
-			strResult += '		<img class="#podPress_previewImage" src="'+strPreviewImg+'" style="width:'+numWidth+'px; height:'+numHeight+'px; padding:0px; margin:0px; border:0px; float:left;" alt="previewImg"  id="podPress_previewImageIMG_'+strPlayerDiv+'"';
-			if(!bPreviewOnly) {
-				strResult += ' onclick="javascript:podPressShowHidePlayer('+strPlayerDiv+', \''+strMediaFile+'\', '+numWidth+', '+numHeight+', \'force\'); return false;"';
-			}
-			strResult += ' />';
-			strResult += '		<span style="width:7px; height:'+numHeight+'px; padding:0px; margin:0px; display:block; float:left; background:url(\''+podPressBackendURL+'images/vpreview_right_background.png\'); background-repeat:repeat-y;"></span>';
-			strResult += '	</div>';
-			
-			strResult += '	<div class="podPress_videoplayer_bottomrow" style="width:100%; padding:0px; margin:0px; background-color:#ff00ff;">';
-			strResult += '		<img src="'+podPressBackendURL+'images/vpreview_bottom_left.png" style="width:7px; height:23px; float:left; padding:0px; margin:0px;" alt="." />';
-			strResult += '		<span style="display:block; float:left; padding:0px; margin:0px; text-align: left; background:url(\''+podPressBackendURL+'images/vpreview_bottom_background.png\'); background-repeat: repeat-x;"><img src="'+podPressBackendURL+'images/vpreview_bottom_middle_left.png" style="width:56px; height:23px" alt="." /></span>';
-			strResult += '		<span style="height:23px; display:block; float:left; padding:0px; margin:0px; width:'+String(Math.abs(numWidth-112))+'px; background:url(\''+podPressBackendURL+'images/vpreview_bottom_background.png\'); background-repeat: repeat-x;"></span>';
-			strResult += '		<span style="display:block; float:left; padding:0px; margin:0px; text-align:right; background:url(\''+podPressBackendURL+'images/vpreview_bottom_background.png\'); background-repeat: repeat-x;"><img src="'+podPressBackendURL+'images/vpreview_bottom_middle_right.png" style="width:56px; height:23px" alt="." /></span>';
-			strResult += '		<img src="'+podPressBackendURL+'images/vpreview_bottom_right.png" style="width:7px; height:23px; float:left; padding:0px; margin:0px;" alt="." />';
-			strResult += '	</div>';
-			strResult += '</div>';
-		} else {
-			strResult += '<table class="podPress_previewImage" style="width: '+strTableWidth+'px;" cellpadding="0" cellspacing="0">';
-			strResult += '<tr class="podPress_previewImage">';
-			strResult += '<td class="podPress_previewImage" style="height: 27px; width: 7px; text-align: left;"><img class="podPress_previewImage" width="7" height="27" src="'+podPressBackendURL+'images/vpreview_top_left.png" border="0" alt="."/></td>';
-			strResult += '<td class="podPress_previewImage" colspan="3" style="height: 27px; width: '+strTopBgWidth+'px; text-align: center; background: url(\''+podPressBackendURL+'images/vpreview_top_background.png\'); background-repeat: repeat-x;"><img width="119" height="27" class="podPress_previewImage" src="'+podPressBackendURL+'images/vpreview_top_middle.png" border="0" alt="."/></td>';
-			strResult += '<td class="podPress_previewImage" style="height: 27px; width: 7px; text-align: right;"><img class="podPress_previewImage" width="7" height="27"  src="'+podPressBackendURL+'images/vpreview_top_right.png" border="0" alt="."/></td>';
-			strResult += '</tr>';
-			strResult += '<tr class="podPress_previewImage">';
-			strResult += '<td class="podPress_previewImage" style="width: 7px; background: url(\''+podPressBackendURL+'images/vpreview_left_background.png\'); background-repeat: repeat-y;">&nbsp;</td>';
-			strResult += '<td class="podPress_previewImage" colspan="3" style="width: '+numWidth+'px;">';
-			strResult += '<img class="#podPress_previewImage" src="'+strPreviewImg+'" border="0" width="'+numWidth+'" height="'+numHeight+'" alt="previewImg"  id="podPress_previewImageIMG_'+strPlayerDiv+'"';
-			if(!bPreviewOnly) {
-				strResult += ' onclick="javascript: podPressShowHidePlayer('+strPlayerDiv+', \''+strMediaFile+'\', '+numWidth+', '+numHeight+', \'force\'); return false;"';
-			}
-			strResult += '/>';
-			strResult += '</td>';
-			strResult += '<td class="podPress_previewImage" style="width: 7px; background: url(\''+podPressBackendURL+'images/vpreview_right_background.png\'); background-repeat: repeat-y;">&nbsp;</td>';
-			strResult += '</tr>';
-			strResult += '<tr class="podPress_previewImage">';
-			strResult += '<td class="podPress_previewImage" style="height: 23px; width: 7px;"><img class="podPress_previewImage" width="7" height="23" src="'+podPressBackendURL+'images/vpreview_bottom_left.png" border="0" alt="."/></td>';
-			strResult += '<td class="podPress_previewImage" style="height: 23px; text-align: left; background: url(\''+podPressBackendURL+'images/vpreview_bottom_background.png\'); background-repeat: repeat-x;"><img class="podPress_previewImage" width="56" height="23" src="'+podPressBackendURL+'images/vpreview_bottom_middle_left.png" border="0"  alt="."/></td>';
-			strResult += '<td class="podPress_previewImage" style="height: 23px; width: '+strBottomBgWidth+'px; background: url(\''+podPressBackendURL+'images/vpreview_bottom_background.png\'); background-repeat: repeat-x;">&nbsp;</td>';
-			strResult += '<td class="podPress_previewImage" style="height: 23px; text-align: right; background: url(\''+podPressBackendURL+'images/vpreview_bottom_background.png\'); background-repeat: repeat-x;"><img class="podPress_previewImage" width="56" height="23" src="'+podPressBackendURL+'images/vpreview_bottom_middle_right.png" border="0"  alt="."/></td>';
-			strResult += '<td class="podPress_previewImage" style="height: 23px; width: 7px;"><img class="podPress_previewImage" width="7" height="23" src="'+podPressBackendURL+'images/vpreview_bottom_right.png" border="0" alt="."/></td>';
-			strResult += '</tr>';
-			strResult += '</table>';
+		strResult += '<div class="podPress_videoplayer_wrapper" style="width: '+String(Number(numWidth)+14)+'px; padding:0px; margin:0px; display:block; background-color:#ff0000;"'+strOnclick+'>';
+		strResult += '	<div class="podPress_videoplayer_toprow" style="width:100%; padding:0px; margin:0px;">';
+		strResult += '		<img src="'+podPressBackendURL+'images/vpreview_top_left.png" style="width:7px; height:27px; float:left; padding:0px; margin:0px;" alt="."/>';
+		strResult += '		<span style="height:27px; border:0px; display:block; float:left; padding:0px; margin:0px; width: '+numWidth+'px; text-align:center; background:url(\''+podPressBackendURL+'images/vpreview_top_background.png\'); background-repeat: repeat-x;"><img src="'+podPressBackendURL+'images/vpreview_top_middle.png" style="width:119px; height:27px padding:0px; margin:0px; border:0px;" alt="." /></span>';
+		strResult += '		<img src="'+podPressBackendURL+'images/vpreview_top_right.png" style="width:7px; height:27px; float:left; padding:0px; margin:0px;" alt="." />';
+		strResult += '	</div>';
+		
+		if (25 < Number(numHeight)) { // if the height value is smaller than 25 px then create a player preview without an cover or chapter image
+		strResult += '	<div class="podPress_videoplayer_middlerow" style="width:100%; padding:0px; margin:0px;">';
+		strResult += '		<span style="width:7px; height:'+numHeight+'px; padding:0px; margin:0px; display:block; float:left; background:url(\''+podPressBackendURL+'images/vpreview_left_background.png\'); background-repeat:repeat-y;"></span>';
+		strResult += '		<img class="podPress_previewImage" src="'+strPreviewImg+'" style="width:'+numWidth+'px; height:'+numHeight+'px; padding:0px; margin:0px; border:0px; float:left;" alt="previewImg"  id="podPress_previewImageIMG_'+strPlayerDiv+'" />';
+		strResult += '		<span style="width:7px; height:'+numHeight+'px; padding:0px; margin:0px; display:block; float:left; background:url(\''+podPressBackendURL+'images/vpreview_right_background.png\'); background-repeat:repeat-y;"></span>';
+		strResult += '	</div>';
 		}
+		
+		strResult += '	<div class="podPress_videoplayer_bottomrow" style="width:100%; padding:0px; margin:0px;">';
+		strResult += '		<img src="'+podPressBackendURL+'images/vpreview_bottom_left.png" style="width:7px; height:23px; float:left; padding:0px; margin:0px;" alt="." />';
+		strResult += '		<span style="display:block; float:left; padding:0px; margin:0px; text-align: left; background:url(\''+podPressBackendURL+'images/vpreview_bottom_background.png\'); background-repeat: repeat-x;"><img src="'+podPressBackendURL+'images/vpreview_bottom_middle_left.png" style="width:56px; height:23px" alt="." /></span>';
+		strResult += '		<span style="height:23px; display:block; float:left; padding:0px; margin:0px; width:'+String(Math.abs(Number(numWidth)-112))+'px; background:url(\''+podPressBackendURL+'images/vpreview_bottom_background.png\'); background-repeat: repeat-x;"></span>';
+		strResult += '		<span style="display:block; float:left; padding:0px; margin:0px; text-align:right; background:url(\''+podPressBackendURL+'images/vpreview_bottom_background.png\'); background-repeat: repeat-x;"><img src="'+podPressBackendURL+'images/vpreview_bottom_middle_right.png" style="width:56px; height:23px" alt="." /></span>';
+		strResult += '		<img src="'+podPressBackendURL+'images/vpreview_bottom_right.png" style="width:7px; height:23px; float:left; padding:0px; margin:0px;" alt="." />';
+		strResult += '	</div>';
+		strResult += '</div>';
 		return String(strResult);
 	}
 
 	function podPressGeneratePlayer(strPlayerDiv, strMediaFile, numWidth, numHeight, strAutoStart, strPreviewImg) {
-		if (typeof numWidth == 'undefined' || numWidth == '') {
-			numWidth = 320;
-		}
-		if (typeof numHeight == 'undefined' || numHeight == '') {
-			numHeight = 240;
-		}
-
-		if (typeof strAutoStart == 'undefined') {
-			strAutoStart = 'false';
-		}
+		if (typeof numWidth == 'undefined') { numWidth = 320; }
+		if (typeof numHeight == 'undefined') { numHeight = 240; }
+		if (typeof strAutoStart == 'undefined') { strAutoStart = 'false'; }
+		
 		if(strAutoStart == 'nopreview') {
 			return '';
 		}
@@ -143,13 +94,15 @@
 			var strExt = '';
 		}
 		strExt = strExt.toLowerCase();
-
-		if(strExt != 'mp3' && strExt != 'flv' && strExt != 'yyoutube' && strAutoStart == 'false') {
+		
+		if(strExt != 'mp3' && strExt != 'flv' && strExt != 'youtube' && strAutoStart == 'false') {
 			if(strExt == 'youtube') {
 				strMediaFile = strMediaFile+'.youtube';
 			}
-			return podPressGenerateVideoPreview (strPlayerDiv, strMediaFile, numWidth, numHeight, strPreviewImg);
+			return podPressGenerateVideoPreview(strPlayerDiv, strMediaFile, numWidth, numHeight, strPreviewImg);
 		}
+
+		var strResult = '';
 		switch (strExt) {
 			case 'm4v':
 			case 'm4a':
@@ -181,7 +134,8 @@
 						var strMimeType = 'video/quicktime';
 						break;
 				}
-				strResult = '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="'+numWidth+'" height="'+numHeight+'" codebase="http://www.apple.com/qtactivex/qtplugin.cab">';
+				numHeight = String(Number(numHeight)+ 18); // add up the height of the player controls
+				strResult = '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="'+numWidth+'px" height="'+numHeight+'px" codebase="http://www.apple.com/qtactivex/qtplugin.cab">';
 				strResult += '	<param name="src" value="'+strMediaFile+'" />';
 				strResult += '	<param name="href" value="'+strMediaFile+'" />';
 				strResult += '	<param name="scale" value="aspect" />';
@@ -189,13 +143,14 @@
 				strResult += '	<param name="autoplay" value="'+strAutoStart+'" />';
 				strResult += '	<param name="bgcolor" value="000000" />';
 				strResult += '	<param name="pluginspage" value="http://www.apple.com/quicktime/download/" />';
-				strResult += '	<embed src="'+strMediaFile+'" width="'+numWidth+'" height="'+numHeight+'" scale="aspect" cache="true" bgcolor="000000" autoplay="'+strAutoStart+'" controller="true" src="'+strMediaFile+'" type="'+strMimeType+'" pluginspage="http://www.apple.com/quicktime/download/"></embed>';
-				strResult += '</object><br/><br/>';
+				strResult += '	<embed src="'+strMediaFile+'" style="width:'+numWidth+'px; height:'+numHeight+'px; background-color:#000;" scale="aspect" cache="true" autoplay="'+strAutoStart+'" controller="true" src="'+strMediaFile+'" type="'+strMimeType+'" pluginspage="http://www.apple.com/quicktime/download/"></embed>';
+				strResult += '</object><br/>';
 				break;
 			case 'wma':
 			case 'wmv':
 			case 'asf':
-				strResult = '<object id="winplayer" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="'+numWidth+'" height="'+numHeight+'" standby="Media is loading..." type="application/x-oleobject">';
+				numHeight = String(Number(numHeight)+ 44); // add up the height of the player controls
+				strResult = '<object id="winplayer" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="'+numWidth+'px" height="'+numHeight+'px" standby="Media is loading..." type="application/x-oleobject">';
 				strResult += '	<param name="url" value="'+strMediaFile+'" />';
 				strResult += '	<param name="AutoStart" value="'+strAutoStart+'" />';
 				strResult += '	<param name="AutoSize" value="true" />';
@@ -207,8 +162,8 @@
 				strResult += '	<param name="ShowCaptioning" value="false" />';
 				strResult += '	<param name="ShowDisplay" value="false" />';
 				strResult += '	<param name="ShowStatusBar" value="false" />';
-				strResult += '	<embed type="application/x-mplayer2" src="'+strMediaFile+'" width="'+numWidth+'" height="'+numHeight+'" scale="aspect" AutoStart="'+strAutoStart+'" ShowDisplay="0" ShowStatusBar="0" AutoSize="1" AnimationAtStart="1" AllowChangeDisplaySize="1" ShowControls="1"></embed>';
-				strResult += '</object><br/><br/>';
+				strResult += '	<embed type="application/x-mplayer2" src="'+strMediaFile+'" style="width:'+numWidth+'px; height:'+numHeight+'px; background-color:#000;" scale="aspect" AutoStart="'+strAutoStart+'" ShowDisplay="0" ShowStatusBar="0" AutoSize="1" AnimationAtStart="1" AllowChangeDisplaySize="1" ShowControls="1"></embed>';
+				strResult += '</object><br/>';
 				break;
 			case 'swf':
 				if(strAutoStart == 'true') {
@@ -235,7 +190,7 @@
 				strResult = '<object type="application/x-shockwave-flash" width="'+numWidth+'" height="'+numHeight+'" wmode="transparent" data="'+podPressBackendURL+'players/flvplayer.swf?file='+encodeURI(strMediaFile)+strAutoStart+'">';
 				strResult += '  <param name="movie" value="'+podPressBackendURL+'players/flvplayer.swf?file='+encodeURI(strMediaFile)+strAutoStart+'" />';
 				strResult += '  <param name="wmode" value="transparent" />';
-				strResult += '</object><br/><br/>';
+				strResult += '</object><br/>';
 				break;
 			case '.rm':
 				strResult = '<object id="realplayer" classid="clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa" width="'+numWidth+'" height="'+numHeight+'">';
@@ -243,7 +198,7 @@
 				strResult += '	<param name="autostart" value="'+strAutoStart+'" />';
 				strResult += '	<param name="controls" value="imagewindow,controlpanel" />';
 				strResult += '	<embed src="'+strMediaFile+'" width="'+numWidth+'" height="'+numHeight+'" autostart="'+strAutoStart+'" controls="imagewindow,controlpanel" type="audio/x-pn-realaudio-plugin"></embed>';
-				strResult += '</object><br/><br/>';
+				strResult += '</object><br/>';
 				break;
 			case 'ogg':
 				if(strAutoStart == 'true') {
@@ -262,7 +217,7 @@
 				strResult += '	<param name="jorbis.player.playonstartup" VALUE="'+strAutoStart+'" />';
 				strResult += '	<param name="type" VALUE="application/x-java-applet;version=1.3" />';
 				strResult += '	<comment><embed type="application/x-java-applet;version=1.3" width="'+numWidth+'" height="'+numHeight+'" java_codebase="'+podPressBackendURL+'players/" java_code="JOrbisPlayer.class" archive="JOrbisPlayer.jar,jogg.jar,jorbis.jar" jorbis.player.play.0="'+strMediaFile+'" jorbis.player.icestats="no" jorbis.player.playonstartup="'+strAutoStart+'" pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"></embed></comment>';
-				strResult += '</object><br/><br/>';
+				strResult += '</object><br/>';
 				break;
 			case 'youtube':
 				if(strAutoStart == 'true') {
@@ -274,7 +229,7 @@
 				strResult += '	<param name="movie" value="http://www.youtube.com/v/'+strMediaFile+'&rel=1&autoplay=1" />';
 				strResult += '	<param name="wmode" value="transparent" />';
 				strResult += '	<embed src="http://www.youtube.com/v/'+strMediaFile+'&rel=1&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="'+numWidth+'" height="'+numHeight+'"></embed>';
-				strResult += '</object><br/><br/>';
+				strResult += '</object><br/>';
 				break;
 			case 'mp3':
 			default:
@@ -306,7 +261,7 @@
 	function podPressShowHidePlayer(strPlayerDiv, strMediaFile, numWidth, numHeight, strAutoStart, strPreviewImg) {
 		var refPlayerDiv = document.getElementById('podPressPlayerSpace_'+strPlayerDiv);
 		var refPlayerDivLink = document.getElementById('podPressPlayerSpace_'+strPlayerDiv+'_PlayLink');
-
+		
 		if(refPlayerDiv == undefined) {
 			return false;
 		}
@@ -341,7 +296,7 @@
 				return true;
 			}
 		}
-
+		
 		if(strAutoStart == 'nopreview') {
 			refPlayerDivLink.innerHTML=podPressText_PlayNow;
 			refPlayerDiv.style.display='none';
@@ -358,7 +313,7 @@
 		refPlayerDiv.innerHTML=podPressGeneratePlayer(strPlayerDiv, strMediaFile, numWidth, numHeight, strAutoStart, strPreviewImg);
 	}
 
-	function podPressPopupPlayer(strPlayerDiv, strMediaFile, numWidth, numHeight) {
+	function podPressPopupPlayer(strPlayerDiv, strMediaFile, numWidth, numHeight, windowName) {
 		var refPlayerDiv = document.getElementById('podPressPlayerSpace_'+strPlayerDiv);
 		var refPlayerDivLink = document.getElementById('podPressPlayerSpace_'+strPlayerDiv+'_PlayLink');
 
@@ -374,35 +329,35 @@
 			}
 			refPlayerDivLink.parentNode.onclick = function(){ podPressShowHidePlayer(strPlayerDiv, strMediaFile, numWidth, numHeight, 'force'); return false; };
 		}
-
+		
+		if (typeof windowName == 'undefined') { windowName = 'podPress'; }
+		
 		var strResult = '<HTML>\n';
 		strResult += '<HEAD>\n';
-		strResult += '<TITLE>podPress Popup Player</TITLE>\n';
+		strResult += '<TITLE>'+windowName+' - Popup Player</TITLE>\n';
 		strResult += '</HEAD>\n';
 		strResult += '<BODY>\n';
+		strResult += '<div style="margin:auto;">\n';
 		strResult += podPressGeneratePlayer(1, strMediaFile, numWidth, numHeight, 'true');
+		strResult += '</div>\n';
 		strResult += '</BODY>\n';
 		strResult += '</HTML>';
 
-		if (typeof numWidth == 'undefined' || numWidth == '') {
-			numWidth = 320;
-		}
-		if (typeof numHeight == 'undefined' || numHeight == '') {
-			numHeight = 240;
-		}
+		if (typeof numWidth == 'undefined') { numWidth = 320; }
+		if (typeof numHeight == 'undefined') { numHeight = 240; }
 
 		if(podPressMP3PlayerWrapper) {
-			numWidth = numWidth + 50;
+			var windowWidth = Number(numWidth) + 50;
 		} else {
-			numWidth = numWidth + 10;
+			var windowWidth = Number(numWidth) + 20;
 		}
 
-		numHeight = numHeight + 50;
-		
-		newwindow=window.open('', 'podPressPlayer', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width='+numWidth+',height='+numHeight);
+		var windowHeight = Number(numHeight) + 50;
+		newwindow=window.open('', windowName+' - Popup Player', 'toolbar=0,scrollbars=0,location=no,statusbar=0,menubar=0,resizable=1,width='+windowWidth+',height='+windowHeight);
 		newdocument=newwindow.document;
 		newdocument.write(strResult);
 		newdocument.close();
+		newwindow.focus();
 	}
 
 	function  podPressGetBaseName(file) {
Index: podpress_admin.js
===================================================================
--- podpress_admin.js	(Revision 210539)
+++ podpress_admin.js	(Arbeitskopie)
@@ -186,14 +186,45 @@
 }
 
 function podPressUpdateDimensions(VarNum, val) {
-	var valArray = val.split(':');
+	// this function updates the player preview on the editor pages
+	var valArray = String(val).split(':');
+	if (2 != valArray.length) {
+		valArray[0] = 320;
+		valArray[1] = 240;
+	} else {
+		var dim_x = Number(valArray[0].replace(/\D+/g, ''));
+		var dim_y = Number(valArray[1].replace(/\D+/g, ''));
+		if ('NaN' == dim_x || 120 > dim_x) {
+			valArray[0]=120;
+		}
+		if (1650 < dim_x) {
+			valArray[0]=1650;
+		}
+		if ('NaN' == dim_y || 25 >= dim_y) {
+			valArray[1]=0;
+		}
+		if (1050 < dim_y) {
+			valArray[1]=1050;
+		}
+	}
+	document.getElementById('podPressMedia_'+VarNum+'_dimensionW').value = valArray[0];
+	document.getElementById('podPressMedia_'+VarNum+'_dimensionH').value = valArray[1];
 	podPressMediaFiles[VarNum]['dimensionW'] = valArray[0];
-	document.getElementById('podPressMedia_'+VarNum+'_dimensionW').value = valArray[0];
 	podPressMediaFiles[VarNum]['dimensionH'] = valArray[1];
-	document.getElementById('podPressMedia_'+VarNum+'_dimensionH').value = valArray[1];
+	document.getElementById('podPressPlayerSpace_'+String(VarNum)).innerHTML = podPressGenerateVideoPreview(VarNum, '', valArray[0], valArray[1], document.getElementById('podPressMedia_'+String(VarNum)+'_previewImage').value, true);
 	podPressShowPreviewImage(VarNum);
 }
 
+function podPressUpdateDimensionList(VarNum) {
+	// this function updates the player preview on the editor pages and tries to select the value W:H value in the selectbox with the predefined formats
+	var dimensionsStr = String(document.getElementById('podPressMedia_'+VarNum+'_dimensionW').value)+':'+String(document.getElementById('podPressMedia_'+VarNum+'_dimensionH').value);
+	podPressUpdateDimensions(VarNum, dimensionsStr);
+	var is_in = podPress_isset_in_the_list(dimensionsStr, 'podPressMedia_'+VarNum+'_dimensionList');
+	if ( true == is_in[0] ) {
+		document.getElementById('podPressMedia_'+VarNum+'_dimensionList').selectedIndex = is_in[1];
+	}
+}
+
 function podPress_set_blognamePreview(val) {
 	document.getElementById('iTunesBlognamePreview').innerHTML = val;
 	document.getElementById('PCABlognamePreview').innerHTML = val;
@@ -444,10 +475,10 @@
 		}
 	} 
 	var newMediaFileData = new Array();
-  newMediaFileData['showme'] = showme;
-  newMediaFileData['URI'] = txtURI;
-  newMediaFileData['URI_torrent'] = txtURI_torrent;
-  newMediaFileData['title'] = txttitle;
+	newMediaFileData['showme'] = showme;
+	newMediaFileData['URI'] = txtURI;
+	newMediaFileData['URI_torrent'] = txtURI_torrent;
+	newMediaFileData['title'] = txttitle;
 	newMediaFileData['type'] = txttype;
 	newMediaFileData['size'] = txtsize;
 	newMediaFileData['duration'] = duration;
@@ -547,29 +578,41 @@
 	}
 
 	var typeOfMedia = data['type'].substring(0,6);
-	if(typeOfMedia != 'video_'){
+	if (typeOfMedia != 'video_' && data['type'] != 'audio_m4a' && data['type'] != 'audio_mp4' && data['type'] != 'audio_wma') {
 		document.getElementById('podPressMediaPreviewImageWrapper_'+VarNum).style.display = 'none';
 		document.getElementById('podPressMediaPreviewImageDisplayWrapper_'+VarNum).style.display = 'none';
-		document.getElementById('podPress_previewImageIMG_'+VarNum).src = '';
-		document.getElementById('podPress_previewImageIMG_'+VarNum).width = '0';
-		document.getElementById('podPress_previewImageIMG_'+VarNum).height = '0';
 	} else {
 		if(data['previewImage'] == '') {
 			document.getElementById('podPressMediaPreviewImageWrapper_'+VarNum).style.display = '';
-			document.getElementById('podPressMediaPreviewImageDisplayWrapper_'+VarNum).style.display = 'none';
-			document.getElementById('podPress_previewImageIMG_'+VarNum).src = '';
-			document.getElementById('podPress_previewImageIMG_'+VarNum).width = '0';
-			document.getElementById('podPress_previewImageIMG_'+VarNum).height = '0';
+			data['previewImage'] = document.getElementById('podPressMedia_defaultpreviewImage').value;
+			//~ document.getElementById('podPressMediaPreviewImageDisplayWrapper_'+VarNum).style.display = 'none';
 		} else {
 			document.getElementById('podPressMediaPreviewImageWrapper_'+VarNum).style.display = '';
 			document.getElementById('podPressMediaPreviewImageDisplayWrapper_'+VarNum).style.display = '';
-			document.getElementById('podPress_previewImageIMG_'+VarNum).src = data['previewImage'];
-			document.getElementById('podPress_previewImageIMG_'+VarNum).width = data['dimensionW'];
-			document.getElementById('podPress_previewImageIMG_'+VarNum).height = data['dimensionH'];
 		}
 	}
 }
 
+function podPressPreviewImageOnChange(VarNum, imageUrl) {
+	imageUrl = imageUrl.replace(/<\S[^><]*>/g, '');
+	var ltrim = /\s+$/; // one blank or blanks at the begin of the string
+	var rtrim = /^\s+/; // one blank or blanks at the end of the string
+	imageUrl = imageUrl.replace(ltrim, '');
+	imageUrl = imageUrl.replace(rtrim, '');
+	var data = new Array();
+	if (podPressMediaFiles[VarNum] == undefined) {
+		data = newMediaDefaults;
+	} else {
+		data = podPressMediaFiles[VarNum];
+	}
+	data['previewImage'] = imageUrl;
+	try {
+		document.getElementById('podPress_previewImageIMG_'+VarNum).src = imageUrl;
+	} catch (e) {
+		//alert('preview player without preview image');
+	}
+}
+
 function podPressMediaSetNonTextInputs(VarNum) {
 	var data = new Array();
 	if(podPressMediaFiles[VarNum] == undefined) {
@@ -616,6 +659,20 @@
 	}
 }
 
+function podPress_isset_in_the_list(value, list_id) {	
+	var list = document.getElementById( list_id );
+	var listlen = list.length;
+	var is_in = false;
+	var index = 0;
+	for (var i = 0; i < listlen; i++ ) {
+		if ( value == list.options[i].value ) {
+			is_in = true;
+			index=i;
+		}
+	}
+	return Array(is_in, index);
+}
+
 function podPressAdjustMediaFieldsBasedOnType(VarNum) {
 	var data = new Array();
 	if(podPressMediaFiles[VarNum] == undefined) {
@@ -624,28 +681,61 @@
 		data = podPressMediaFiles[VarNum];
 	}
 	var typeOfMedia = data['type'].substring(0,6);
-	if(typeOfMedia == 'audio_' || typeOfMedia == 'video_'){
+	if(typeOfMedia == 'audio_' || typeOfMedia == 'video_') {
 		document.getElementById('podPressMediaDurationWrapper_'+VarNum).style.display=''; 	
- } else {
+	} else {
 		document.getElementById('podPressMediaDurationWrapper_'+VarNum).style.display='none'; 	
- }
+	}
 
- if(typeOfMedia == 'video_'){
+	if (typeOfMedia == 'video_' || data['type'] == 'audio_m4a' || data['type'] == 'audio_mp4' || data['type'] == 'audio_wma') {
 		document.getElementById('podPressMediaPreviewImageWrapper_'+VarNum).style.display='';
 		document.getElementById('podPressMediaDimensionWrapper_'+VarNum).style.display='';
-		podPressShowPreviewImage(VarNum);
- } else if(typeOfMedia == 'embed_') {
+		//alert('(1a)\n'+typeOfMedia+'\n'+'W: '+String(data['dimensionW'])+'\t'+ String(typeof data['dimensionW']) + '\n'+'H: '+String(data['dimensionH'])+'\t'+ String(typeof data['dimensionH'])+'\n');
+		if ('video_' == typeOfMedia) {
+			if ( 0 >= Number(data['dimensionW']) || 0 >= Number(data['dimensionH'])) {// this means: if nothing is saved then set the default values 
+				data['dimensionW'] = 320;
+				data['dimensionH'] = 240;
+			}
+		} else {
+			if ( 0 >= Number(data['dimensionW']) || 0 > Number(data['dimensionH'])) {
+				data['dimensionW'] = 320;
+				data['dimensionH'] = 0;
+			}
+		}
+		//alert('(1.1a)\n'+typeOfMedia+'\n'+'W: '+String(data['dimensionW'])+'\t'+ String(typeof data['dimensionW']) + '\n'+'H: '+String(data['dimensionH'])+'\t'+ String(typeof data['dimensionH'])+'\n');
+		document.getElementById('podPressMedia_'+VarNum+'_dimensionW').value = data['dimensionW'];
+		document.getElementById('podPressMedia_'+VarNum+'_dimensionH').value = data['dimensionH'];
+		var dimensionsStr = String(document.getElementById('podPressMedia_'+VarNum+'_dimensionW').value)+':'+String(document.getElementById('podPressMedia_'+VarNum+'_dimensionH').value);
+		var is_in = podPress_isset_in_the_list(dimensionsStr, 'podPressMedia_'+VarNum+'_dimensionList');
+		if ( true == is_in[0] ) {
+			document.getElementById('podPressMedia_'+VarNum+'_dimensionList').selectedIndex = is_in[1];
+		}
+		//alert('(1b)\n'+typeOfMedia+'\n'+'W: '+String(document.getElementById('podPressMedia_'+VarNum+'_dimensionW').value) + '\n'+'H: '+String(document.getElementById('podPressMedia_'+VarNum+'_dimensionH').value)+'\ndata_W: '+String(data['dimensionW'])+'\ndata_H: '+String(data['dimensionH']));
+		podPressPreviewImageOnChange(VarNum, document.getElementById('podPressMedia_'+VarNum+'_previewImage').value);
+		podPressUpdateDimensions(VarNum, dimensionsStr);
+	} else if(typeOfMedia == 'embed_') {
 		document.getElementById('podPressMediaPreviewImageWrapper_'+VarNum).style.display='';
 		document.getElementById('podPressMediaPreviewImageDisplayWrapper_'+VarNum).style.display='';
 		document.getElementById('podPressMediaDimensionWrapper_'+VarNum).style.display='none'; 	
 		document.getElementById('podPressMediaDurationWrapper_'+VarNum).style.display='none'; 	
-		document.getElementById('podPressMediaSizeWrapper_'+VarNum).style.display='none'; 	
- 		podPressShowPreviewImage(VarNum);
+		document.getElementById('podPressMediaSizeWrapper_'+VarNum).style.display='none'; 
+ 		if ( 0 >= Number(data['dimensionW']) || 0 >= Number(data['dimensionH'])) { // this means: if nothing is saved then set the default values 
+			data['dimensionW'] = 320;
+			data['dimensionH'] = 240;
+		}
+		document.getElementById('podPressMedia_'+VarNum+'_dimensionW').value = data['dimensionW'];
+		document.getElementById('podPressMedia_'+VarNum+'_dimensionH').value = data['dimensionH'];
+		podPressPreviewImageOnChange(VarNum, document.getElementById('podPressMedia_'+VarNum+'_previewImage').value);
+		podPressUpdateDimensions(VarNum, String(document.getElementById('podPressMedia_'+VarNum+'_dimensionW').value)+':'+String(document.getElementById('podPressMedia_'+VarNum+'_dimensionH').value));
 	} else {
 		document.getElementById('podPressMediaPreviewImageWrapper_'+VarNum).style.display='none';
 		document.getElementById('podPressMediaPreviewImageDisplayWrapper_'+VarNum).style.display='none';
-		document.getElementById('podPressMediaDimensionWrapper_'+VarNum).style.display='none'; 	
- }
+		document.getElementById('podPressMediaDimensionWrapper_'+VarNum).style.display='none';
+		data['dimensionW'] = 0;
+		data['dimensionH'] = 0;
+		document.getElementById('podPressMedia_'+VarNum+'_dimensionW').value = data['dimensionW'];
+		document.getElementById('podPressMedia_'+VarNum+'_dimensionH').value = data['dimensionH'];
+	}
 }
 
 function podPressDetectType(VarNum) {
@@ -684,6 +774,7 @@
 		case 'mpg': result = 'video_mpg'; break
 		case 'peg': result = 'video_mpg'; break
 		case 'asf': result = 'video_asf'; break
+		case 'wma': result = 'audio_wma'; break
 		case 'wmv': result = 'video_wmv'; break
 		case 'flv': result = 'video_flv'; break
 		case 'swf': result = 'video_swf'; break
Index: podpress_admin_class.php
===================================================================
--- podpress_admin_class.php	(Revision 210539)
+++ podpress_admin_class.php	(Arbeitskopie)
@@ -178,6 +178,8 @@
 			}
 			echo '</script>'."\n";
 
+			echo '<input type="hidden" id="podPressMedia_defaultpreviewImage" value="'.PODPRESS_URL.'/images/vpreview_center.png" />'."\n";
+
 			echo '<div id="podPressstuff" class="dbx-group">'."\n";
 			echo '	<fieldset id="podpresscontent" class="dbx-box">'."\n";
 			echo '		<h3 class="dbx-handle">'.__('Podcasting', 'podpress').'</h3> '."\n";
@@ -323,7 +325,7 @@
 				echo '							<label for="podPressMedia_'.$num.'_previewImage">'.__('Preview Image URL', 'podpress').'</label>: '."\n";
 				echo '						</td>'."\n";
 				echo '						<td>'."\n";
-				echo '							<input type="text" id="podPressMedia_'.$num.'_previewImage" name="podPressMedia['.$num.'][previewImage]" size="40" value="'.$thisMedia['previewImage'].'" onchange="javascript: podPressMediaFiles['.$num.'][\'previewImage\'] = this.value; podPressShowPreviewImage('.$num.');" />'."\n";
+				echo '							<input type="text" id="podPressMedia_'.$num.'_previewImage" name="podPressMedia['.$num.'][previewImage]" size="40" value="'.$thisMedia['previewImage'].'" onchange="javascript: podPressPreviewImageOnChange('.$num.', this.value);" />'."\n";
 				echo '						</td>'."\n";
 				echo '					</tr>'."\n";
 				echo '					<tr id="podPressMediaPreviewImageDisplayWrapper_'.$num.'" style="display: none;">'."\n";
@@ -333,7 +335,7 @@
 				echo '						<td>'."\n";
 				echo '							<div id="podPressPlayerSpace_'.$num.'"></div>'."\n";
 				echo '<script type="text/javascript"><!--'."\n";
-				echo "	document.getElementById('podPressPlayerSpace_".$num."').innerHTML = podPressGenerateVideoPreview (".$num.", '', '', '', document.getElementById('podPressMedia_".$num."_previewImage').value, true);\n";
+				echo "	document.getElementById('podPressPlayerSpace_".$num."').innerHTML = podPressGenerateVideoPreview (".$num.", '', ".$thisMedia['dimensionW'].", ".$thisMedia['dimensionH'].", document.getElementById('podPressMedia_".$num."_previewImage').value, true);\n";
 				echo "--></script>\n";
 				echo '						</td>'."\n";
 				echo '					</tr>'."\n";
@@ -343,8 +345,8 @@
 				echo '							'.__('Dimensions', 'podpress').' (WxH): '."\n";
 				echo '						</td>'."\n";
 				echo '						<td>'."\n";
-				echo '							<input type="text" id="podPressMedia_'.$num.'_dimensionW" name="podPressMedia['.$num.'][dimensionW]" size="5" value="'.$thisMedia['dimensionW'].'" onchange="javascript: podPressMediaFiles['.$num.'][\'dimensionW\'] = this.value;" />x<input type="text" id="podPressMedia_'.$num.'_dimensionH" name="podPressMedia['.$num.'][dimensionH]" size="5" value="'.$thisMedia['dimensionH'].'" onchange="javascript: podPressMediaFiles['.$num.'][\'dimensionH\'] = this.value;" /> '."\n";
-				echo '							<select onchange="javascript: podPressUpdateDimensions(\''.$num.'\', this.value);">'."\n"; podPress_videoDimensionOptions($thisMedia['dimensionW'].':'.$thisMedia['dimensionH']);	echo '</select>'."\n";
+				echo '							<input type="text" id="podPressMedia_'.$num.'_dimensionW" name="podPressMedia['.$num.'][dimensionW]" size="5" value="'.$thisMedia['dimensionW'].'" onchange="javascript: podPressMediaFiles['.$num.'][\'dimensionW\'] = this.value; podPressUpdateDimensionList(\''.$num.'\');" />x<input type="text" id="podPressMedia_'.$num.'_dimensionH" name="podPressMedia['.$num.'][dimensionH]" size="5" value="'.$thisMedia['dimensionH'].'" onchange="javascript: podPressMediaFiles['.$num.'][\'dimensionH\'] = this.value; podPressUpdateDimensionList(\''.$num.'\')" /> '."\n";
+				echo '							<select id="podPressMedia_'.$num.'_dimensionList" onchange="javascript: podPressUpdateDimensions(\''.$num.'\', this.value);">'."\n"; podPress_videoDimensionOptions($thisMedia['dimensionW'].':'.$thisMedia['dimensionH']);	echo '</select>'."\n";
 				echo '						</td>'."\n";
 				echo '					</tr>'."\n";
 
@@ -728,6 +730,8 @@
 			}
 			echo '</script>'."\n";
 
+			echo '<input type="hidden" id="podPressMedia_defaultpreviewImage" value="'.PODPRESS_URL.'/images/vpreview_center.png" />'."\n";
+			
 			echo '<p style="padding-bottom:1em;">'.__('To control player location in your post, put', 'podpress').' '.$this->podcastTag.' '.__(' where you want it to appear', 'podpress').'.<br /> '."\n";
 			echo ''.__('File Uploading support is not part of podPress', 'podpress').'.</p> '."\n";
 			echo '	<h4>'.__('Podcasting', 'podpress').' '.__('Files', 'podpress').':</h4>'."\n";
@@ -871,7 +875,7 @@
 				echo '							<label for="podPressMedia_'.$num.'_previewImage">'.__('Preview Image URL', 'podpress').'</label>: '."\n";
 				echo '						</td>'."\n";
 				echo '						<td>'."\n";
-				echo '							<input type="text" id="podPressMedia_'.$num.'_previewImage" name="podPressMedia['.$num.'][previewImage]" size="40" value="'.$thisMedia['previewImage'].'" onchange="javascript: podPressMediaFiles['.$num.'][\'previewImage\'] = this.value; podPressShowPreviewImage('.$num.');" />'."\n";
+				echo '							<input type="text" id="podPressMedia_'.$num.'_previewImage" name="podPressMedia['.$num.'][previewImage]" size="40" value="'.$thisMedia['previewImage'].'" onchange="javascript: podPressPreviewImageOnChange('.$num.', this.value);" />'."\n";
 				echo '						</td>'."\n";
 				echo '					</tr>'."\n";
 				echo '					<tr id="podPressMediaPreviewImageDisplayWrapper_'.$num.'" style="display: none;">'."\n";
@@ -881,7 +885,7 @@
 				echo '						<td>'."\n";
 				echo '							<div id="podPressPlayerSpace_'.$num.'"></div>'."\n";
 				echo '<script type="text/javascript"><!--'."\n";
-				echo "	document.getElementById('podPressPlayerSpace_".$num."').innerHTML = podPressGenerateVideoPreview (".$num.", '', '', '', document.getElementById('podPressMedia_".$num."_previewImage').value, true, true);\n";
+				echo "	document.getElementById('podPressPlayerSpace_".$num."').innerHTML = podPressGenerateVideoPreview (".$num.", '', ".$thisMedia['dimensionW'].", ".$thisMedia['dimensionH'].", document.getElementById('podPressMedia_".$num."_previewImage').value, true);\n";
 				echo "--></script>\n";
 				echo '						</td>'."\n";
 				echo '					</tr>'."\n";
@@ -891,8 +895,8 @@
 				echo '							'.__('Dimensions', 'podpress').' (WxH): '."\n";
 				echo '						</td>'."\n";
 				echo '						<td>'."\n";
-				echo '							<input type="text" id="podPressMedia_'.$num.'_dimensionW" name="podPressMedia['.$num.'][dimensionW]" size="5" value="'.$thisMedia['dimensionW'].'" onchange="javascript: podPressMediaFiles['.$num.'][\'dimensionW\'] = this.value;" />x<input type="text" id="podPressMedia_'.$num.'_dimensionH" name="podPressMedia['.$num.'][dimensionH]" size="5" value="'.$thisMedia['dimensionH'].'" onchange="javascript: podPressMediaFiles['.$num.'][\'dimensionH\'] = this.value;" /> '."\n";
-				echo '							<select onchange="javascript: podPressUpdateDimensions(\''.$num.'\', this.value);">'."\n"; podPress_videoDimensionOptions($thisMedia['dimensionW'].':'.$thisMedia['dimensionH']);	echo '</select>'."\n";
+				echo '							<input type="text" id="podPressMedia_'.$num.'_dimensionW" name="podPressMedia['.$num.'][dimensionW]" size="5" value="'.$thisMedia['dimensionW'].'" onchange="javascript: podPressMediaFiles['.$num.'][\'dimensionW\'] = this.value; podPressUpdateDimensionList(\''.$num.'\');" />x<input type="text" id="podPressMedia_'.$num.'_dimensionH" name="podPressMedia['.$num.'][dimensionH]" size="5" value="'.$thisMedia['dimensionH'].'" onchange="javascript: podPressMediaFiles['.$num.'][\'dimensionH\'] = this.value; podPressUpdateDimensionList(\''.$num.'\')" /> '."\n";
+				echo '							<select id="podPressMedia_'.$num.'_dimensionList" onchange="javascript: podPressUpdateDimensions(\''.$num.'\', this.value);">'."\n"; podPress_videoDimensionOptions($thisMedia['dimensionW'].':'.$thisMedia['dimensionH']);	echo '</select>'."\n";
 				echo '						</td>'."\n";
 				echo '					</tr>'."\n";
 
@@ -968,7 +972,7 @@
 
 				$num++;
 			}
-			echo '			<input type="button" name="podPressAddAnother" value="Add Media File" onclick="javascript: podPressAddMediaFile(true, \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'new\', true, false, false, \'free\'); podPressDisplayMediaFiles();"/>'."\n";
+			echo '			<input type="button" name="podPressAddAnother" value="'.__('Add Media File', 'podpress').'" onclick="javascript: podPressAddMediaFile(true, \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'new\', true, false, false, \'free\'); podPressDisplayMediaFiles();"/>'."\n";
 			if($entryType != 'page') {
 				echo '			<br/>'."\n";
 				echo '			<h4>'.__('Post specific settings for iTunes', 'podpress').': </h4>'."\n";
@@ -1186,7 +1190,7 @@
 						}
 						podPress_add_post_meta($post_id, 'podPressMedia', $verifiedMedia, true) ;
 					}
-				} 
+				}
 				if(isset($_POST['iTunesSubtitleChoice']) AND $_POST['iTunesSummaryChoice'] AND $_POST['iTunesKeywordsChoice'] AND $_POST['iTunesAuthorChoice'] AND $_POST['iTunesExplicit'] AND $_POST['iTunesBlock']) {
 					if($_POST['iTunesSubtitleChoice'] == 'Custom' && !empty($_POST['iTunesSubtitle'])) {
 						$podPressPostSpecific['itunes:subtitle'] = $_POST['iTunesSubtitle'];
@@ -1253,12 +1257,13 @@
 		}
 
 		function edit_category_form($input) {
+			global $wp_version;
 			$data = podPress_get_option('podPress_category_'.$input->cat_ID);
 			$blog_charset = get_bloginfo('charset');
 			if(empty($data['podcastFeedURL'])) {
 				$data['podcastFeedURL'] = get_settings('siteurl').'/?feed=rss2&cat='.$input->cat_ID;
 			}
-			global $wp_version;
+			// Since WP 2.7 the column on the categories page is to small and scrollbars are necessary. This is only a short fix.
 			if (TRUE == version_compare($wp_version, '2.7','<') ){
 				echo '<div class="wrap">'."\n";
 			} else {
@@ -1366,7 +1371,7 @@
 			echo '				<td width="50%">';
 			echo '					<label for="iTunesImageChoice"><strong>'.__('iTunes:Image', 'podpress').'</strong></label>'."\n";
 			echo '					<br/>';
-			echo '					'.__('The iTunes image should be a square image with <a href="http://www.apple.com/itunes/podcasts/specs.html#image" target="_blank">at least 600 x 600 pixels</a> as Apple writes (01/2010) in "<a href="http://www.apple.com/itunes/podcasts/specs.html" target="_blank">Making a Podcast</a>" of their own Podcasting Resources. In the past 300 x 300 pixels were recommended. iTunes supports JPEG and PNG images (the file name extensions should ".jpg" or ".png").', 'podpress')."\n";
+			echo '					'.__('The iTunes image should be a square image with <a href="http://www.apple.com/itunes/podcasts/specs.html#image" target="_blank">at least 600 x 600 pixels</a> as Apple writes (01/2010) in "<a href="http://www.apple.com/itunes/podcasts/specs.html" target="_blank">Making a Podcast</a>" of their own Podcasting Resources. In the "<a href="http://www.apple.com/itunes/podcasts/creatorfaq.html" target="_blank">FAQs: For Podcast Makers</a>" 300 x 300 pixels are recommended by Apple. iTunes supports JPEG and PNG images (the file name extensions should ".jpg" or ".png").', 'podpress')."\n";
 			echo '					<br/>';
 			echo '					<select id="iTunesImageChoice" name="iTunesImageChoice" onchange="javascript: podPress_updateCategoryCasting();">'."\n";
 			echo '						<option value="Global" '; if($data['iTunesImageChoice'] != 'Custom') { echo 'selected="selected"';	}	echo '>'.__('Use Global', 'podpress').'</option>'."\n";
@@ -1483,7 +1488,12 @@
 			echo '					<br/>';
 			echo '					<select id="iTunesCategory_0" name="iTunesCategory[0]" onchange="podPress_updateCategoryCasting();">'."\n";
 			echo '						<optgroup label="'.__('Select Primary', 'podpress').'">'."\n";
-			echo '						<option value="##Global##" '; if($data['iTunesCategory'][0] == '##Global##' || empty($data['iTunesCategory'][0])) { echo 'selected="selected"'; } echo '>'.__('Use Global', 'podpress').' ('.$this->settings['iTunes']['category'][0].')</option>'."\n";
+			if ('' == trim($this->settings['iTunes']['category'][0])) {
+				$current_global = '[ '.__('nothing', 'podpress').' ]';
+			} else {
+				$current_global = $this->settings['iTunes']['category'][0];
+			}
+			echo '						<option value="##Global##" '; if($data['iTunesCategory'][0] == '##Global##' || empty($data['iTunesCategory'][0])) { echo 'selected="selected"'; } echo '>'.__('Use Global', 'podpress').' ('.$current_global.')</option>'."\n";
 			if (empty($data['iTunesCategory'][0])) {
 				podPress_itunesCategoryOptions(htmlentities('##Global##'), ENT_QUOTES, $blog_charset);
 			} else {
@@ -1494,7 +1504,12 @@
 			echo '					<input type="hidden" id="global_iTunesCategory" value="'.htmlentities(stripslashes($this->settings['iTunes']['category'][0]), ENT_QUOTES, $blog_charset).'" />'."\n";
 			echo '					<select name="iTunesCategory[1]">'."\n";
 			echo '						<optgroup label="'.__('Select Second', 'podpress').'">'."\n";
-			echo '						<option value="##Global##" '; if($data['iTunesCategory'][1] == '##Global##' || empty($data['iTunesCategory'][1])) { echo 'selected="selected"';	}	echo '>'.__('Use Global', 'podpress').' ('.$this->settings['iTunes']['category'][1].')</option>'."\n";
+			if ('' == trim($this->settings['iTunes']['category'][1])) {
+				$current_global = '[ '.__('nothing', 'podpress').' ]';
+			} else {
+				$current_global = $this->settings['iTunes']['category'][1];
+			}
+			echo '						<option value="##Global##" '; if($data['iTunesCategory'][1] == '##Global##' || empty($data['iTunesCategory'][1])) { echo 'selected="selected"';	}	echo '>'.__('Use Global', 'podpress').' ('.$current_global.')</option>'."\n";
 			if (empty($data['iTunesCategory'][1])) {
 				podPress_itunesCategoryOptions(htmlentities('##Global##'), ENT_QUOTES, $blog_charset);
 			} else {
@@ -1504,7 +1519,12 @@
 			echo '					</select><br/>'."\n";
 			echo '					<select name="iTunesCategory[2]">'."\n";
 			echo '						<optgroup label="'.__('Select Third', 'podpress').'">'."\n";
-			echo '						<option value="##Global##" '; if($data['iTunesCategory'][2] == '##Global##' || empty($data['iTunesCategory'][2])) { echo 'selected="selected"';	}	echo '>'.__('Use Global', 'podpress').' ('.$this->settings['iTunes']['category'][2].')</option>'."\n";
+			if ('' == trim($this->settings['iTunes']['category'][2])) {
+				$current_global = '[ '.__('nothing', 'podpress').' ]';
+			} else {
+				$current_global = $this->settings['iTunes']['category'][2];
+			}
+			echo '						<option value="##Global##" '; if($data['iTunesCategory'][2] == '##Global##' || empty($data['iTunesCategory'][2])) { echo 'selected="selected"';	}	echo '>'.__('Use Global', 'podpress').' ('.$current_global.')</option>'."\n";
 			if (empty($data['iTunesCategory'][2])) {
 				podPress_itunesCategoryOptions(htmlentities('##Global##'), ENT_QUOTES, $blog_charset);
 			} else {
@@ -1526,7 +1546,11 @@
 			echo '						<option value="Clean" '; if($data['iTunesExplicit'] == 'Clean') { echo 'selected="selected"';	}	echo '>'.__('Clean', 'podpress').'</option>'."\n";
 			echo '					</select>'."\n";
 			echo '					<div id="iTunesExplicitHelp" style="display: none;">'."\n";
-			echo '						'.__('Headphones Required? Sets the parental advisory graphic in name column.', 'podpress')."\n";
+			echo '					'.__('Setting to indicate whether or not your podcast contains explicit material', 'podpress')."\n";
+			echo '					<br/>'.__('"No" (default) - no indicator will show up', 'podpress')."\n";
+			echo '					<br/>'.__('"Yes" - an "EXPLICIT" parental advisory graphic will appear next to your podcast artwork or name in iTunes', 'podpress')."\n";
+			echo '					<br/>'.__('"Clean" - means that you are sure that no explicit language or adult content is included any of the episodes, and a "CLEAN" graphic will appear', 'podpress')."\n";
+			echo '					<p>'.__('You can also use such an option for each of your podcast episodes (in the post/page editor).', 'podpress').'</p>'."\n";
 			echo '					</div>'."\n";
 			echo '				</td>'."\n";
 			echo '				<td width="50%">'."\n";
@@ -1537,13 +1561,13 @@
 			echo '						<option value="Global" '; if($data['rss_copyrightChoice'] != 'Custom') { echo 'selected="selected"';	}	echo '>'.__('Use Global', 'podpress').' ('.podPress_stringLimiter(ucfirst(stripslashes($this->settings['rss_copyright'])), 40).')</option>'."\n";
 			echo '						<option value="Custom" '; if($data['rss_copyrightChoice'] == 'Custom') { echo 'selected="selected"';	}	echo '>'.__('Custom', 'podpress').'</option>'."\n";
 			echo '					</select>'."\n";
-			echo '					<div id="rss_copyrightWrapper" style="display: none;">'."\n";
+			echo '					<div id="rss_copyrightHelp" style="display: none;">'."\n";
 			echo '						<input type="text" name="rss_copyright" size="40" id="rss_copyright" value="'.htmlentities(stripslashes($data['rss_copyright']), ENT_QUOTES, $blog_charset).'" onchange="javascript: podPress_updateCategoryCasting();"/>';
 			echo '						<br />'.__('Enter the complete copyright string or the license name. For example: Copyright &#169 by Jon Doe, 2009 OR <a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" target="_blank">CreativeCommons Attribution-Noncommercial-Share Alike 2.5</a>', 'podpress')."\n";
 			echo '						<input type="hidden" id="global_rss_copyright" value="'.htmlentities(stripslashes($this->settings['rss_copyright']), ENT_QUOTES, $blog_charset).'" />'."\n";
-			echo '					</div>'."\n";
-			echo '					<div id="rss_copyrightHelp" style="display: none;">'."\n";
+			echo '						<p>'."\n";
 			echo '						'.__('Used if this Copyright phrase should be different than the global copyright phrase.', 'podpress')."\n";
+			echo '						</p>'."\n";
 			echo '					</div>'."\n";
 			
 			echo '					<br /><br />'."\n";
@@ -1554,13 +1578,13 @@
 			echo '						<option value="Global" '; if($data['rss_license_urlChoice'] != 'Custom') { echo 'selected="selected"';	}	echo '>'.__('Use Global', 'podpress').' ('.podPress_stringLimiter(ucfirst(stripslashes($this->settings['rss_license_url'])), 40).')</option>'."\n";
 			echo '						<option value="Custom" '; if($data['rss_license_urlChoice'] == 'Custom') { echo 'selected="selected"';	}	echo '>'.__('Custom', 'podpress').'</option>'."\n";
 			echo '					</select>'."\n";
-			echo '					<div id="rss_license_urlWrapper" style="display: none;">'."\n";
+			echo '					<div id="rss_license_urlHelp" style="display: none;">'."\n";
 			echo '						<input name="rss_license_url" type="text" id="rss_license_url" value="'.htmlentities($data['rss_license_url'], ENT_QUOTES, $blog_charset).'" size="65%" />'."\n";
 			echo '						<br />'.__('If you use a special license like a <a href="http://creativecommons.org/licenses" target="_blank" title="Creative Commons">Creative Commons</a> License for your news feeds then enter the complete URL (e.g. <a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" target="_blank">http://creativecommons.org/licenses/by-nc-sa/2.5/</a>) to the full text of this particular license here.', 'podpress')."<br/><br/>\n";
 			echo '						<input type="hidden" id="global_rss_license_url" value="'.htmlentities(stripslashes($this->settings['rss_license_url']), ENT_QUOTES, $blog_charset).'" />'."\n";
-			echo '					</div>'."\n";
-			echo '					<div id="rss_license_urlHelp" style="display: none;">'."\n";
+			echo '						<p>'."\n";
 			echo '						'.__('Used if this license URL should be different than the global license URL.', 'podpress')."\n";
+			echo '						</p>'."\n";
 			echo '					</div>'."\n";
 			
 			
@@ -1577,7 +1601,10 @@
 			echo '						<option value="Yes" '; if($data['iTunesBlock'] == 'Yes') { echo 'selected="selected"';	}	echo '>'.__('Yes', 'podpress').'</option>'."\n";
 			echo '					</select>'."\n";
 			echo '					<div id="itunesBlockHelp" style="display: none;">'."\n";
-			echo '						'.__('Prevent this episode or podcast from appearing in iTunes.', 'podpress')."\n";
+			echo '					'.__('Use this if you are no longer creating a podcast and you want it removed from iTunes.', 'podpress')."\n";
+			echo '					<br/>'.__('"No" (default) - the podcast appears in the iTunes Podcast directory', 'podpress')."\n";
+			echo '					<br/>'.__('"Yes" - prevent the entire podcast from appearing in the iTunes Podcast directory', 'podpress')."\n";
+			echo '					<p>'.__('You can also use such an option for each of your podcast episodes (in the post/page editor).', 'podpress').'</p>'."\n";
 			echo '					</div>'."\n";
 			echo '				</td>'."\n";
 			echo '				<td width="50%">&nbsp;</td>'."\n";
Index: podpress_admin_functions.php
===================================================================
--- podpress_admin_functions.php	(Revision 210539)
+++ podpress_admin_functions.php	(Arbeitskopie)
@@ -345,7 +345,7 @@
 		$options['video_mpg'] = __('MPG - Video', 'podpress');
 		$options['video_asf'] = __('ASF - Video', 'podpress');
 		$options['video_wmv'] = __('WMV - Video', 'podpress');
-		$options['video_wma'] = __('WMA - Video', 'podpress');
+		$options['audio_wma'] = __('WMA - Audio', 'podpress');
 		$options['video_flv'] = __('FLV - Flash Video', 'podpress');
 		$options['video_swf'] = __('SWF - Flash content', 'podpress');
 		$options['ebook_pdf'] = __('PDF - eBook', 'podpress');
@@ -362,6 +362,8 @@
 	function podPress_videoDimensionOptions($selected='320:240') {
 		$dimensions = array();
 		reset($dimensions);
+		$dimensions_noimage = array();
+		reset($dimensions_noimage);
 
 		$dimensions['160:120'] = '160 x 120';
 		$dimensions['320:240'] = '320 x 240';
@@ -371,6 +373,7 @@
 		$dimensions['480:260'] = '480 x 260 [16:9 - 1.85:1]';
 		$dimensions['720:405'] = '720 x 405 [16:9 - 1.78:1]';
 		$dimensions['720:390'] = '720 x 390 [16:9 - 1.85:1]';
+		
 		echo '<optgroup label="'.__('Common Dimensions', 'podpress').'">'."\n";
 		foreach ($dimensions as $key => $value) {
 			if ($key == $selected) {
@@ -381,6 +384,21 @@
 			echo '<option value="'.$key.'"'.$selected_str.'>'.$value.'</option>'."\n";
 		}
 		echo '</optgroup>'."\n";
+		$dimensions_noimage['160:0'] = __('width: 160 px', 'podpress');
+		$dimensions_noimage['320:0'] = __('width: 320 px', 'podpress');
+		$dimensions_noimage['640:0'] = __('width: 640 px', 'podpress');
+		$dimensions_noimage['720:0'] = __('width: 720 px', 'podpress');
+		echo '<optgroup label="'.__('player without images', 'podpress').'">'."\n";
+		foreach ($dimensions_noimage as $key => $value) {
+			if ($key == $selected) {
+				$selected_str =' selected="selected"';
+			} else {
+				$selected_str ='';
+			}
+			echo '<option value="'.$key.'"'.$selected_str.'>'.$value.'</option>'."\n";
+		}
+		echo '</optgroup>'."\n";
+
 	}
 
 	function podPress_itunesLanguageArray() {
@@ -596,7 +614,7 @@
 				$foundit = true;
 				echo ' selected="selected"';
 			}
-			echo ' >'.$value.'</option>'."\n";
+			echo '>'.$value.'</option>'."\n";
 		}
 		
 		if(!$foundit AND '##Global##' != $current) {
@@ -880,6 +898,8 @@
 	
 	function podPress_getID3tags($mediafile, $resolved = false, $limitDownload = false) {
 		GLOBAL $podPress;
+		$tmp_download_exists = FALSE;
+		
 		if($podPress->settings['enablePodangoIntegration']) {
 			if(substr($mediafile, 0, strlen('Podango:')) == 'Podango:') {
 				$fileNameParts = explode(':', $mediafile);
@@ -906,16 +926,33 @@
 			} else {
 				$uriFileName = $mediafile;
 			}
-			$uriFileName = podPress_downloadFile($uriFileName, false, $limitDownload);
+			$siteurl = get_bloginfo('siteurl');
+			if (FALSE !== $siteurl AND FALSE !== strpos($uriFileName, $siteurl)) { // then it is not a real remote file - it is only an URL to a local file
+				// get the absolute folder of the file from the URL
+				$purl = parse_url($uriFileName);
+				$path_part = end(explode('wp-content', $purl['path']));
+				$uriFileName = WP_CONTENT_DIR.$path_part;
+			} else {
+				$uriFileName = podPress_downloadFile($uriFileName, false, $limitDownload);
+				$tmp_download_exists = TRUE;
+			}
 		}
 
 		$fileinfo = @$getID3->analyze($uriFileName);
-
-		if(empty($fileinfo)) {
+		
+		if (empty($fileinfo)) {
 			return 'Remote MP3 File could not be read.';
 		}
 
 		getid3_lib::CopyTagsToComments($fileinfo);
+		
+		if (TRUE === $tmp_download_exists) { // if the file have been downloaded to a local folder then delete the tempfile
+			if ('' != $fileinfo['filenamepath']) { // take the folder and file from getID3 if possible
+				$unlink_result = @unlink($fileinfo['filenamepath']);
+			} else {
+				$unlink_result = @unlink($uriFileName);
+			}
+		}
 		return $fileinfo;
 	}
 	
@@ -1034,7 +1071,10 @@
 				if($pos) {
 					$ext = substr($ext, 0, $pos);
 				}
-				$localtempfilename = tempnam('/tmp', 'getID3').'.'.$ext;
+				$localtempfilename = @tempnam('/tmp', 'getID3').'.'.$ext;
+				if (FALSE == $localtempfilename OR '.'.$ext == $localtempfilename) {
+					$localtempfilename = 'podpress_tmp.'.$ext;
+				}
 				if (!$fp_local = @fopen($localtempfilename, 'wb')) {
 					$continue = false;
 				}
@@ -1116,9 +1156,11 @@
 		if(file_exists($systemFileName)) {
 			return filesize($systemFileName);
 		}
+		
+		// if it is a remote file then get the file size from the header information:
 		$uriFileName = $podPress->convertPodcastFileNameToValidWebPath($mediafile);
+		
 		// Request headers
-
 		$sRemoteHeaders = podPress_downloadFile($uriFileName, true);
 
 		// Parsing the headers
Index: podpress_class.php
===================================================================
--- podpress_class.php	(Revision 210539)
+++ podpress_class.php	(Arbeitskopie)
@@ -639,7 +639,6 @@
 		function insert_content($content = '') {
 			GLOBAL $post, $podPressTemplateData, $podPressTemplateUnauthorizedData, $wpdb;
 			
-			
 			if ( !empty($post->post_password) ) { // if there's a password
 				if ( stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password ) {	// and it doesn't match the cookie
 					return $content;
@@ -671,7 +670,11 @@
 			$hasLocationDefined = (bool)strstr($content, $this->podcastTag);
 			if(!$hasLocationDefined) {
 				if($this->settings['contentBeforeMore'] == 'no') {
-					return $content;
+					if (is_home() or is_archive()) {
+						if (FALSE !== strpos($content, 'class="more-link">')) {
+							return $content;
+						}
+					}
 				}
 				if($this->settings['contentLocation'] == 'start') {
 					$content = $this->podcastTag.$content;
@@ -698,11 +701,11 @@
 					$post->podPressMedia[$key]['previewImage'] = $this->settings['videoPreviewImage'];
 				}
 
-				$supportedVideoTypes = array('video_mp4', 'video_m4v', 'video_mov', 'video_qt', 'video_avi', 'video_mpg', 'video_asf', 'video_wmv', 'video_wma', 'video_flv', 'video_swf');
+				$supportedVideoTypes = array('video_mp4', 'video_m4v', 'video_mov', 'video_qt', 'video_avi', 'video_mpg', 'video_asf', 'video_wmv', 'video_flv', 'video_swf');
 				if (TRUE == $this->settings['disableVideoPreview'] AND TRUE == in_array($post->podPressMedia[$key]['type'], $supportedVideoTypes)) {
 					$post->podPressMedia[$key]['disablePreview'] = true;
-				}
-
+				} 
+				
 				if($post->podPressMedia[$key]['feedonly'] == 'on') {
 					continue;
 				}
@@ -721,7 +724,7 @@
 						$post->podPressMedia[$key]['stats'] = array('feed'=>$stats[0]->feed, 'web'=>$stats[0]->web, 'play'=>$stats[0]->play, 'total'=>$stats[0]->total);
 					}
 				}
-				$supportedMediaTypes = array('audio_mp3', 'audio_ogg', 'audio_m4a', 'audio_mp4', 'audio_m3u', 'video_mp4', 'video_m4v', 'video_mov', 'video_qt', 'video_avi', 'video_mpg', 'video_asf', 'video_wmv', 'video_wma', 'video_flv', 'video_swf', 'ebook_pdf', 'embed_youtube');
+				$supportedMediaTypes = array('audio_mp3', 'audio_ogg', 'audio_m4a', 'audio_mp4', 'audio_m3u', 'video_mp4', 'video_m4v', 'video_mov', 'video_qt', 'video_avi', 'video_mpg', 'video_asf', 'video_wmv', 'audio_wma', 'video_flv', 'video_swf', 'ebook_pdf', 'embed_youtube');
 				if(!in_array($post->podPressMedia[$key]['type'], $supportedMediaTypes)) {
 					$post->podPressMedia[$key]['type'] = 'misc_other';
 				}
@@ -782,8 +785,8 @@
 								$post->podPressMedia[$key]['dimensionH'] = 30;
 								break;
 							case 'audio_m4a':
-							case 'audio_m4a':
 							case 'audio_mp4':
+							case 'audio_wma':
 							case 'video_m4v':
 							case 'video_mp4':
 							case 'video_mov':
@@ -791,7 +794,6 @@
 							case 'video_avi':
 							case 'video_mpg':
 							case 'video_asf':
-							case 'video_wma':
 							case 'video_wmv':
 							case 'video_flv':
 							case 'video_swf':
@@ -842,7 +844,7 @@
 				/* The theme file needs to populate these */
 				$podPressContent = podPress_webContent($podPressTemplateData);
 			}
-			return str_replace($this->podcastTag,$podPressContent,$content);
+			return str_replace($this->podcastTag, $podPressContent, $content);
 		}
 
 		function xmlrpc_post_addMedia($input) {
Index: podpress_theme.php
===================================================================
--- podpress_theme.php	(Revision 210539)
+++ podpress_theme.php	(Arbeitskopie)
@@ -36,19 +36,33 @@
 				$val['dimensionH'] = "''";
 			}
 			$dividerNeeded = false;
-
+			
+			$podPressEpisodeTitle = __($val['title'], 'podpress'); // if the title is not given by the author then it will be a defaultTitle (see podPress_defaultTitles)
+			
 			if($val['enablePlayer']) {
 				if($podPressContent != '') {			
 					$podPressContent .= "<br />\n";
 				}
-				$podPressContent .= "\n".'<div id="podPressPlayerSpace_'.$GLOBALS['podPressPlayer'].'">&nbsp;</div>'."\n".'<!-- Begin: podPress download link line -->'."\n".'<div class="podPress_downloadlinks">';
+				$podPressContent .= "\n".'<div id="podPressPlayerSpace_'.$GLOBALS['podPressPlayer'].'">&nbsp;</div>'."\n";
 			}
-
+			
+			$podPressContent .= '<!-- Begin: podPress download link line -->'."\n".'<div class="podPress_downloadlinks">';
+			
 			if(isset($val['image'])) {
 				if($val['enableDownload'] && !empty($val['URI'])) {
 					$podPressContent .= '<a href="'.$val['URI'].'" target="new">';
 				}
-				$podPressContent .= '<img src="'.podPress_url().'images/'.$val['image'].'" border="0" align="top" class="podPress_imgicon" alt="icon for podpress" />';
+				switch ($val['image']) { // this is only a temporarily until there are the changed buttons -> WMA files are audio files!
+					case 'audio_wma_button.png' :
+						$podPressContent .= '<img src="'.podPress_url().'images/video_wma_button.png" class="podPress_imgicon" alt="'.$podPressEpisodeTitle.'" />';
+					break;
+					case 'audio_wma_icon.png' :
+						$podPressContent .= '<img src="'.podPress_url().'images/video_wma_icon.png" class="podPress_imgicon" alt="'.$podPressEpisodeTitle.'" />';
+					break;
+					default:
+						$podPressContent .= '<img src="'.podPress_url().'images/'.$val['image'].'" class="podPress_imgicon" alt="'.$podPressEpisodeTitle.'" />';
+					break;
+				}
 				if($val['enableDownload'] && !empty($val['URI'])) {
 					$podPressContent .= '</a>';
 				}
@@ -56,6 +70,7 @@
 					$val['enableDownload'] = false;
 				}
 			}
+			
 			if($val['enableTorrentDownload']) {
 				$podPressContent .= '<a href="'.$val['URI_torrent'].'" target="new">';
 				if(strstr($val['image'], '_button')) {
@@ -63,12 +78,12 @@
 				} else {
 					$torrentimg = 'misc_torrent_icon.png';
 				}
-				$podPressContent .= '<img src="'.podPress_url().'images/'.$torrentimg.'" border="0" align="top" class="podPress_imgicon" alt="icon for podpress" />';
+				$podPressContent .= '<img src="'.podPress_url().'images/'.$torrentimg.'" class="podPress_imgicon" alt="'.$podPressEpisodeTitle.' - '.__('Torrent','podpress').'" />';
 				$podPressContent .= '</a>';
 			}
 
 			$podPressContent .= ' &nbsp;';
-			$podPressContent .= __($val['title'], 'podpress');
+			$podPressContent .= $podPressEpisodeTitle;
 
 			if($podPressTemplateData['showDuration'] == 'enabled' && !empty($val['duration']) && preg_match("/([0-9]):([0-9])/", $val['duration'])) {
 				$podPressContent .= ' ['.$val['duration'].'m]';
@@ -90,10 +105,10 @@
 					} else {
 						$previewVal = 'false';
 					}
-					$podPressContent .= "<a href=\"#\" onclick=\"javascript: podPressShowHidePlayer('".$GLOBALS['podPressPlayer']."','".$val['URI_Player']."',".$val['dimensionW'].",".$val['dimensionH'].",'true'); return false;\"><span id=\"podPressPlayerSpace_".$GLOBALS['podPressPlayer']."_PlayLink\">".__('Play Now', 'podpress')."</span></a>";
+					$podPressContent .= '<a href="#podPressPlayerSpace_'.$GLOBALS['podPressPlayer'].'" onclick="javascript:podPressShowHidePlayer(\''.$GLOBALS['podPressPlayer'].'\', \''.$val['URI_Player'].'\', '.strval(intval($val['dimensionW'])).', '.strval(intval($val['dimensionH'])).', \'true\'); return false;"><span id="podPressPlayerSpace_'.$GLOBALS['podPressPlayer'].'_PlayLink">'.__('Play Now', 'podpress').'</span></a>';
 					$dividerNeeded = true;
 					if($podPress->settings['contentAutoDisplayPlayer']) {
-						$podPressPlayBlockScripts .= "podPressShowHidePlayer('".$GLOBALS['podPressPlayer']."', '".$val['URI_Player']."',".$val['dimensionW'].",".$val['dimensionH'].", '".$previewVal."', '".$val['previewImage']."');\n";
+						$podPressPlayBlockScripts .= 'podPressShowHidePlayer(\''.$GLOBALS['podPressPlayer'].'\', \''.$val['URI_Player'].'\', '.strval(intval($val['dimensionW'])).', '.strval(intval($val['dimensionH'])).', \''.$previewVal.'\', \''.$val['previewImage'].'\');';
 					}
 				}
 
@@ -101,7 +116,7 @@
 					if($dividerNeeded) {
 						$podPressContent .= $divider;
 					}
-					$podPressContent .= "<a href=\"#\" onclick=\"javascript: podPressPopupPlayer('".$GLOBALS['podPressPlayer']."', '".$val['URI_Player']."',".$val['dimensionW'].",".$val['dimensionH']."); return false;\">".__('Play in Popup', 'podpress')."</a>";
+					$podPressContent .= '<a href="#podPressPlayerSpace_'.$GLOBALS['podPressPlayer'].'" onclick="javascript:podPressPopupPlayer(\''.$GLOBALS['podPressPlayer'].'\', \''.$val['URI_Player'].'\', '.strval(intval($val['dimensionW'])).', '.strval(intval($val['dimensionH'])).', \''.get_bloginfo('name').'\'); return false;">'.__('Play in Popup', 'podpress').'</a>';
 					$dividerNeeded = true;
 				}
 
@@ -125,15 +140,16 @@
 					$dividerNeeded = true;
 				}
 
-				$podPressContent .= '</div>'."\n".'<!-- End: podPress download link line -->'."\n";
 			}
+			
+			$podPressContent .= '</div>'."\n".'<!-- End: podPress download link line -->'."\n";
 		}
 
 		if($podPress->settings['contentAutoDisplayPlayer']) {
 			$podPressPlayBlockScripts = '<script type="text/javascript"><!--'."\n".$podPressPlayBlockScripts;
-			$podPressPlayBlockScripts .= "\n-->\n</script>";
+			$podPressPlayBlockScripts .= "\n".'-->'."\n".'</script>';
 		}
-		return '<div class="podPress_content">'.$podPressContent.'</div>'."\n".$podPressPlayBlockScripts;
+		return "<!-- Begin: podPress -->\n".'<div class="podPress_content">'.$podPressContent.'</div>'."\n".$podPressPlayBlockScripts."\n<!-- End: podPress -->\n";
 	}
 	}
 
@@ -162,9 +178,11 @@
 			case 'video_mpg':
 			case 'video_asf':
 			case 'video_wmv':
-			case 'video_wma':
 				return 'Online Video';
 				break;
+			case 'audio_wma':
+				return 'Online Audio';
+				break;
 			case 'video_swf':
 				return 'Flash Content';
 				break;
@@ -183,4 +201,4 @@
 		}
 	}
 	}
-
+?>

