$(window).on('scroll', function() {
    $('.parallaximg').css('top', $(window).scrollTop() * -0.2);
});

    (function () {
      var features = $("#features"),
        listItems = features.find(".features, .wheel").find("li"),
        hoveredClass = "hovered";

      listItems.hover(
        function () {
          var elClass = $(this).attr("class");
          features.find("." + elClass).addClass(hoveredClass);
          features.find("ul").addClass(hoveredClass);
        },
        function () {
          features.find("." + hoveredClass).removeClass(hoveredClass);
        }
      )
    })()

    $(window).load(function () {
      $("#features").addClass("activate-circles");
    })
	
//--------------	circle -------------
	
	var type = 1, //circle type - 1 whole, 0.5 half, 0.25 quarter
    radius = '22em', //distance from center
    start = -90, //shift start from 0
    $elements = $('.circlesim li:not(:first-child)'),
    numberOfElements = (type === 1) ?  $elements.length : $elements.length - 1, //adj for even distro of elements when not full circle
    slice = 360 * type / numberOfElements;

$elements.each(function(i) {
    var $self = $(this),
        rotate = slice * i + start,
        rotateReverse = rotate * -1;
    
    $self.css({
        'transform': 'rotate(' + rotate + 'deg) translate(' + radius + ') rotate(' + rotateReverse + 'deg)'
    });
});

//---- circle scale with devices ---
var w = $( document ).width();
if(w > 992){
document.getElementById("features").style.transform = "scale(1)translateY(-60px)"; 
document.getElementById("features").style.height= "680px";
}
else if (w<992 && w>786){
document.getElementById("features").style.transform = "scale(0.7)translateY(-170px)"; 
document.getElementById("features").style.height= "470px";
}
else {
document.getElementById("features").style.transform = "scale(0.36) translate(-40px,-260px)"; 
document.getElementById("features").style.height= "260px";
}

$(window).on('resize', function() {
	
var w = $( document ).width();
if(w > 992){
document.getElementById("features").style.transform = "scale(1)translateY(-60px)"; 
document.getElementById("features").style.height= "680px";
}
else if (w<992 && w>786){
document.getElementById("features").style.transform = "scale(0.7)translateY(-170px)"; 
document.getElementById("features").style.height= "470px";

}
else {
document.getElementById("features").style.transform = "scale(0.36) translate(-40px,-260px)"; 
document.getElementById("features").style.height= "260px";
}

	 
    $('#features').css('transform', $(window).width() * -0.2);
})


$(".card-price .otherc").minHeight($(".onec").height());


