@mixin touch() {  -webkit-overflow-scrolling: touch;}

@mixin rot($ang){
    transform: rotate($ang+deg);
    -webkit-transform: rotate($ang+deg);
    -o-transform: rotate($ang+deg);
    -ms-transform: rotate($ang+deg);
    -moz-transform: rotate($ang+deg);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

@mixin ani($effect,$time,$ease : linear){
    -webkit-transition:$effect $time+ms $ease;
    -o-transition:$effect $time+ms $ease;
    -moz-transition:$effect $time+ms $ease;
    transition:$effect $time+ms $ease;
}


@mixin scale($x){
	transform:scale($x,$x);
	-o-transform:scale($x,$x);
	-webkit-transform:scale($x,$x);
	-ms-transform:scale($x,$x);
	-moz-transform:scale($x,$x);	
}
@mixin placeholder($color){
    ::-webkit-input-placeholder { /* WebKit browsers */
        color:    $color;
    }
    :-moz-placeholder { /* Mozilla Firefox 4 to 18 */
        color:    $color;
        opacity:  1;
    }
    ::-moz-placeholder { /* Mozilla Firefox 19+ */
        color:    $color;
        opacity:  1;
    }
    :-ms-input-placeholder { /* Internet Explorer 10+ */
        color:    $color;
    }
}
@mixin grad($start,$end,$start_opacity:1,$end_opacity:1,$image:false){
     background-image: $start;
     @if($image){
        background-image : url($image), -moz-linear-gradient(top,  rgba($start,$start_opacity) 0%, rgba($end,$end_opacity) 100%);
        background-image: url($image), -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba($start,1)), color-stop(100%,rgba($end,$end_opacity)));
        background-image: url($image), -webkit-linear-gradient(top,  rgba($start,$start_opacity) 0%,rgba($end,$end_opacity) 100%);
        background-image: url($image), -o-linear-gradient(top,  rgba($start,$start_opacity) 0%,rgba($end,$end_opacity) 100%);
        background-image: url($image), -ms-linear-gradient(top,  rgba($start,$start_opacity) 0%,rgba($end,$end_opacity) 100%);
        background-image: url($image), linear-gradient(to bottom,  rgba($start,$start_opacity) 0%,rgba($end,$end_opacity) 100%);
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$start', endColorstr='$end',GradientType=0 );
     } @else {
        background-image : -moz-linear-gradient(top,  rgba($start,$start_opacity) 0%, rgba($end,$end_opacity) 100%);
        background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba($start,1)), color-stop(100%,rgba($end,$end_opacity)));
        background-image: -webkit-linear-gradient(top,  rgba($start,$start_opacity) 0%,rgba($end,$end_opacity) 100%);
        background-image: -o-linear-gradient(top,  rgba($start,$start_opacity) 0%,rgba($end,$end_opacity) 100%);
        background-image: -ms-linear-gradient(top,  rgba($start,$start_opacity) 0%,rgba($end,$end_opacity) 100%);
        background-image: linear-gradient(to bottom,  rgba($start,$start_opacity) 0%,rgba($end,$end_opacity) 100%);
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$start', endColorstr='$end',GradientType=0 );         
     }
    
    filter:none;
    
}
@mixin pxpt($insert_pt){
    font-size:round($insert_pt * 1.33333) + px;
}

@mixin menu_btn ($color:#000){
    width: 18px;
    height: 18px;
    cursor: pointer;    
        .line {
            display: block;
            height: 2px;
            background: $color;
            margin: 4px 0px;    
        }
}
@mixin arrow($deg:45,$width:2px,$color:#333,$size:5px,$inline:true,$dir:'left'){
    @if($inline){
        position: relative;
    }
    &:before {
        @if($inline == false){
            position: absolute;
        }@else{
            display: inline-block;vertical-align: middle;
        }
        content:"";
        border-left:$width solid $color;
        border-bottom:$width solid $color;
        width:$size;height:$size;
            @include rot($deg);
            
        
        display: inline-block;vertical-align: middle;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
       
    }
}

%clear {
    &:after {
        content:"";display: block;clear:both;
    }
} 
%mock_table {
	display:table;table-layout:fixed;
	width:100%;
   
}
 .td  {display: table-cell;}
 .tr {
	 display: table-row;
 }
%ul {padding:0;margin:0;list-style: none;}
%select {
    &::-ms-expand {
        display: none;
    }
	-webkit-appearance:none;
	appearance:none;
	-moz-appearance:none;    
}
%type {
    line-height: .9em;letter-spacing: -.01em;
}
%vit {vertical-align: top;}
%vim {vertical-align: middle;}
%vib {vertical-align: bottom;}
%hov {
    &:hover {
        opacity: 0.7;
    }
}
@mixin spin( $speed:1s){ 
		
        -webkit-animation:spin $speed linear infinite;
        animation:spin $speed linear infinite;		
		
		@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
		@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
}
@mixin flip(){
    -moz-transform: scaleX(-1);
    -o-transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
    filter: FlipH;
    -ms-filter: "FlipH";	
    
}

// _decimal.scss | MIT License | gist.github.com/terkel/4373420

// Round a number to specified digits.
//
// @param  {Number} $number A number to round
// @param  {Number} [$digits:0] Digits to output
// @param  {String} [$mode:round] (round|ceil|floor) How to round a number
// @return {Number} A rounded number
// @example
//     decimal-round(0.333)    => 0
//     decimal-round(0.333, 1) => 0.3
//     decimal-round(0.333, 2) => 0.33
//     decimal-round(0.666)    => 1
//     decimal-round(0.666, 1) => 0.7
//     decimal-round(0.666, 2) => 0.67
//
@function decimal-round ($number, $digits: 0, $mode: round) {
    $n: 1;
    // $number must be a number
    @if type-of($number) != number {
        @warn '#{ $number } is not a number.';
        @return $number;
    }
    // $digits must be a unitless number
    @if type-of($digits) != number {
        @warn '#{ $digits } is not a number.';
        @return $number;
    } @else if not unitless($digits) {
        @warn '#{ $digits } has a unit.';
        @return $number;
    }
    @for $i from 1 through $digits {
        $n: $n * 10;
    }
    @if $mode == round {
        @return round($number * $n) / $n;
    } @else if $mode == ceil {
        @return ceil($number * $n) / $n;
    } @else if $mode == floor {
        @return floor($number * $n) / $n;
    } @else {
        @warn '#{ $mode } is undefined keyword.';
        @return $number;
    }
}

// Ceil a number to specified digits.
//
// @param  {Number} $number A number to round
// @param  {Number} [$digits:0] Digits to output
// @return {Number} A ceiled number
// @example
//     decimal-ceil(0.333)    => 1
//     decimal-ceil(0.333, 1) => 0.4
//     decimal-ceil(0.333, 2) => 0.34
//     decimal-ceil(0.666)    => 1
//     decimal-ceil(0.666, 1) => 0.7
//     decimal-ceil(0.666, 2) => 0.67
//
@function decimal-ceil ($number, $digits: 0) {
    @return decimal-round($number, $digits, ceil);
}

// Floor a number to specified digits.
//
// @param  {Number} $number A number to round
// @param  {Number} [$digits:0] Digits to output
// @return {Number} A floored number
// @example
//     decimal-floor(0.333)    => 0
//     decimal-floor(0.333, 1) => 0.3
//     decimal-floor(0.333, 2) => 0.33
//     decimal-floor(0.666)    => 0
//     decimal-floor(0.666, 1) => 0.6
//     decimal-floor(0.666, 2) => 0.66
//
@function decimal-floor ($number, $digits: 0) {
    @return decimal-round($number, $digits, floor);
}
@function strip($number) {
  @if type-of($number) == 'number' and not unitless($number) {
    @return $number / ($number * 0 + 1);
  }
  @return $number;
}
/*px to em: first param = parent font-size, second param = unit in pixels to be converted 
to em */
@function em($p,$v){
	@return decimal-floor( ((strip($v) / strip($p)) * 1em) ,2 );
} 

