$(document).ready(function() {
	
 $(document).pngFix(); 	
	
$(".close-msg").click(function(){
		$(this).parents("#messages").slideUp("fast");
		return false;
	});
	
//globalnav right nav

var config = {    
     sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
     interval: 200, // number = milliseconds for onMouseOver polling interval    
     over: showThis, // function = onMouseOver callback (REQUIRED)    
     timeout: 5000, // number = milliseconds delay before onMouseOut    
     out: hideThis // function = onMouseOut callback (REQUIRED)    
};

$(".login-li").hoverIntent( config );

function showThis(){
	$(this).find('form.login').fadeIn('fast');
	$(this).find('.login-link').addClass("active");
}

function hideThis(){
	$(this).find('form.login').hide();
	$(this).find('.login-link').removeClass("active");
}	

$(".hiw").click(function(){
		//$(this).parents("#messages").slideUp("fast");
		//$(this).parents("#billboard-wrap").siblings("#content-wrap").find("#hiw-1-text").slideUp("fast");
		//$(this).parents("#billboard-wrap").siblings("#content-wrap").find("#hiw-2-text").slideDown("fast");
		$(this).siblings(".hiw").removeClass('active');
		$(this).addClass('active');
		return false;
	});

$("#hiw-1").click(function(){
		$(this).parents("#billboard-wrap").siblings("#content-wrap").find(".hiw-text:not(#hiw-1-text)").hide();
		$(this).parents("#billboard-wrap").siblings("#content-wrap").find("#hiw-1-text").show();
		return false;
	});		
	
$("#hiw-2").click(function(){
		$(this).parents("#billboard-wrap").siblings("#content-wrap").find(".hiw-text:not(#hiw-2-text)").hide();
		$(this).parents("#billboard-wrap").siblings("#content-wrap").find("#hiw-2-text").show();
		return false;
	});	

$("#hiw-3").click(function(){
		$(this).parents("#billboard-wrap").siblings("#content-wrap").find(".hiw-text:not(#hiw-3-text)").hide();
		$(this).parents("#billboard-wrap").siblings("#content-wrap").find("#hiw-3-text").show();
		return false;
	});	

$("#hiw-4").click(function(){
		$(this).parents("#billboard-wrap").siblings("#content-wrap").find(".hiw-text:not(#hiw-4-text)").hide();
		$(this).parents("#billboard-wrap").siblings("#content-wrap").find("#hiw-4-text").show();
		return false;
	});	
	
$(".next,.prev").click(function(){
	$(this).parents(".hiw-text").hide();
	return false;
	});
	
$(".hiw-goto-1").click(function(){
	$(this).parents("#content-wrap").find("#hiw-1-text").show();
	$(this).parents("#content-wrap").prev("#billboard-wrap").find(".hiw").removeClass('active');
	$(this).parents("#content-wrap").prev("#billboard-wrap").find("#hiw-1").addClass('active');
	return false;
	});	

$(".hiw-goto-2").click(function(){
	$(this).parents("#content-wrap").find("#hiw-2-text").show();
	$(this).parents("#content-wrap").prev("#billboard-wrap").find(".hiw").removeClass('active');
	$(this).parents("#content-wrap").prev("#billboard-wrap").find("#hiw-2").addClass('active');
	return false;
	});	
	
$(".hiw-goto-3").click(function(){
	$(this).parents("#content-wrap").find("#hiw-3-text").show();
	$(this).parents("#content-wrap").prev("#billboard-wrap").find(".hiw").removeClass('active');
	$(this).parents("#content-wrap").prev("#billboard-wrap").find("#hiw-3").addClass('active');
	return false;
	});	

$(".hiw-goto-4").click(function(){
	$(this).parents("#content-wrap").find("#hiw-4-text").show();
	$(this).parents("#content-wrap").prev("#billboard-wrap").find(".hiw").removeClass('active');
	$(this).parents("#content-wrap").prev("#billboard-wrap").find("#hiw-4").addClass('active');
	return false;
	});	
	
	


});
