﻿function email() {
    ML = "ha<=/nr@deilf.c:po>mts \"";
    MI = "21F069<3GC1:;DA?:5<A781C>16@6A@96D:9E=>ACGB:5<A781C>16@6A@96D:9E=>AC241B";
    OT = "";
    for (j = 0; j < MI.length; j++) {
        OT += ML.charAt(MI.charCodeAt(j) - 48);
    } document.write(OT);
}

jQuery.preloadImages = function() {
    for (var i = 0; i < arguments.length; i++) {
        jQuery("<img>").attr("src", arguments[i]);
    }
}

jQuery(document).ready(function() {
    jQuery("ul.gallery li a").lightBox();

    setInterval("slideSwitch()", 5000);

    jQuery(".roll-over").hover(
        function() {
            var img = jQuery(this).children("img");
            var src = img.attr("src");
            src = src.substring(0, src.length - 4) + "-over" + src.substring(src.length - 4, src.length);
            img.attr("src", src);
        },
        function() {
            var img = jQuery(this).children("img");
            var src = img.attr("src").replace("-over", "");
            img.attr("src", src);
        }
    );

});


function slideSwitch() {
    var active = jQuery('#slideshow img.active');

    if (active.length == 0) active = jQuery('#slideshow img:last');

    var next = active.next().length ? active.next()
		: jQuery('#slideshow img:first');


    active.addClass('last-active');

    next.css({ opacity: 0.0 })
		.addClass('active')
		.animate({ opacity: 1.0 }, 1000, function() {
		    active.removeClass('active last-active');
		});
}