.gallery h2{
	font-size:1.2em;
}

ul.photoGallery{
	list-style:none;
	padding:0;
	margin:0;
}
ul.photoGallery > li{
	float:left;
	width:20%;
	margin-bottom:1px;
}

ul.photoGallery a.sortLink{
	font-family:inherit;
	font-size:0.8em;
	/*color:rgb(204,204,204);*/
	padding:0.8em 0.5em;
	display:block;
	text-transform:uppercase;
	text-align:center;
	margin-right:1px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
	border:1px solid rgb(204,204,204);
}
/*ul.photoGallery a.sortLink:visited{
	color:rgb(204,204,204);
}
ul.photoGallery a.sortLink:hover{
	color:rgb(204,204,204);
}
ul.photoGallery a.sortLink:active{
	color:rgb(204,204,204);
}
ul.photoGallery a.sortLink.selected{
	color:rgb(0,0,0);
}*/


a.thumbnail {
    float: left;
    width: 19.8%;
    height: auto;
    min-height: 166px;
    max-height: 166px;
    overflow: hidden;
    display: block;
    padding: 0.5em;
    margin-right: 1px;
    border: 1px solid rgb(204,204,204);
}
/*a.thumbnail.active,
a.thumbnail:focus,
a.thumbnail:hover {
    border-color: rgb(227,83,13)!important;
}*/


a.thumbnail img {
/*	width: 166px;
	height: 166px;*/
	max-width:100%;
	height:auto;
}

a.thumbnail img:hover {
	border-color:rgb(0,0,0);
}


@media only screen and (max-width:780px){
	ul.photoGallery > li{
		width:25%;
		margin-bottom:1px;
	}
	
	a.thumbnail{
		width:24.8%;
		margin-bottom:1px;
	}
}

@media only screen and (max-width:600px){
	ul.photoGallery > li{
		width:33.33%;
	}
	
	a.thumbnail{
		width:33%;
	}
	a.thumbnail img{
		margin:0!important
	}
}

@media only screen and (max-width:500px){
	ul.photoGallery > li{
		width:50%;
	}
	
	a.thumbnail{
		width:49.55%;
	}
}

@media only screen and (max-width:400px){
	ul.photoGallery > li{
		width:100%;
		margin-bottom:0;
	}
	ul.photoGallery a{
		margin-right:0;
		border-bottom:none!important;
	}
	ul.photoGallery > li:last-child a{
		border-bottom:1px solid rgb(204,204,204)!important;
	}
}





/*.clear_floats {
	clear: both;
	line-height: 1px;
}*/

/* Horizontal Media Queries */
/*@media screen and (min-height: 50px) and (max-height: 520px) {
	.title h1 {
		font-size: 18px;
	}
}

@media screen and (min-height: 521px) and (max-height: 700px) {
	.title h1 {
		font-size: 24px;
	}
}*/


/* Vertical Media Queries */
/*@media screen and (min-width: 50px) and (max-width: 500px) {
	.title h1 {
		font-size: 18px;
	}

	body {
		padding: 0px 5px;
	}

	.gallery {
		width: auto;
	}

	.filter span {
		display: block;
		margin-bottom: 10px;
	}

	.filter a {
		display: block;
	}
}*/

/*@media screen and (min-width: 501px) and (max-width: 960px) {
	.title h1 {
		font-size: 24px;
	}

	.filter span {
		display: block;
		margin-bottom: 10px;
	}

	.filter a {
		display: block;
		width: 35%;
		float: left;
	}
}*/

/*@media screen and (min-width: 961px) {
	.filter span {
		padding-right: 20px;
	}
}*/