//
// Gallery
// --------------------------------------------------

// Gallery
// ------------------------- //

.gallery {
	ul { 
		margin: 0; 
		padding: 0; 
		list-style: none;
		li {
			.thumb {
				position: relative;
				display: block;
				padding: 5px;
				margin-bottom: 10px;
				z-index: 1;
				overflow: hidden;
			}
			&.col-md-2:nth-child(6n+7) { margin-left: 0; }
			&.col-md-3:nth-child(4n+5) { margin-left: 0; }
			&.col-md-4:nth-child(3n+4) { margin-left: 0; }
		}
	}
	&.gallery-masonry {
		li { &[class*="col-md-"] { margin-left: 0; } }
	}
	&.gallery-2 {
		li {
			.thumb { padding: 0; border-color: #4c4c4c; }
		}
	}
}
.thumb { 
	display: block; 
	padding: 3px; 
	border: 1px solid @contentBorder;
	background: #fff;
}

// Thumbnails
// ------------------------- //

.thumbnails {
	margin: 0;
	> li {
		list-style: none;
		margin-bottom: @spacing;
		.thumbnail {
			border-color: @contentBorder;
			background: @widgetBg;
			.rounded();
			.box-shadow(none);
			.caption { color: @bodyText; }
		}
		a.thumbnail:hover, a.thumbnail:focus {
			border-color: @primaryColor;
			-webkit-box-shadow: 0 1px 4px fade(@primaryColor, 25%);
			-moz-box-shadow: 0 1px 4px fade(@primaryColor, 25%);
			box-shadow: 0 1px 4px fade(@primaryColor, 25%);
			text-decoration: none;
		}
	}
}
.thumbnail { border-color: @contentBorder; }
a.thumbnail { .caption { display: block; } }
a.thumbnail:hover, a.thumbnail:focus {
	border-color: @primaryColor;
	-webkit-box-shadow: 0 1px 4px fade(@primaryColor, 25%);
	-moz-box-shadow: 0 1px 4px fade(@primaryColor, 25%);
	box-shadow: 0 1px 4px fade(@primaryColor, 25%);
	text-decoration: none;
}

// Carousels
// ------------------------- //

.carousel {
	
	// safari flicker
	-webkit-perspective: 1000; 
	-webkit-backface-visibility: hidden;
	
	margin-bottom: @spacing;
	/*.carousel-control {
		font-size: 45px;
		opacity: 1;
		filter: alpha(opacity=100);
		background: @widgetBgGray;
		color: #000;
		border-color: #000;
		text-shadow: @bodyTextShadow;
		&.right { text-align: center; }
	}
	.item {
		img { min-width: 100%; }
	}
	.carousel-caption {
		background: fade(@widgetBgGray, 95%);
		text-shadow: @bodyTextShadow;
		p { color: @bodyText; }
		h4 { font-size: 12pt; color: #000; font-weight: 600; }
		a { text-decoration: underline; color: #000; }
	}*/
	&.carousel-1 {
		height: 223px;
		margin-bottom: 33px;
		background: @widgetBgGray;
		.item {
			height: 223px;
			overflow: hidden;
			img { min-height: 100%; }
		}
		.carousel-indicators {
			top: auto;
			bottom: -23px;
			right: 0;
			li {
				background: lighten(@primaryColor, 20%);
				.rounded();
				&.active { background: @primaryColor; }
			}
		}
		.carousel-caption {
			height: 223px-30px;
			background: @widgetBgGray;
			text-align: left;
			top: 0;
			background: fade(@widgetBgGray, 95%);
			text-shadow: @bodyTextShadow;
			p { color: @bodyText; }
			h4 { font-size: 12pt; color: #000; font-weight: 600; }
			a { text-decoration: underline; color: #000; }
		}
	}
}

// Jcrop
// ---------------------------

/* Apply these styles only when #preview-pane has
   been placed within the Jcrop widget */
.jcrop-holder #preview-pane {
  display: block;
  position: absolute;
  z-index: 2000;
  top: 10px;
  right: 10px;
  padding: 6px;
  background-color: white;

  .rounded(5px,5px,5px,5px);

  -webkit-box-shadow: 1px 1px 5px 2px rgba(0, 0, 0, 0.2);
  -moz-box-shadow: 1px 1px 5px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 1px 1px 5px 2px rgba(0, 0, 0, 0.2);
}

/* The Javascript code will set the aspect ratio of the crop
   area based on the size of the thumbnail preview,
   specified here */
#preview-pane .preview-container {
  width: 125px;
  height: 85px;
  overflow: hidden;
}

.jcrop-holder {
	margin: 0 auto;
}