#gallery, #gallery ul {padding:0; margin:0; list-style:none;}

#gallery {width:460px; height:480px; background:#fff; position:relative;}
#gallery li {width:50px; background:#021639; margin-right:1px; float:left;}
#gallery li p {font: 12px arial, verdana, sans-serif; color:#fff; height:25px; line-height:25px; padding:0 0 0 8px; margin:0; cursor:pointer;}
#gallery li.galleryon p {background:#0355e9; color:#021639;}
#gallery ul {display:none;}

#gallery li.galleryon ul {display:block; width:480px; height:480px; border:1px solid #0355e9; border-width:20px 1px; background:#eee; padding:30px; position:absolute; left:0; top:25px;}
#gallery li.galleryon ul li em {display:none;}
#gallery li.galleryon ul li {width:118px; height:109px; border:1px solid #000; border-color:#eee #444 #000 #ccc; float:left; margin:0; text-align:center; padding-top:9px; cursor:pointer; background:#d2c8c8;}
#gallery li.galleryon ul li span img {border:1px solid #fff; border-color:#000 #ccc #eee #444;}
#gallery li.galleryon ul li.hz {padding-top:21px; height:97px;}

#gallery li.galleryon ul li.page em {display:block; position:absolute; left:80px; top:10px; border:1px solid #664;}
#gallery li.galleryon ul li.hz em {left:10px; top:80px;}
#gallery li.galleryon ul li.page em img {display:block;}