var is_deleted = true;
		var durationTime = 1300;
		function changeContent(){			
			prevHeader = $('.scrolItem:nth-child(3)').find('.sHeader').html();			
			nextHeader = $('.scrolItem:first').find('.sHeader').html();
			$('.scrollButs .next .bb').html(nextHeader);
			$('.scrollButs .prev .bb').html(prevHeader);			
			contentLink = $('.scrolItem:nth-child(2)').find('.itPath').val();	
			
			$.get(contentLink, function(data) {
			  $('#mainPart').hide();
			  $('#mainPart').html('<div class="mService"></div>');
			  $('#mainPart .mService').html(data);
			   $('#mainPart').fadeIn();
			});
			

			
		}
		function changeContentMain(){			
			prevHeader = $('.scrolItem:nth-child(3)').find('.sHeader').html();			
			nextHeader = $('.scrolItem:first').find('.sHeader').html();
			$('.scrollButs .next .bb').html(nextHeader);
			$('.scrollButs .prev .bb').html(prevHeader);			
		}
		function resizeItems(){
			$('.scrolItem').css('width' , $('#scrollContainer').width());
			$('.scrollBar').css('margin-left' , '-'+$('#scrollContainer').width()+'px');		
		}
		function slowRemove(element){								
			is_deleted = false;	
			$(element).animate({width:'0px'}, durationTime, function(){$(element).remove(); is_deleted = true; changeContent();});			
		}
		function left(){					
			var first = $('.scrolItem:first').clone();			
			element = $('.scrolItem:first');
			$('#scroller').append(first);		
			slowRemove(element);					
		}
		function right(){
			var last = $('.scrolItem:last').clone();
			element = $('.scrolItem:last');
			$('#scroller').prepend(last);
			$(element).remove();
			eWidth = $('.scrolItem:first').width();	
			$('.scrolItem:first').width(0);
			is_deleted = false;	
			$('.scrolItem:first').animate({width: eWidth }, durationTime, function(){is_deleted = true; changeContent();});							
		}
		$(window).resize(function(){
			resizeItems();
		});
		$(document).ready(function(){	
			resizeItems();
			changeContentMain();
			$('.scrollButs .prev').click(function(){
				if (is_deleted){
					left();
				}
			});			
			$('.scrollButs .next').click(function(){
				if (is_deleted){
					right();
				}	
			});
            $('.pAll .psection').click(function(){
                $('ul.list_svs').hide();
                $('.pAll .psection').css('color','#E9A9AC');
                $(this).css('color','#fff');
                $(this).parent().find('ul.list_svs').fadeIn();
                return false;
            });
		});
