﻿
$(document).ready(function () {
    $('.tag1').hover(function () { $(this).animate({ fontSize: "24px" }, 'fast'); }, function () { $(this).animate({ fontSize: "22px" }, 'fast'); });
    $('.tag2').hover(function () { $(this).animate({ fontSize: "20px" }, 'fast'); }, function () { $(this).animate({ fontSize: "18px" }, 'fast'); });
    $('.tag3').hover(function () { $(this).animate({ fontSize: "18px" }, 'fast'); }, function () { $(this).animate({ fontSize: "16px" }, 'fast'); });


    $('#menu').find('li:first-child').addClass('first').each(function () {
        $(this).append('<span class="arrow"></span>');
    });

    if ($('#carrousel')) {
        $('#carrousel').carrousel({
            container: '.carrouselContainer',
            items: '.carrouselItem',
            enable: {
                triggers: true,
                selector: false,
                timer: true
            },
            trigger: {
                left: '.carrouselLeft',
                right: '.carrouselRight'
            },
            speed: 10000
        });
    }

    var strChUserAgent = navigator.userAgent,
    intSplitStart = strChUserAgent.indexOf("(", 0),
    intSplitEnd = strChUserAgent.indexOf(")", 0),
    strChMid = strChUserAgent.substring(intSplitStart, intSplitEnd);

    if (strChMid.indexOf("MSIE 6") != -1) {
        $('#menu > li').mouseenter(function () {
            $(this).children('ul').css('left', '170px');
        }).mouseleave(function () {
            $(this).children('ul').css('left', '-3000px');
        });
    }

    if (tab)
        $('#' + tab).addClass('select');
    if (link)
        $('#' + link).addClass('select');

    var imgLoading =  '../Images/lightbox/lightbox-ico-loading.gif',
    imagBtnClose = '../Images/lightbox/lightbox-btn-close.gif',
    imagBtnPrev = '../Images/lightbox/lightbox-btn-prev.gif',
    imagBtnNext = '../Images/lightbox/lightbox-btn-next.gif';
    $('a.zoom1').lightBox({imageLoading: imgLoading, imageBtnClose: imagBtnClose, imageBtnPrev: imagBtnPrev, imageBtnNext: imagBtnNext});
    $('a.zoom2').lightBox({ imageLoading: imgLoading, imageBtnClose: imagBtnClose, imageBtnPrev: imagBtnPrev, imageBtnNext: imagBtnNext });
    //$('a').lightBox();
});

