﻿// JavaScript Document3

/**
 * Created by .
 * User: И
 * Date: 18.09.11
 * Time: 0:38
 */

$('#pointer').css('left',$('#menu li.current').position().left + 15);
    width = (($(document).width() - 925) / 2); 

 $('#menu li').hover(
        function() {
            $('#pointer').stop().animate({left:$(this).position().left + 15}, 350);
        },
     function() {
            $('#pointer').stop().animate({left:$('.current').position().left + 15}, 350);
        } );

//$('.item a').animate({opacity:0}, 0);


$('#mini .mini').hover(function() {
    $(this).find('.ygol').addClass('hover');
},
        function() {
            $(this).find('.ygol').removeClass('hover');
        }
        );
var newimg = '';
var newtxt = '';

$('#mini .mini').click(function() {


});

$('#mini .mini a').click(function() {
    $('#mini .mini .ygol').removeClass('active');
    $(this).next().addClass('active');
    newimg = $(this).attr('href');
    $("#bigimg .image").animate({opacity: 0}, 350, function() {
        $('#bigimg .loader').fadeIn(10);
        $('#bigimg .image').html("<img src='" + newimg + "' />").find("img").bind("load", function() {
            $('#bigimg .loader').fadeOut(0);
            $(this).parent().animate({opacity: 1}, 350);
        });
    });
     

    return false;
});

$('#slider').jCarouselLite({
    btnNext: ".next",
    btnPrev: ".prev",
    mouseWheel: false,
    visible:1
});

//$(document).ready(function() {
//    $('.item a').hover(function() {
//        $(this).find('img').fadeIn(100);
//    },
//            function() {
//                $(this).find('img').fadeOut(100);
//            }
//            );
//});

$('.item a').click(function() {
    $($(this).attr('href')).fadeIn(400);
    return false;
});

$('.close').click(function() {
    $(this).parent().parent().fadeOut(400);
    return false;
});
