//
// 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;
			}
			&.span2:nth-child(6n+7) { margin-left: 0; }
			&.span3:nth-child(4n+5) { margin-left: 0; }
			&.span4:nth-child(3n+4) { margin-left: 0; }
		}
	}
	&.gallery-masonry {
		li { &[class*="span"] { margin-left: 0; } }
	}
	&.gallery-2 {
		li {
			.thumb { padding: 0; border-color: #4c4c4c; }
		}
	}
}
.thumb { 
	display: block; 
	padding: 3px; 
	border: 1px solid @contentBorder;
	&, img { .rounded(5px,5px,5px,5px); }
}

// Thumbnails
// ------------------------- //

.thumbnails {
	margin: 0;
	> li {
		margin-bottom: @spacing;
		.thumbnail {
			border-color: @contentBorder;
			background: @widgetBg;
			box-shadow: 0 3px 0 0 @contentShadow1;
			-moz-box-shadow: 0 3px 0 0 @contentShadow1;
			-webkit-box-shadow: 0 3px 0 0 @contentShadow1;
			.rounded(5px,5px,5px,5px);
			.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 {
	margin-bottom: @spacing;
	.rounded(5px, 5px, 5px, 5px);
	.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; }
	}
	.carousel-inner {
		.rounded(5px, 5px, 5px, 5px);
		box-shadow: 0 3px 0 0 @contentShadow2;
		-moz-box-shadow: 0 3px 0 0 @contentShadow2;
		-webkit-box-shadow: 0 3px 0 0 @contentShadow2;
		border: 1px solid @contentBorder;
	}
	.item {
		.rounded(5px, 5px, 5px, 5px);
		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%; .rounded(0, 5px, 5px, 0); }
		}
		.carousel-indicators {
			top: auto;
			bottom: -23px;
			right: 0;
			li {
				background: lighten(@primaryColor, 20%);
				&.active { background: @primaryColor; }
			}
		}
		.carousel-caption {
			height: 223px-30px;
			background: @widgetBgGray;
			top: 0;
		}
	}
}

// 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;
	.rounded(5px,5px,5px,5px);
	img { .rounded(5px,5px,5px,5px); }
}