jQuery.event.add(window, "load", resizeFrame);
jQuery.event.add(window, "resize", resizeFrame);

function resizeFrame() 
{
    var w = $(window).width();
    $(".home-banners a img").css('width',(w /3 ));
}



$(function() {
		   
	$('a.home-banner-1').hover(function() {
			$('a.home-banner-2 span').fadeIn(400);
			$('a.home-banner-3 span').fadeIn(400);
		},
		function() {
			$('a.home-banner-2 span').css("display", "none");
			$('a.home-banner-3 span').css("display", "none");
		}
	);

	$('a.home-banner-2').hover(function() {
			$('a.home-banner-1 span').fadeIn(400);
			$('a.home-banner-3 span').fadeIn(400);
		},
		function() {
			$('a.home-banner-1 span').css("display", "none");
			$('a.home-banner-3 span').css("display", "none");
		}
	);		   

	$('a.home-banner-3').hover(function() {
			$('a.home-banner-1 span').fadeIn(400);
			$('a.home-banner-2 span').fadeIn(400);
		},
		function() {
			$('a.home-banner-1 span').css("display", "none");
			$('a.home-banner-2 span').css("display", "none");
		}
	);		   
});



jQuery(function() {

    jQuery('div.menu ul li > a#dropdown').click(function() {
												
        jQuery(this).parent().find('div.sub-menu').slideDown();
		jQuery(this).addClass("selected");
    });
	
	jQuery('a.slideUP').click(function() {
									   
		jQuery(this).parent().slideUp();		
		jQuery(this).parent().prev().removeClass("selected");
	});
	
	jQuery('#mycarousel').jcarousel({
        vertical: false,
        scroll: 1,
		itemFallbackDimension: 300
    });
	
	jQuery('.slideUP').css('top', jQuery('li div.sub-menu').height() + 'px');
	jQuery('.slideUP').css('left', ((jQuery(window).width()/ 2) - 126 )+ 'px');
    
});



































//$(function() {
//	$('a.[class*=home-banner]').hover(function() {
//			$('a.[class*=home-banner]').not('.'+$(this).attr("class")).find('span').fadeIn(300);
//			//$('span', this).fadeOut(300);
//		},
//		function() {
//			$('a.[class*=home-banner] span').fadeOut(300);
//		}
//	);		   
//});
