(function ($) {
    var cache = [];
    // Arguments are image paths relative to the current page.
    $.preLoadImages = function () {
        var args_len = arguments.length;
        for (var i = args_len; i--;) {
            var cacheImage = document.createElement('img');
            cacheImage.src = arguments[i];
            cache.push(cacheImage);
        }
    }
})(jQuery);

jQuery.preLoadImages("/images/backgrounds/bg-01.jpg", "/images/backgrounds/bg-02.jpg", "/images/backgrounds/bg-03.jpg", "/images/backgrounds/bg-04.jpg", "/images/backgrounds/bg-05.jpg", "/images/backgrounds/bg-06.jpg");

(function () {
    // if firefox 3.5+, hide content till load (or 3 seconds) to prevent FOUT
    var d = document,
        e = d.documentElement,
        s = d.createElement('style');
    if (e.style.MozTransform === '') { // gecko 1.9.1 inference
        s.textContent = 'body{visibility:hidden}';
        e.firstChild.appendChild(s);

        function f() {
            s.parentNode && s.parentNode.removeChild(s);
        }
        addEventListener('load', f, false);
        setTimeout(f, 1500);
    }
})();

$(document).ready(function () {
    $('.slideshow').cycle({
        fx: 'fade',
        timeout: 6000,
        speed: 2500
    });
    $(window).resize(function () {
        $('.slideshow').css('width', $(window).width());
    });
//	$("#news ul li a span").css({
//		opacity: '0'
//	});
//	$("#news ul li a").hover(function () {
//		$(this).find('span').stop().animate({
//			opacity: '1'
//		}, 250);
//
//	}, function () {
//		$(this).find('span').stop().animate({
//			opacity: '0'
//		}, 250);
//	});

	$("#news ul li a").hover(function () {
		$(this).find('span').css({
			display: 'block'
	});
	}, function () {
		$(this).find('span').css({
			display: 'none'
	});
	});

});




