$(window).bind('load', function() {
                var preload = new Array();
                $(".over").each(function() {
                                s = $(this).attr("src").replace(/\.(.+)$/i, "-over.$1");
                                preload.push(s)
                                        });
                var img = document.createElement('img');
                $(img).bind('load', function() {
                                if(preload[0]) {
                                        this.src = preload.shift();
                                }
                        }).trigger('load');
        });

$(function() {
		$.localScroll({axis:'y'});

		$('#bildspel a').lightBox({
			overlayBgColor: '#FFF',
			overlayOpacity: 0.6,
					txtImage: 'Bild',
					txtOf: 'av',
					imageBtnClose: '/rsrcs/magazine/images/close.gif',
					imageBtnPrev:  '/rsrcs/magazine/images/pil-left.png',
					imageBtnNext:  '/rsrcs/magazine/images/pil-right.png',
					imageLoading:  '/rsrcs/magazine/images/blank.gif',
					imageBlank:  '/rsrcs/magazine/images/blank.gif'
					});

                $("img.over").hover(function() {
                                $(this).attr("src", $(this).attr("src").split(".").join("-over."));
                        }, function() {
                                $(this).attr("src", $(this).attr("src").split("-over.").join("."));
                        });

		jQuery('#menu > a > div').hover(
			 function() {
				   jQuery(this).css('opacity', 0.4);
			   },
			   function() {
				   jQuery(this).css('opacity', 1.0);
			   });
		anim(0);
        });

