﻿/// <reference path="jquery-1.3.2-vsdoc2.js" />

var home = {
    imgLoading: "",
    imgBtnClose: "",
    imgBtnPrev: "",
    imgBtnNext: "",
    imgBlank: "",
    init: function() {
        $('#home-page-item').addClass('current_page_item');

        $('#gallery-images img').each(function(idx, elem) {
            var left = ((260 - $(elem).width()) / 2).toString() + 'px';
            $(elem).css('margin-left', left);
        });

        $('#gallery-images').cycle({
            timeout: 10000,
            speed: 1000,
            before: function() {
                var anchor = $(this);
                var img = anchor.children('img');

                anchor.parent()
                            .prev('h3')
                            .text($.trim(img.attr('title')));
            }
        });

        $('a.lightbox').lightBox({
            imageLoading: this.imgLoading,
            imageBtnClose: this.imgBtnClose,
            imageBtnPrev: this.imgBtnPrev,
            imageBtnNext: this.imgBtnNext,
            imageBlank: this.imgBlank
        });

        if (!$.browser.msie) {
            $('.box2 a').hover(function() {
                $(this).children('img').stop().fadeTo('normal', 1);
            }, function() {
                $(this).children('img').stop().fadeTo('normal', 0.4);
            }).children('img').fadeTo(1, 0.4);
        }
    }
};