Index: /trunk/include/picture_comment.inc.php
===================================================================
--- /trunk/include/picture_comment.inc.php	(revision 13772)
+++ /trunk/include/picture_comment.inc.php	(revision 13773)
@@ -241,9 +241,14 @@
   {
     $key = get_ephemeral_key(3, $page['image_id']);
+    $content = '';
+    if ('reject'===@$comment_action)
+    {
+      $content = htmlspecialchars( stripslashes($comm['content']) );
+    }
     $template->assign('comment_add',
         array(
           'F_ACTION' => $url_self,
           'KEY' => $key,
-          'CONTENT' => null,
+          'CONTENT' => $content,
           'SHOW_AUTHOR' => !is_classic_user()
         ));
Index: /trunk/themes/dark/theme.css
===================================================================
--- /trunk/themes/dark/theme.css	(revision 13772)
+++ /trunk/themes/dark/theme.css	(revision 13773)
@@ -40,5 +40,5 @@
 
 FIELDSET, INPUT, SELECT, TEXTAREA,
-.content .thumbnailCategory ,
+.thumbnailCategory ,
 .content .commentElement ,
 .thumbnails .wrap2 {
@@ -48,6 +48,6 @@
 
 .thumbnails .wrap2:hover,
-.content .thumbnailCategories .thumbnailCategory:hover,
-.content .commentsList .commentElement:hover{
+.thumbnailCategory:hover,
+.content  .commentElement:hover{
 	border-color: yellow;	/* thumbnails border color when mouse cursor is over it */
 }
Index: /trunk/themes/default/template/index.tpl
===================================================================
--- /trunk/themes/default/template/index.tpl	(revision 13772)
+++ /trunk/themes/default/template/index.tpl	(revision 13773)
@@ -8,11 +8,11 @@
 			<span class="pwg-icon pwg-icon-sort">&nbsp;</span><span class="pwg-button-text">{'Sort order'|@translate}</span>
 		</a>
-		<div id="sortOrderBox" class="switchBox" style="display:none; text-align:left" onclick="toggleSortOrderBox()" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleSortOrderBox(1)">
+		<div id="sortOrderBox" class="switchBox" style="display:none" onclick="toggleSortOrderBox()" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleSortOrderBox(1)">
 			<div class="switchBoxTitle">{'Sort order'|@translate}</div>
 			{foreach from=$image_orders item=image_order name=loop}{if !$smarty.foreach.loop.first}<br>{/if}
 			{if $image_order.SELECTED}
-			<span class="switchCheck">&#x2714; </span><span class="switchSelected">{$image_order.DISPLAY}</span>
+			<span>&#x2714; </span>{$image_order.DISPLAY}
 			{else}
-			<a href="{$image_order.URL}" class="switchUnselected" rel="nofollow">{$image_order.DISPLAY}</a>
+			<span style="visibility:hidden">&#x2714; </span><a href="{$image_order.URL}" rel="nofollow">{$image_order.DISPLAY}</a>
 			{/if}
 			{/foreach}
@@ -23,5 +23,4 @@
 		ePos = document.getElementById("sortOrderLink");
 	if (!forceHide && elt.style.display==="none") {
-		elt.style.position = "absolute";
 		elt.style.left = ePos.offsetLeft+"px";
 		elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
@@ -39,11 +38,11 @@
 			<span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo sizes'|@translate}</span>
 		</a>
-		<div id="derivativeSwitchBox" class="switchBox" style="display:none; text-align:left" onclick="toggleImageDerivativesBox()" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleImageDerivativesBox(1)">
+		<div id="derivativeSwitchBox" class="switchBox" style="display:none" onclick="toggleImageDerivativesBox()" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||toggleImageDerivativesBox(1)">
 			<div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
 			{foreach from=$image_derivatives item=image_derivative name=loop}{if !$smarty.foreach.loop.first}<br>{/if}
 			{if $image_derivative.SELECTED}
-			<span class="switchCheck">&#x2714; </span><span class="switchSelected">{$image_derivative.DISPLAY}</span>
+			<span>&#x2714; </span>{$image_derivative.DISPLAY}
 			{else}
-			<a href="{$image_derivative.URL}" class="switchUnselected" rel="nofollow">{$image_derivative.DISPLAY}</a>
+			<span style="visibility:hidden">&#x2714; </span><a href="{$image_derivative.URL}" class="switchUnselected" rel="nofollow">{$image_derivative.DISPLAY}</a>
 			{/if}
 			{/foreach}
@@ -54,6 +53,5 @@
 		ePos = document.getElementById("derivativeChooseLink");
 	if (!forceHide && elt.style.display==="none") {
-		elt.style.position = "absolute";
-		elt.style.left = ePos.offsetLeft+"px";
+		elt.style.left = (ePos.offsetLeft-25)+"px";
 		elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
 		elt.style.display="";
Index: /trunk/themes/default/template/picture.tpl
===================================================================
--- /trunk/themes/default/template/picture.tpl	(revision 13772)
+++ /trunk/themes/default/template/picture.tpl	(revision 13773)
@@ -20,5 +20,5 @@
 
 {if count($current.unique_derivatives)>1}
-{footer_script}{literal}
+{footer_script require='jquery'}{literal}
 function changeImgSrc(url,typeSave,typeMap)
 {
@@ -30,9 +30,7 @@
 		theImg.useMap = "#map"+typeMap;
 	}
-  jQuery('.derivativeChecked').hide();
-  jQuery('#derivativeChecked'+typeSave).show();
-  jQuery('#derivativeSiwtchBox .switchSelected').addClass('switchUnselected').removeClass('switchSelected');
-  jQuery('#derivativeName'+typeSave).addClass('switchSelected').removeClass('switchUnselected');
-    document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
+	jQuery('#derivativeSwitchBox .switchCheck').css('visibility','hidden');
+	jQuery('#derivativeChecked'+typeSave).css('visibility','visible');
+	document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
 }
 
@@ -43,5 +41,4 @@
 	if (elt.style.display==="none")
 	{
-		elt.style.position = "absolute";
 		elt.style.left = (ePos.offsetLeft)+"px";
 		elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
@@ -51,15 +48,16 @@
 		elt.style.display="none";
 }
+jQuery("#derivativeSwitchBox").on('mouseleave click', function() {
+	this.style.display="none";
+}
+);
 {/literal}{/footer_script}
 {strip}<a id="derivativeSwitchLink" href="javascript:toggleDerivativeSwitchBox()" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
 <span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo sizes'|@translate}</span></a>
-<div id="derivativeSwitchBox" class="switchBox" onclick="toggleDerivativeSwitchBox()" style="display:none" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e.parentNode.parentNode==this||e==this||toggleDerivativeSwitchBox()">
+<div id="derivativeSwitchBox" class="switchBox" style="display:none">
 <div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
 {foreach from=$current.unique_derivatives item=derivative key=derivative_type}
-<span class="derivativeChecked switchCheck"
- id="derivativeChecked{$derivative_type}" {if $derivative->get_type() ne $current.selected_derivative->get_type()}style="display:none"{/if}>&#x2714; </span> 
-<a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')"
- id="derivativeName{$derivative_type}"
- class="{if $derivative->get_type() == $current.selected_derivative->get_type()}switchSelected{else}switchUnselected{/if}">
+<span class="switchCheck" id="derivativeChecked{$derivative_type}"{if $derivative->get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/if}>&#x2714; </span> 
+<a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')">
 	{$derivative->get_type()|@translate}<span class="derivativeSizeDetails"> ({$derivative->get_size_hr()})</span>
 </a><br>
Index: /trunk/themes/default/theme.css
===================================================================
--- /trunk/themes/default/theme.css	(revision 13772)
+++ /trunk/themes/default/theme.css	(revision 13773)
@@ -287,12 +287,4 @@
 	overflow: auto;
 	/*width: inherit;*/
-}
-
-.commentElement .description H3 {
-	text-align: left;
-	background: transparent;
-	margin: 0;
-	padding: 0.1em;
-	font-size: 120%;
 }
 
@@ -383,8 +375,9 @@
 
 .switchBox {
-	padding: 0.5em 10px;
+	padding: 0.5em 5px;
 	border-radius: 4px;
 	z-index: 100;
-  text-align:left;
+	text-align: left;
+	position: absolute; /*left, right set through js*/
 }
 
@@ -398,5 +391,4 @@
 	clear: left;
 	text-align: center;
-	position: relative; /*so that the drivative switch link is positioned relative to us*/
 }
 
