
function getWidth() {
  var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
  }
  return myWidth;
}


function transform() {
	var windowWidth = getWidth();
	
	var index_clients_content_list = $(".index_clients_content_list");
	
	if (windowWidth > 1200) {
		index_clients_content_list.width("790px");
		$(".shortlinks_place, .index_clients li:eq(2), .dop_content").show();
		$("#work5").show();
		$("#kill_width").width("530px");
		
		$(".blog_content div.post-wrapper").css({'width':'30%'}).eq(2).show();

		$('.index-menu-portfolio').removeClass('img__small');
		
		$('.blog_head ul').width('586px');
		
		$('.icons').removeClass('nc1024');

		$('.social').show();
		
		$('.team-container').width("1050px");
		
		$('.team-container ul li').removeClass('team-member-name-left').filter(':nth-child(4n+1)').addClass('team-member-name-left');

		$('.nimax-top-phone').addClass('nimax-top-phone-max');

	} else {
		index_clients_content_list.width("530px");
		$(".shortlinks_place, .index_clients li:eq(2), .dop_content").hide();
		$("#work5").hide();
		$("#kill_width").width("400px");
		
		$(".blog_content div.post-wrapper").css({'width':'45%'}).eq(2).hide();

		$('.index-menu-portfolio').addClass('img__small');
		
		$('.blog_head ul').width('374px');
		
		$('.icons').addClass('nc1024');

		$('.social').hide();

		$('.team-container').width("790px");
		$('.team-container ul li').removeClass('team-member-name-left').filter(':nth-child(3n+1)').addClass('team-member-name-left');
		
		$('.nimax-top-phone').removeClass('nimax-top-phone-max');
	}
	
}


$(window).resize(function(){
	transform();

});

$(window).load(function(){
  if($('.scroll-new').length){
    $('.scroll-new').jScrollPane(
      {
        verticalDragMinHeight: 16,
        verticalDragMaxHeight: 16,
        horizontalDragMinWidth: 33,
        horizontalDragMaxWidth: 33,
        showArrows: true,
        autoReinitialise: true
      }
    );
  }
});


$(document).ready(function(){
	transform();
});

