
        
var maxWidth = 626;
var minWidth = 165;
var iTimer = 400;
var originalWidth = 319;
var state = 'new';
       
            
            
            
function HideSliders() {
          
	if (state != 'on') {
        	state = 'closing';
                     	jQuery("#a1").animate({ width: originalWidth + "px" }, { queue: false, duration: iTimer });
                	jQuery("#a2").animate({ width: originalWidth + "px" }, { queue: false, duration: iTimer });
                	jQuery("#a3").animate({ width: originalWidth + "px" }, { queue: false, duration: iTimer });
                	jQuery(".divHeroBannerText").fadeIn();
                    	state = 'new';
        }
}


function displayItem(id){
   		
   		 
   		 
	if (state != 'closing') {
       		switch(id){
               		case 1: {
           			jQuery("#divHeroBannerText2").fadeIn();
	           		jQuery("#divHeroBannerText3").fadeIn();
	                   	jQuery("#a2").animate({ width: minWidth + "px" }, { queue: false, duration: iTimer });
	                   	jQuery("#a3").animate({ width: minWidth + "px" }, { queue: false, duration: iTimer });
	                   	break;
	               }
			case 2:{
	               	   	jQuery("#divHeroBannerText1").fadeIn()
				jQuery("#divHeroBannerText3").fadeIn()
	                   	jQuery("#a1").animate({ width: minWidth + "px" }, { queue: false, duration: iTimer });
	                   	jQuery("#a3").animate({ width: minWidth + "px" }, { queue: false, duration: iTimer });
	                   	break;
	               }
	               case 3: {
	                   	jQuery("#divHeroBannerText1").fadeIn()
	                   	jQuery("#divHeroBannerText2").fadeIn()
	                   	jQuery("#a1").animate({ width: minWidth + "px" }, { queue: false, duration: iTimer });
	                   	jQuery("#a2").animate({ width: minWidth + "px" }, { queue: false, duration: iTimer });
	                   	break;
	               }
		}
               
		jQuery("#a" + id).animate({ width: maxWidth + "px" }, { queue: false, duration: iTimer });
	        span = jQuery("#span" + id);
		state = 'off';
		jQuery("#divHeroBannerText" + id).fadeOut();
              
    }
}


function initializeSliders() {
       jQuery("#a1").css("width", originalWidth + "px");
       var i = 1;
       
	jQuery("#divBGImages img").each(function () {
           jQuery("#div" + i).css("background-image", "url('" + this.src + "')");
           i++;
       	});
}

function SwapUrl(url){
	document.location.href = url;
}

  
jQuery.noConflict();
jQuery(document).ready(function () {
		
        initializeSliders();

	
	jQuery("#leftRoll").css("left", jQuery("#rfl_hero").position().left - 100);
	jQuery("#leftRoll").mouseover(function () { HideSliders(); });
	jQuery("#rightRoll").mouseover(function () { HideSliders(); });
	jQuery("#rfl_heroOuterLower").mouseover(function () { HideSliders(); });
	jQuery("#globalnav").mouseover(function () { HideSliders(); });
	jQuery("#logo").mouseover(function () { HideSliders(); });


            jQuery("ul li a").hover(
                            function () {
                                switch(this.id){
                                	case "a1":{
                                		displayItem(1);
                                		break;
                                		}
          
                                	case "a2":{
                                        	displayItem(2);
	                                        break;
                                        }
                                	case "a3":{
	                                        displayItem(3);
        	                                break;
                                        }
                                 }
                            });

          });


