$(document).ready(function() {

    

    $("#testimonial-carousel").jCarouselLite({
        btnNext: "#testimonial-next",
        /*btnPrev: ".arr_prev",*/
        visible: 1,
        easing: "elasinout",
        speed: 700,
        vertical: true
    });

    $("#vacancy-carousel").jCarouselLite({
        visible: 1,
        easing: "backin",
        speed: 700,
        /*vertical: true,*/
        auto: 4000,
        start: 0
    });


    Array.elementAt = function(array, index){
        var i;
        for(i in array){
            if(i == index){
                return array[i];
            }
        }

        return null;
    }

    Shadowbox.init({
        handleOversize: "drag",
        modal: true
    });

    window.openNewTab = function(url){
        window.open(url);
        return false;
    }

    jQuery.Arshak = {
        changeDetails: function(item){
            var key = "item"+item;
            var data = Array.elementAt(stickers, key);
            var client = $("#client-name");
            var clientLink = $("#client-a");
            var uploadDate = $("#upload-date");

            client.html(data["client"]);
            clientLink.attr("href", data["address"]);
            clientLink.html("<strong>"+data["addressName"]+"</strong>");
            uploadDate.html(data["uploadDate"]);
        },

        highLihght: function(item){
            var key = "item"+item;
            var linkObject;

            if(!checkMade){
                var linkId = Array.elementAt(ids, key);
                linkObject = $("#"+linkId);
                var i;
                var tempObject;
                var tempKey;

                for(i in ids){
                    tempObject = $("#"+ids[i]);
                    tempObject.css("color", "#A5A5A5");
                    tempKey = "item"+ids[i];
                    linkObjects[tempKey] = tempObject;
                }

                linkObject.css("color", "#00BFF3");
            }else{
                linkObject = Array.elementAt(linkObjects, key);
                for(i in linkObjects){
                    linkObjects[i].css("color", "#A5A5A5");
                }

                linkObject.css("color", "#00BFF3");
            }


        },

        simpleFunc : function(param){
            alert(param);
        }
    };


});

