@gradient: 'false';

.gradientBar(@primaryColor, @secondaryColor, @textColor: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
	color: @textColor;
	text-shadow: @textShadow;
	.gradient(@primaryColor, @secondaryColor, @gradient);
	border-color: @primaryColor;
}

// Gradients
.gradient(@startColor: #555, @endColor: #333, @gradient) when not (@gradient) {
	background-color: @startColor;
}

.gradient(@startColor: #555, @endColor: #333, @gradient) when (@gradient) {
	background-color: mix(@startColor, @endColor, 60%);
	background-image: -moz-linear-gradient(top, @startColor, @endColor);
	background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor));
	background-image: -webkit-linear-gradient(top, @startColor, @endColor);
	background-image: -o-linear-gradient(top, @startColor, @endColor);
	background-image: linear-gradient(to bottom, @startColor, @endColor);
	background-repeat: repeat-x;
}

// Button Background
.buttonBackground(@startColor, @endColor, @textColor: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)) when not (@gradient) {
	.gradientBar(@startColor, @endColor, @textColor, @textShadow);

	&:hover,
    &:active, &:focus {
		border-color: darken(@startColor, 5%);
		background-color: darken(@startColor, 5%);
	}
}

.buttonBackground(@startColor, @endColor, @textColor: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)) when (@gradient) {
	.gradientBar(@startColor, @endColor, @textColor, @textShadow);

	&:hover,
    &:active, &:focus {
		border-color: @endColor;
		background-color: darken(@endColor, 5%);
	}
}

// Drop shadows
.box-shadow(@shadow) {
  -webkit-box-shadow: @shadow;
     -moz-box-shadow: @shadow;
          box-shadow: @shadow;
}