#gallerymain {
	margin: auto;
	width: 100%;
	height:auto;
	text-align:center;
}
.endgallery {
	clear:both;
	margin-bottom:5em;
}
.thumb {
	height: 77px;
	width: 44%;
	margin: 1%;
	/*float: left;*/
	display:inline-block;
	vertical-align:top;
	padding: 2px;
	border: 1px solid #003;
	background-color: #FFF;
	cursor: pointer;
}
.thumbimage {
	height:97%;
	width:97%;
}
.thumbwidth img {
	position:relative;
	top:50%;
	transform:translateY(-50%);
}
.thumbimage img {
	height:auto;
}
.thumb:hover {
	padding:2px;
}
.thumb div {
	background-color: #FFF;
	border: 1px solid #FFF;
	width:98%;
}

.thumb:hover div {
	border: 1px solid #003;
	width: 98%;
}

.thumb img {
	opacity: 0.7;
	filter:alpha(opacity=70);
	background-color: #000;
	max-width:100%;
}

#selected.thumb img {
	opacity: 1;
	filter:alpha(opacity=100);
}

#selected.thumb div {
	border: 1px solid #003;
	width: 98%;
}

#selected.thumb {
	padding:2px;
}

.thumb:hover img {
	opacity: 1;
	filter:alpha(opacity=100);
}

#gallerybig {
	height: 500px;
	width: 680px;
	float: left;
	padding-top: 4px;
	padding-bottom: 4px;
}
#gallerybig img {
/*	height: 100%;
	width: 100%;*/
}
#imagewrap {
	height: 96%;
	width: 96%;
	margin-top: 4px;
	margin-right: auto;
	margin-bottom: 4px;
	margin-left: auto;
	background-color: #FFF;
	border: 2px solid #003;
	padding: 4px;
}
#imagewrap.height img {
	height:100%;
	width:auto;
}
#imagewrap.width {
	width:auto;
	height:auto;
}
#imagewrap img {
	max-width:100%;
	max-height:480px;
	height:auto;
	width:auto;
}

.thumbnails {
	width: 240px;
	float: right;
	height: 500px;
	padding: 4px;
	margin-right: 2px;
}
.thumbnails p {
	font-size:0.8em;
	font-weight:bold;
}
#content #gallerymain p {
	font-weight:bold;
}
.hide {
	display:none;
}
.show {
	display:block;
}
#gallerymain a {
	cursor:pointer;
	color:#00C;
}
#gallerymain a:hover {
	text-decoration:none;
	color:#006;
}
.current {
	color:#000;
}

.galleryrow {
	clear:both;
	width:100%;
	margin-right: auto;
	margin-left: auto;
}
.galleryelement {
	margin-bottom: 64px;
	margin-top: 32px;
}
.gallerythumb {
	float: left;
	margin-right: 4px;
	margin-left: 4px;
}
.gallerycategory {
	float:left;
	width:23%;
	height:14em;
	margin-right: 1%;
	margin-left: 1%;
}
.gallerycategory img {
	height:auto;
	border:solid 2px #000;
}