$(document).ready(function() {

    $('div.slide-show2').slides({
        preload: true,
        generateNextPrev: true,
        play: 3000,
        pause: 2000,
        generatePagination: true,
        effect: 'fade',
        crossfade: true,
        hoverPause: true
        /*animationComplete: function(current) {
            var ul = $('ul.pagination').each(function(i) {					
                var li = $(this).each(function(index) {

                    $(this).find('li').each(function(test) {							
                        cclass = $(this).attr('class');
								
                        if (cclass != 'current' && cclass != 'last current') {
                            $(this).find('a').fadeTo('fast',0.5);
                        } else {
                            $(this).find('a').fadeTo('fast',1.0);
                        }
								
                    });
                });
            });
        }*/
    });
    
	
    
    //$(this).find('li.current').attr('class');
						
						
						
    /*$(this).find('a').attr('style', 'opacity: 0;');
						$(this).find('a.current').attr('style', 'opacity: 0;');*/
						
    /*
						
						var isFirst = 0;
											
					$('ul.pagination').each(function(i) {
					
						var li = $(this).each(function(index) {

							var counter = -1;
							var loopcounter = 0;
							var countpictures = $('ul.pagination').find('li').size();
							
							$(this).find('li').each(function(test) {

								cclass = $(this).attr('class');
								
								loopcounter++;
								
								if (counter == 1) {
									counter = 2;
									loopcounter = 0;
								} else {
									if (cclass != 'current') {
										counter = 0;
									} else {
										if (counter == -1) {
											isFirst = 1;
										}
										counter = 1;
									}
								}
								
								if (counter == 2) {
									$(this).find('a').fadeTo('fast',1);
								} else {
									$(this).find('a').fadeTo('fast',0.5);
								}
								
							});
							
								if (loopcounter == countpictures) {
									//if (isFirst == 1) {
										//$('ul.pagination').first().fadeTo('fast',1);
										$('ul.pagination > :first-child').find('a').fadeTo('fast',1);
									//}
								}
							
							
							
						});
						
						
						//$(this).find('a').fadeTo('fast',0.5);						
						
						$(this).find('li.current').attr('class'); \\*/
						
	
    //$('div.info-desc').hide{}
	





		
    var infome_is_visible = false;
    $('.info-me').click(function() {
        if (infome_is_visible == false) {
            $('.info-desc').fadeTo('slow', 1);
            infome_is_visible = true;
        } else {
            $('.info-desc').fadeTo('slow', 0);
            infome_is_visible = false;
        }
    });
	
    $('.prev,.next').click(function() {
        $('.info-desc').fadeTo('fast', 0);
        infome_is_visible = false;
    });
	
    $('ul.pagination').each(function(i) {					
        $(this).each(function() {
            $(this).find('li').each(function() {
                $(this).find('a').each(function() {
                    $(this).click(function() {
                        $('div.info-desc').fadeTo('fast', 0);
                        infome_is_visible = false;
                    });	
                });				
            });
        });
    });
	
	
	

	//new banner
	
	
	/*
	$('.banner-wipe-slides').hover(
		  function () {
		  $('.prev,.next').stop(true,true);
			$('.prev,.next').fadeIn('fast', 'swing');
		  },
		  function () {
			$('.prev,.next').stop(true,true);
			$('.prev,.next').fadeOut('fast', 'swing');
		  }
);

$('.prev,.next').hover(
  function () {
  $(this).stop();
  },
  function () {
	 $(this).stop();
  }
);
*/
	
	$('.banner-small-slides, .banner-big-slides').cycle({
		fx: 'scrollHorz',
		activePagerClass: 'current',
		easing: 'easeInOutExpo',
		speed: 'slow',
		timeout: 5000,
		delay: 5000,
		pager: '.pager',
		prev: '.prev',
		next: '.next',
		pagerAnchorBuilder: function(idx, slide) { 
			return '<li class="page"><a></a></li>'; 
		} 
	});
	
	
	$('.banner-small-slides, .banner-big-slides').touchwipe({
        wipeLeft: function() {
            $('.banner-small-slides, .banner-big-slides').cycle('next');
        },
        wipeRight: function() {
            $('.banner-small-slides, .banner-big-slides').cycle('prev');
        }
    });
	
	

});



$(window).load(function() {

    });
