function ShowService() { return false; }
function ShowIndustry() { return false; }
function ShowNews() { return false; }

/**/// init portfolio colorbox + jCarousels
function initPortfolioPopups() {
    $('[rel="case-studies"]').colorbox({
            width: 700,
            maxWidth: 700,
            initialWidth: 700,
            innerWidth: 700,
            initialHeight: 500,
            opacity: 0.65,
            preloading: true,
            inline: true,
            loop: false,
            href: function () {
                var no = $(this).attr('rev');
                return "#case-" + no;
            },
            rel: 'case-studies',
            onLoad: function () {
                var no = $(this).attr('rev');
                var currList = $('#slideshow-case-' + no);

                currList.find('img.captify').each(function () {
                    $(this).attr('src', $(this).attr('rel'));
                });
            },
            onComplete: function () {
                $('#colorbox').width(700);

            }
        });

    /**/// init jCarousel inside active popup
    $('.case-images.jcarousel-skin-popup').jcarousel(
    {
        scroll: 1,
        buttonNextHTML: '<a></a>',
        buttonPrevHTML: '<a></a>'
    });

    $('img.captify').captify({
        animation: 'always-on',
        prefix: '',
        opacity: '1',
        className: 'caption-bottom',
        position: 'bottom',
        spanWidth: '100%'
    });
}

function initSortLinks() {
    var nameLink = $('#NameLink');
    var releaseLink = $('#ReleaseLink');

    nameLink.click(function () {
        $(this).addClass('focused');
        releaseLink.removeClass('focused');
    });

    releaseLink.click(function () {
        $(this).addClass('focused');
        nameLink.removeClass('focused');
    });

    /**/// initial value
    releaseLink.addClass('focused');
}

$(document).ready(function () {
    /**/// adds "last-child" class where needed
    $(".preserve-last").each(function () {
        $(this).children(":last-child").addClass("last-child");
    });

    /**/// homepage slider parameters
    $('.home-slider').after('<div id="nav">').cycle({
        fx: 'fade',
        speed: 2000,
        timeout: 10000,
        pager: '#nav'
    });

    /**/// entire block clickable for latest news
    $(".ln-list li").click(function () {
        window.location = $(this).find("a").attr("href");
        return false;
    });

    $(".ln-list li").mouseover(function () {
        $(this).addClass('ln-active');
        $(this).find("a").attr("class", "ln-link");

    }).mouseout(function () {
        $(this).removeClass('ln-active');
        $(this).find("a").attr("class", "");
    });


    /**/// entire block clickable for header contact box(present in all interior pages)
    $(".header-contact").click(function () {
        window.location = $(this).find("a").attr("href");
        return false;
    });

    /**/// bind click events for accessibility links
    $('#lnkNormalFont').click(function () {
        setActiveCss('FontNormal');
    });
    $('#lnkLargeFont').click(function () {
        setActiveCss('FontLarge');
    });
    $('#lnkExtraLargeFont').click(function () {
        setActiveCss('FontExtraLarge');
    });
});
