//** Container- (c) Dyna Drivers DHTML 
//** Oct 21st, 10'- Script created
//** March 23rd, 10' v1.01

$(function() {
		$('*:not(.anton_block) .jscont').wrap('<div class="jscont_container"/>')
		$('*:not(.anton_block) .news_left, *:not(.anton_block) .news_right').mousemove(function(e){
			removejscont_canceltimer();
     	var elem = $(this).next('div');
	    if(elem.hasClass('clear')) var elem = $(this).next().next();
	    if(elem.hasClass('jscont_container')) {
		    elem.css('position', 'absolute');
	     	elem.css('left', e.pageX-150+'px');
		    elem.css('top', e.pageY-80+'px');
		    elem.find('.jscont').show();
		    elem.show();
		  }
		  $('.zipcode_search').css('zIndex',1);
   	});
		$('.news_left, .news_right, .jscont_container').mouseleave(function() {
			removejscont_timer();
		});
		$('.jscont_container').mouseenter(function() {
			removejscont_canceltimer();
		});
		$('.news_left, .news_right').mouseenter(function() {
			removejscont();
		});
		function removejscont() {
			$('.jscont_container,.jscont').hide();
		}
		var closetimer = 0;
		function removejscont_timer() {  
			closetimer = window.setTimeout(removejscont, '50');
		}
		function removejscont_canceltimer() {
			if(closetimer) {
				window.clearTimeout(closetimer);
		    closetimer = null;
		  }
		}
		// ie z-index fix for overlay
		if(navigator.userAgent.match(/MSIE \d\.\d+/)) {
    var zIndexNumber = 1000;
    $('#layout2 div').each(function(){
        $(this).css('zIndex', zIndexNumber);
        zIndexNumber -= 10;
    });
		}
});

