$(document).ready(function() {
var owl = $(".main-slider");
owl.owlCarousel({
singleItem: true,
navigation: true,
navigationText: false,
rewindNav: false,
afterAction: rotate
});
var iter = 0;
function rotate(){
var quantity = this.owl.owlItems.length -1;
var currentItem1 = this.owl.currentItem;
var prevItem1 = this.owl.prevItem;
if(currentItem1 > prevItem1){
iter++;
}
if(currentItem1 < prevItem1){
iter--;
}
var step = 90/quantity;
var deg = step*iter;
$('.test').css({transform: 'rotate('+deg+'deg)'})
}
});
$(document).ready(function() {
$(".to-modal").fancybox({
fitToView : false
});
$(".to-modal--emp").fancybox({
fitToView : false,
'beforeLoad' : function(){
$('body').addClass('white');
},
'afterClose': function() {
$('body').removeClass('white');
}
});
});
.white{
.fancybox-overlay {
background: url('../img/design/overlay--white.png');
}
}