/************************************************************************************
smaller than 980
*************************************************************************************/
@media screen and (max-width: 996px) {

	/* pagewrap */
	#pagewrap {
		width: 94%;
	}

	/* content */
	#content_wrap {
		width: 78%;
		padding: 0;
	}

	.content {
		width: 96%;
		padding: 8px 2%;
	}

	/* sidebar */
	#sidebar {
		width: 21%;
	}
	#sidebar .widget {
		padding: 8% 7%;
		margin-bottom: 10px;
	}

	/* embedded videos */
	.video embed,
	.video object,
	.video iframe {
		width: 100%;
		height: auto;
		min-height: 300px;
	}

}

/************************************************************************************
smaller than 640
*************************************************************************************/
@media screen and (max-width: 640px) {

	/* header */
	#header {
		background: url(../img/logo005s.gif) no-repeat;
		height: 90px;
	}

	/* search form */
	#searchform {
		position: absolute;
		top: 5px;
		right: 0;
		z-index: 100;
		height: 40px;
	}
	#searchform #s {
		width: 70px;
	}
	#searchform #s:focus {
		width: 150px;
	}

	#loginbutton {
		position: absolute;
		top: 5px;
		right: 0;
		z-index: 100;
	}

	/* main nav */
	#main-nav {
		position: static;
	}
	#main-nav li:first-child {
	    margin-left: 0;
	}
	/* site logo */
	#site-logo {
		margin: 15px 100px 5px 0;
		position: static;
	}

	/* site description */
	#site-description {
		margin: 0 0 15px;
		position: static;
	}

	/* content */
	#content_wrap {
		width: auto;
		float: none;
		margin: 8px 0;
	}
	.content {
		width: auto;
		float: none;
		margin: 8px 0;
	}

	/* sidebar */
	#sidebar {
		width: 100%;
		margin: 0;
		float: none;
	}
	#sidebar .widget {
		padding: 3% 4%;
		margin: 0 0 10px;
	}

	/* embedded videos */
	.video embed,
	.video object,
	.video iframe {
		min-height: 250px;
	}
}

/************************************************************************************
smaller than 480
*************************************************************************************/
@media screen and (max-width: 480px) {

	/* disable webkit text size adjust (for iPhone) */
	html {
		-webkit-text-size-adjust: none;
	}

	/* main nav */
	#main-nav a {
		font-size: 90%;
		padding: 10px 8px;
	}

	.resized_img {
		max-width: 180px;
	}

}

/************************************************************************************
smaller than 240
*************************************************************************************/
@media screen and (max-width: 242px) {

	/* disable webkit text size adjust (for iPhone) */
	html {
		-webkit-text-size-adjust: none;
	}

	/* main nav */
	#main-nav a {
		font-size: 90%;
		padding: 10px 8px;
	}

	img {
		display:none;
	}

}
