#iPopStack, .iPopBlock, .iPopBox, .iPopWrap {
	box-sizing: border-box !important;
	-moz-box-sizing: border-box !important;
	-webkit-box-sizing: border-box !important;
	-o-box-sizing: border-box !important;
	-ie-box-sizing: border-box !important;
}

html.iPopActive, html.iPopActive body {
    overflow: hidden; /* disable scrolling on body */
}

.iPopData {
	display: inline;
	margin: 0px;
	padding: 0px;
	border: none;
}

.iPopDummy {
	visibility: hidden !important;

	z-index: 0 !important;
	max-width: 100% !important;
	max-height: 100% !important;
	position: absolute !important;
	overflow: hidden !important;
	margin: 0px !important;
	border-color: red !important;
	width: auto !important;
	height: auto !important;
	background: rgba(255, 0, 0, 0.5);
	left: auto !important;
	top: 0px !important;
	right: 0px !important;
	bottom: auto !important;
	opacity: 0.5;
}

.iPopDummy:hover, .iPopDummy:active {
	opacity: 1;
	z-index: 90 !important;
}

.iPopDummy .iPopBox {
	overflow: hidden;
}

/* .iPopBox { */
/*	box-sizing: content-box; */
/*	-moz-box-sizing: content-box; */
/*	-webkit-box-sizing: content-box; */
/* } */

#iPopStack {
	position: absolute;
	width: 0px;
	height: 0px;
	overflow: visible;
}

.iPopBlock {
	position: fixed;
	overflow: hidden;

	background-color: rgba(0, 0, 0, 0.6);
	-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)"; /* IE8 semi-transparent bg */

	top: 0px;
	left: 0px;
	width: 100%;
	height: 100%;
	visibility: hidden;
	z-index: 1100;

	/* IE8 helps with $wrapper.height()/width() because IE8 does not support content-box sizing */
	/* But screwes the max-height for other browsers */
	/* padding: 24px\9; */

	opacity: 0;
}

.iPopBlock.active {
	opacity: 1;
	visibility: visible;
}

.iPopWrap {
	z-index: 10;
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	margin: auto;
	max-width: 100%;
	max-height: 100%;
	text-align: center;

	padding: 24px;
}

.iPopBlock.animate .iPopWrap {
	transition: width 0.25s, height 0.25s;
	-webkit-transition: width 0.25s, height 0.25s;
}

.iPopBlock.noAnimate, .iPopBlock .noAnimate {
	transition: all 0s !important;
	-webkit-transition: all 0s !important;
}

.iPopBox {
	display: inline-block;
	position: relative;
	max-width: 100%;
	max-height: 100%;
	text-align: left; /* counter the .iPopWrap */
	overflow: auto;
}

/* .iPopBlock.noScroll .iPopBox  { */
/*	overflow: hidden; */
/* } */

.iPopBlock.noScrollX .iPopBox  {
	overflow-x: hidden;
}

.iPopBlock.noScrollY .iPopBox  {
	overflow-y: hidden;
}

.iPopBlock.styled .iPopBox {
	border: 8px solid white;
	background-color: #EFEFEF;
	box-shadow: 8px 8px 5px rgba(0,0,0,0.3);
}

.iPopCloseBtn {
	position: absolute;
	right: 4px;
	top: 4px;
	cursor: pointer;
	width: 32px;
	height: 32px;
	z-index: 100;
	background-image: url("images/close.png");
	background-position: center;
	background-repeat: no-repeat;
}

.iPopCloseBtn span {
	display: none;
}

.iPopBlock.bare .iPopCloseBtn {
	display: none;
}

/*------------------------------------------------------------------------*/

.iPopPlaceholder {
	display: none !important;
}

.iPopBlock.loading .iPopWrap {
	width: 86px !important;
	height: 86px !important;
}

.iPopBlock.loading .iPopBox {
	width: 40px !important;
	height: 40px !important;
	padding: 0px !important; /* inlineType override */
	background-image: url("images/loading.gif");
	background-position: center;
	background-repeat: no-repeat;
	overflow: hidden;
}

.iPopBlock.loading .iPopBox * {
	display: none;
}

/* When display: none some iframes don't load correctly (gmap: does not center) */
.iPopBlock.loading .iPopIframe {
	display: block !important;
	max-width: none !important;
	max-height: none !important;
	position: absolute;
	top: 200%;
}
.iPopBlock.loading .iPopIframe {
	opacity: 0;
}
.iPopIframe {
	border: none;
	margin: 0px;
	max-width: 100%;
	max-height: 100%;
	width: 100%;
	height: 100%;
	opacity: 1;
	transition: opacity 1s;
}

/*------------------------------------------------------------------------*/

.iPopBlock.inlineType.styled .iPopBox {
	padding: 0.5em 1em;
}

.iPopBlock.imageType .iPopBox {
	overflow: hidden;

	/* Chrome problem with resizing */
	max-width: none;
	max-height: none;
}

.iPopImage {
	max-width: 100%;
	max-height: 100%;
}

.iPopBlock.iframeType .iPopBox {
	overflow: hidden;
	width: 100%;
	height: 100%;
}

/* Chrome */
.iPopBlock.iframeType .iPopData {
	display: block;
	overflow: hidden;
	width: 100%;
	height: 100%;
	position: relative;
	-webkit-overflow-scrolling: touch;
}

.iPopBlock.iframeType .iPopBox {
	overflow: visible;
}

/* Bootstrap */
.iPopStack .alert {
	margin: 0;
}
.iPopBox > .modal-dialog button.close,
.iPopBox > .well button.close,
.iPopBox > .panel button.close,
.iPopBox > .alert button.close {
	position: absolute;
	right: 5px;
	top: 2px;
}
.iPopBox > .modal-dialog {
   left: auto;
   padding-bottom: 30px;
   padding-top: 30px;
   right: auto;
   width: auto;
}

/* ------------------------------------------------------------------------*/
/* Use #iPopDebug or ?iPopDebug URL fragment to see this */
.iPopDebug {
	position: absolute;
	bottom: 5px;
	left: 5px;
	display: block;
	background: rgba(0, 0, 0, 0.6);
	font-family: monospace, tahoma, sans-serif;
	font-size: 14px;
	max-width: 100%;
	white-space: nowrap;
	text-overflow: ellipsis;
	border-collapse: collapse;
	border-spacing: 0;
}

.iPopDebug:hover, .iPopDebug:active {
	z-index: 100;
}
.iPopDebug th {
	font-weight: normal;
	color: gray;
	text-align: right;
	padding: 0px 2px;
}

.iPopDebug td {
	color: lightgreen;
	padding: 0px 1em;
	overflow: hidden;
}

/*------------------------------------------------------------------------*/
/* TEMPLATES */

.iPopBlock.defaultGlassTmpl {
	background: rgba(28, 35, 41, 0.45);
	background: linear-gradient(to bottom,
								rgba(50, 60, 68, 0.45) 0%,
								rgba(28, 35, 41, 0.45) 92%,
								rgba(63, 74, 89, 0.45) 100%) repeat scroll 0 0 transparent;
}

.iPopBlock.defaultGlassTmpl .iPopBox {
	background: rgb(28, 35, 41);
	background: rgba(28, 35, 41, 0.70);
	background: linear-gradient(to bottom,
								rgba(50, 60, 68, 0.70) 0%,
								rgba(28, 35, 41, 0.70) 92%,
								rgba(63, 74, 89, 0.70) 100%) repeat scroll 0 0 transparent;
	border: 1px solid #565E65;
	border-radius: 4px 4px 4px 4px;
	outline: 0 none;
	color: white;
}


.iPopBlock.defaultBlueTmpl .iPopBox {
   background: #65a9d7;
   background: -ms-linear-gradient(top, #3e779d, #65a9d7);
   background: linear-gradient(top, #3e779d, #65a9d7);
   padding: 5px 10px;
   border-radius: 8px;
   box-shadow: rgba(0,0,0,1) 0 1px 0;
   color: white;
}

.iPopBlock.defaultVioletTmpl .iPopBox {
   background: #a363cf;
   background-image: radial-gradient(farthest-side at right bottom, #a363cf 0%, black 100%);
   border-radius: 4px 4px 4px 4px;
   color: white;
}

.iPopBlock.defaultSilverTmpl .iPopBox {
	color: white;
	padding: 10px 20px;
	background: gray;
	background: linear-gradient(
		to bottom,
		#909090 0%,
		#a8a8a8 25%,
		#6b6b6b 75%,
		#424242);
	/* background: -webkit-gradient( */
	/*	linear, left top, left bottom,  */
	/*	from(#f0f0f0), */
	/*	color-stop(0.25, #b8b8b8), */
	/*	color-stop(0.75, #6b6b6b), */
	/*	to(#424242)); */
	border-radius: 15px;
	border: 3px solid #7a7a7a;
	box-shadow:
		0px 1px 3px rgba(000,000,000,0.5),
		inset 0px 0px 10px rgba(255,255,190,0.7);
}

.iPopBlock.defaultDarkTmpl .iPopBox {
	background: brown;
	background-image: linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,0));
	color: white;
}

/* Controls */
.iPopBlock.loading .iPopControl {
	display: none;
}
.iPopControl {
	top: 0px;
	height: 100%;
	position: absolute;
	width: 50%;
	z-index: 50;
	opacity: 0.7;
}
.iPopNext {
	right: 0px;
	cursor: e-resize;
}
.iPopNext:hover, .iPopNext:active,
.iPopPrev:hover, .iPopPrev:active {
	opacity: 1;
}
.iPopPrev {
	left: 0px;
	cursor: w-resize;
}
.iPopControl span {
	display: none;
}
.iPopControl div {
	width: 30px;
	height: 30px;
	position: absolute;
	top: 50%;
}

.iPopNext div {
	background-image: url("images/right.png");
	right: 5px;
}

.iPopPrev div {
	background-image: url("images/left.png");
	left: 5px;
}

/* PROBLEM WITH FINGER-SCROLLING OF IFRAMES ON iOS */

/* Otherwise iOS devices could not scroll IFRAMES */
/* body .iPopBlock.iframeType .iPopData { */
/* 	-webkit-overflow-scrolling: touch; */
/* 	overflow-y: auto; */
/* } */

/* TARGETING iPAD ONLY: https://stackoverflow.com/questions/2678297/how-to-target-css-for-ipad-but-exclude-safari-4-desktop-using-a-media-query */
@media (device-width: 768px) {
    body .iPopBlock.iframeType .iPopData {
	-webkit-overflow-scrolling: touch;
	overflow-y: auto;
    }
}
