

$(document).ready(function(){

	$('.slides_all').width(930);

	

	$('.wrap_slides').cycle({ 

    fx:     'scrollHorz',

	width: 930,

    timeout: 0, 

	prev:   '.prev',

	next:   '.next',

	after: onAfterAll 

 });

	function onAfterAll() { 

	 $('.wrap_slides_project:visible').cycle({ 		   

		   fx:     'fade', 

		   speed:  900, 

		   timeout: 0, 

		   pause:  1, 

		   cleartypeNoBg: true,

		 

		   clip:   'l2r',

		   pager:  '.menu-proekty:visible',

		   allowPagerClickBubble: true,

		   pagerAnchorBuilder: function(idx, slide) {

				return '.menu-proekty:visible  li:eq(' + (idx) + ')';

		   },

		   after:   onAfter 

		}); 

	 function onAfter() { 

	   $('.img_nav:visible li img').live('click',function () {

		$('.slides_img:visible a').hide();

		   var classAlt = $(this).attr('alt');

		 

		   $('.slides_img:visible a.'+classAlt).fadeIn("slow");

		}); 

	 

	 }

	}

	max_h = 0;

	$('.slides_info .info').each(function(){

		if( $(this).height()>max_h) {

			max_h =  $(this).height(); 

		}

	 });

$('.slides_info .info').height(max_h+20);



	$('.slides_info .info').width();

	 $('.slides_info').cycle({ 		   

		fx:     'scrollHorz',

		height: max_h+90,

		timeout: 0,

		prev:   '.prev2',

		next:   '.next2'

		

 });

	

	$(function() {

		    $(".jMyCarousel").jMyCarousel({

		        visible: '100%',

				btnNext: '.jMyCarousel',

				evtStart: 'mouseover',

				evtStop: 'mouseout'

		    });

		});

			$(function() {

		    $(".jMyCarouse2").jMyCarousel({

		        
			    
			    visible: '100%',
				btnNext: '.jMyCarouse2',
				evtStart : ' ',

				

		    });

		});

});
