
body.overflowFix {
	overflow:inherit !important;
}

#mg-gallerybox {
	background-color: black;
	background-color: rgba(0,0,0,.8);
	overflow: auto;
}

#mg_overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1581;
	background-color: #000;
	opacity: 0.85;
	filter: alpha(opacity=85);
}

#mg-body {
	position: absolute;
	left: 0;
	top: 0px;
	width: 100%;
	z-index: 1582;
	text-align: center;
	line-height: 0;
}

#mg-controlsDiv {
	position: relative;
	margin: 0 auto;
}

#mg-outerbox {
	position: relative;
	/* width: 200px;
	height: 200px; */
	margin: 0 auto;
	margin-top:50px;
	border: none;
	
/* 	20141202 - Fix for mobile admin view. See also gallery.js. */
	width: 100%;
	min-width: 200px;
	height: auto;
	min-height: 200px;
/* 	End 20141202 */
}

#mg-images, 
#mg-itemVideo {
	margin: 0 auto;
}

#mg-images {
	position: relative;
}

/* Put the video off screen so it's not displayed. Can't use display:none because FF won't load the vid in that case */
#mg-itemVideo {
	position: fixed;
	top: -2000px;
}

#mg-itemVideoContainer {
	border: 1px solid #333333;
}

#mg-images > div {
	position: absolute;
	left: 0;
	height: 100%;
	width: 100%;
	background-color: black;
	-webkit-transition: opacity 1s ease-in-out;
	-moz-transition: opacity 1s ease-in-out;
	-o-transition: opacity 1s ease-in-out;
	transition: opacity 1s ease-in-out;
}

#mg-images > div > div {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	display: block;
	
	/* Required for IE8 fix */
	height: auto;
	width: 100%;
	
	margin-top: auto;
	margin-right: auto;
	margin-bottom: auto;
	margin-left: auto;
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center center;
	
	/* 	IE8 and lower:
		-ms-behavior fixes background-size by creating a child img inside a child div.
		It also sets visibility, position and z-index of child img.
		N.B. URL for .htc is relative to root, not relative to css file.  */
	-ms-behavior: url(/style/backgroundsize.min.htc);
}

/* 	Required for img created by ms-behavior.
	Overrides max-width set by bootstrap.
	Added 20130707 AC  */
#mg-images > div > div img {
	/* width: auto; */
	max-width: auto;
	/* max-width: none; */
	margin: auto;
}

.mg-centeringDiv {
	display: table-cell;
	width: inherit;
	height: inherit;
	vertical-align: middle;
}

#mg-images div.transparent {
	opacity: 0;
	visibility: hidden\9; /* Hide in IE8 or lower */
}

#mg-images img {
	/*max-width: 100%;*/
	width: auto !important;
	max-height: 100%;
}

#mg-activityDiv {
	float: right;
	width: 450px;
	background: white;
	text-align: left;
	line-height: 20px;
	overflow: auto;
	z-index: 1584;
	-webkit-backface-visibility: hidden;
}

#mg-activityDiv div.item-media{
	display: none;
}

#mg-activity-scroll {
	overflow: auto;
	height: 100%
}

#mg-activity-scroll .jspContainer {
	height: 100% !important;
}

#mg-activity-scroll .jspVerticalBar {
	right: 5px;
}

#mg-activityDiv .feed-item {
	padding: 0;
	margin: 15px;
}

#mg-activityDiv.popOut {
	position: absolute;
	
	/* 20141202 */
	top: 0;
}

#mg-itemDiv {
	position: relative;
	float: left;
	background: black;
}

#mg-itemDiv input {
	width: 400px;
	margin-right: 10px;
}

#mg-itemDiv button {
	margin-bottom: 9px;
	margin-right: 30px;
}

/*#mg-controls.touchSupported {
	display: block !important;
}*/

#mg-left-control, #mg-right-control {
	float: left;
}

#mg-right-link {
	/*left: 100%;
	margin-left: -530px;*/
	right: 10px;
}

#mg-left-link {
	/*left: 0%;
	margin-left: 20px;*/
	left: 10px;
	
}

/*#mg-right-link.marginFix {
	margin-left: -80px;
}*/

#mg-right-link, 
#mg-left-link {	
	/*position: absolute;
	top: 50%;*/
	display: block;
	width: 48px;
	/*height: 50px;*/
	color: white;
	font-size: 60px;
	font-weight: normal;
	/*line-height: 42px;*/
	text-align: center;
	text-decoration: none;
	padding: 0;
	/*margin-top: -25px;*/
	background: none repeat scroll 0 0 #222;
	background-color: rgba(0, 0, 0, 0.9);
	/*-webkit-border-radius: 25px;
	-moz-border-radius: 25px;
	border-radius: 25px;
	box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.3);*/
	opacity: .6;
	filter: alpha(opacity=60);
	z-index: 1583;
}

#mg-right-link {
	padding-left: 2px;
}

#mg-left-link {
	padding-right: 2px;
}

#mg-right-link:hover, 
#mg-left-link:hover {
	color: #ffffff;
	text-decoration: none;
	opacity: .9;
	filter: alpha(opacity=90);
}

#mg-right-carousel, 
#mg-left-carousel {
	width: 50px;
	/*height: 110px;*/
	font-size: 60px;
	font-weight: normal;
	line-height: 110px;
	color: #ffffff;
	text-align: center;
	opacity: 0.7;
	filter: alpha(opacity=70);
	background: transparent;
	cursor:pointer;
}

#mg-right-carousel {
	float: right;
}

#mg-left-carousel {
	float: left;
}

#mg-right-carousel:hover, 
#mg-left-carousel:hover {
	color: #ffffff;
	text-decoration: none;
	opacity: 0.9;
	filter: alpha(opacity=90);
}

#mg-item-footer {
	position:absolute;
	left: 50%;
	top: 100%;
}

ul.mg-panel-controls {
	position: absolute;
	right: 0;
	top: 15px;
	display: inline-block;
	list-style: none;
	color: white;
	margin: 0;
	z-index: 1590;
}

ul.mg-panel-controls li {
	display: inline;
	margin-right: 5px;
}

ul.mg-panel-controls a {
	color: white;
	text-decoration: none;
	opacity: .6;
}

/* Hide the toggle control by default */
ul.mg-panel-controls li#toggle-activity {
	display: none;
}

ul.mg-panel-controls a:hover {
	opacity: 1;
}

a#mg-close-button {
	/*background: none repeat scroll 0 0 white;
	border-radius: 15%;
	color: black;
	display: inline-block;
	font-size: 1.2em;
	font-weight: bold;
	height: 1.4em;
	line-height: 1.4em;
	text-transform: uppercase;
	width: 1.4em;*/
	
	display: inline-block;
	font-size: 1.2em;
	font-weight: bold;
	height: 1.4em;
	line-height: 1.4em;
	text-transform: uppercase;
	margin-right: 5px;
}

/*#mg-toggle-activity {
	position: absolute;
	top: -45%;
	right: 0;
	display: block;
	width: 30px;
	text-align: center;
	color: white;
	z-index: 2001;
	-webkit-transform: rotate(-90deg);
	-moz-transform: rotate(-90deg);
	-ms-transform: rotate(-90deg);
	-o-transform: rotate(-90deg);
	filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}*/

#mg-video-link {
	position: absolute;
	top: 50%;
	left: 50%;
	margin-top: -19px;
	margin-left: -19px;
	height: 38px;
	width: 38px;
	color: #fff;
	font-size: 38px;
	font-weight: 100;
	line-height: 38px;
	text-align: center;
	padding: 3.5px;
	background-color: #222;
	background-color: rgba(0, 0, 0, 0.9);
	border: 4px solid #ffffff;
	-webkit-border-radius: 10px;
	-moz-border-radius: 10px;
	border-radius: 10px;
	box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.3);
	text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
	opacity: .6;
	display: none;
}

#mg-video-link:hover {
	color: #ffffff;
	text-decoration: none;
	background-color: #222;
	opacity: .9;
	filter: alpha(opacity=90);
}

#mg-gallery-items {
	clear: left;
}

#mg-gallery-items .viewport {
	position: relative;
	float: left; 
	height: 120px;
	overflow: hidden;  
}

#mg-gallerybox .disable {
	visibility: hidden; 
}

#mg-gallery-items ul.overview {
	list-style: none;
	position: absolute;
	padding: 0;
	margin: 0; 
	left: 0; 
	top: 0; 
	
	/*transition: left 2s;
	-webkit-transition: left 2s;  Safari */
}

#mg-gallery-items .overview li {
	float: left;
	border-right: 1px solid transparent;
	border-left: 1px solid transparent;
	cursor: pointer;
}

#mg-gallery-items .overview li.current {
	background-color: #999999;
	background-color: rgba(255, 255, 255, 0.25);
}

#mg-gallery-items .overview li.activityDividerRight {
	border-right-color: #999999;
	border-right-color: rgba(255, 255, 255, 0.4); 
}

#mg-gallery-items .overview li.activityDividerLeft {
	border-left-color: #999999;
	/*border-right-color: rgba(255, 255, 255, 0.4);*/
}


/*	Modified version of .gallery-item, activity.css */
.mg-gallery-item {
	position: relative;
	display: inline-block;
	width: 100px;
	height: 100px;
	text-align: center;
	vertical-align: top;
	background-color: black;
	overflow: hidden;
	border-style: solid;
	border-width:10px;
	border-color:black;
}

#mg-gallery-items .overview li.current .mg-gallery-item {
	border-color:grey;
}

#delete-media-dialog {
	z-index: 1599;
}

#mg-item-controlsDiv {
	clear:left;
	background-color: black;
	height:30px;
	padding-right: 20px;
	padding-left: 20px;
}

#mg-itembox {
	float: left;
	
	/* 20141202 */
	float: none;
	display: inline-block;
	margin: 0 auto;
}

.mg-item-controls {
	float: left;
	display: inline-block;
	list-style: none;
	margin: 0;
	line-height:30px;
	vertical-align: middle;
}

.mg-item-controls li {
	display: inline;
	margin-right: 5px;
	line-height:30px;
}

.mg-item-controls li a {
	color: white;
	opacity: 0.6;
	font-size: 15px;
}