$(document).ready(function() {
var theAction = $("form").attr("action");
	var theAction = $("form").attr("action");
	if (theAction == "../C-Clamp_with_RHC.aspx?id=456") {
		$("form").attr('action', "https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8");
	}
  		
    $('.sub-nav').hide();
    windowWidth = $(window).width();

     $('#news-block').cycle({
        fx: 'fade',
        prev: '#prev',
        next: '#next',
        after: onAfter,
        cleartypeNoBg: true
        //timeout: 0
    });

$('a[href^="http://vcloud"]')
  .attr({
    target: "_blank", 
    title: "Opens in a new window"
  });
$('a[href^="http://www.gartner"]')
  .attr({
    target: "_blank", 
    title: "Opens in a new window"
  });
$('a[href^="http://www.verizonbusiness"]')
  .attr({
    target: "_blank", 
    title: "Opens in a new window"
  });
  
  // REMOVE LINKS FROM HTML
  var data = '<div id="featured">FEATURED FACILITIES</div>';
  var data2 = '';
  var data3 = 'Data Centers';
  var data4 = 'Services';
  var data5 = 'About Us';
  var data6 = 'Solutions';
  var data7 = 'Partners';
  	$('#sub-section-list-dark ul li:contains("FEATURED")').replaceWith( data );
  	$('#sub-section-list-light ul li:contains("FEATURED")').replaceWith( data2 );
  	$('#bread-crumb a:contains("Datacenters")').replaceWith( data3 );
  	$('#bread-crumb a:contains("Data Centers")').replaceWith( data3 );
  	$('#bread-crumb a:containsExact("Services")').replaceWith( data4 );
  	$('#bread-crumb a:contains("About Us")').replaceWith( data5 );
  	$('#bread-crumb a:contains("Solutions")').replaceWith( data6 );
 	$('#bread-crumb a:contains("Partners")').replaceWith( data7 );
  
  	$('.foot-link a:contains("Partners")').replaceWith( data7 );
  	$('.foot-link a:contains("Solutions")').replaceWith( data6 );
  	$('.foot-link a:contains("About Us")').replaceWith( data5 );
  	$('.foot-link a:containsExact("Services")').replaceWith( data4 );
  	$('.foot-link a:containsExact("Platform")').replaceWith( data3 );
  
	var data8 = '<li><img src="/images/leader-dividers/terr-corp.gif" alt="Corporate"></li>';
var data9 = '<li><img src="/images/leader-dividers/terr-sales.gif" alt="Sales"></li>';
var data10 = '<li><img src="/images/leader-dividers/terr-products.gif" alt="Products"></li>';

var data18 = '<li><img src="/images/leader-dividers/br-corp.gif" alt="Corporate"></li>';
var data19 = '<li><img src="/images/leader-dividers/br-sales.gif" alt="Sales"></li>';
var data20 = '<li><img src="/images/leader-dividers/br-products.gif" alt="Products"></li>';

var data28 = '<li><img src="/images/leader-dividers/du-corp.gif" alt="Corporate"></li>';
var data29 = '<li><img src="/images/leader-dividers/du-sales.gif" alt="Sales"></li>';
var data30 = '<li><img src="/images/leader-dividers/du-products.gif" alt="Products"></li>';

var data38 = '<li><img src="/images/leader-dividers/sp-corp.gif" alt="Corporate"></li>';
var data39 = '<li><img src="/images/leader-dividers/sp-sales.gif" alt="Sales"></li>';
var data40 = '<li><img src="/images/leader-dividers/sp-products.gif" alt="Products"></li>';

$('#sub-section-list-light ul li a:containsExact("Corporate")').replaceWith( data8 );
$('#sub-section-list-light ul li a:containsExact("Sales")').replaceWith( data9 );
$('#sub-section-list-light ul li a:containsExact("Products")').replaceWith( data10 );

$('#sub-section-list-light ul li a:containsExact("br-Corporate")').replaceWith( data18 );
$('#sub-section-list-light ul li a:containsExact("br-Sales")').replaceWith( data19 );
$('#sub-section-list-light ul li a:containsExact("br-Products")').replaceWith( data20 );

$('#sub-section-list-light ul li a:containsExact("du-Corporate")').replaceWith( data28 );
$('#sub-section-list-light ul li a:containsExact("du-Sales")').replaceWith( data29 );
$('#sub-section-list-light ul li a:containsExact("du-Products")').replaceWith( data30 );

$('#sub-section-list-light ul li a:containsExact("sp-Corporate")').replaceWith( data38 );
$('#sub-section-list-light ul li a:containsExact("sp-Sales")').replaceWith( data39 );
$('#sub-section-list-light ul li a:containsExact("sp-Products")').replaceWith( data40 );
  
    $('.main-nav-item-active').hover(
 		function() {
		    windowWidth = $(window).width();
 		    var hovered = $(this).attr("id");
 		    var subWidth = windowWidth - 205;
 		    $(this).css('background-color', '#FFFFFF');
 		    $(this).children('a:first').css('color', '#000000');
 		    $(this).children().css('width', subWidth + 'px');
 		    //$(this).children('.sub-nav').css('display','block');
 		    $(this).children('.sub-nav').slideDown("fast");
 		},
 		function() {
 		    $(this).css('background-color', '#FFB431');
		   // $(this).children('a').css('color', '#FFFFFF');
 		    $(this).children().css('width', '0');
 		    $(this).children('.sub-nav').slideUp(50);
 		}
	);

 		$('.main-nav-item').hover(
 		function() {
 		    windowWidth = $(window).width();
 		    var hovered = $(this).attr("id");
 		    var subWidth = windowWidth - 205;
 		    $(this).css('background-color', '#FFFFFF');
 		    $(this).children('a').css('color', '#000000');
 		    $(this).children().css('width', subWidth + 'px');
 		    //$(this).children('.sub-nav').css('display','block');
 		    $(this).children('.sub-nav').slideDown("fast");


 		},
 		function() {
 		    $(this).css('background-color', 'transparent');
 		    $(this).children('a').css('color', '#FFFFFF');
 		    $(this).children().css('width', '0');
 		    //$(this).children('.sub-nav').css('display','none');
 		    $(this).children('.sub-nav').slideUp(50);

 		}
	);

    /*$(".main-nav-item-active").live({
    mouseover: function() {
    windowWidth = $(window).width();
    var hovered = $(this).attr("id");
    var subWidth = windowWidth - 205;
    $(this).css('background-color', '#FFFFFF');
    $(this).children('a:first').css('color', '#000000');
    $(this).children().css('width', subWidth + 'px');
    $(this).children('.sub-nav').slideDown("fast");
    },
    mouseout: function() {
    $(this).css('background-color', '#FFB431 !important');
    $(this).children('a').css('color', '#fff !important');
    $(this).children().css('width', '0');
    $(this).children('.sub-nav').slideUp(50);
    }
    });*/



    function colorMenu() {
      //  $('#sub-section-list-light ul li.active').css('background-color', '#FFB431');
        $("#sub-section-list-dark ul li.active").css('background-color', '#FFB431');
    }

    /////////////// NEW SUB SECTION LIST ///////////////
    var thepathname = window.location.pathname;
    var directory = window.location.pathname.indexOf("/about/leadership-team/");
    //alert(pathname);
    //alert(directory);
    if (thepathname == '/about/leadership-team.aspx') {
    	$('#sub-section-list-light ul li').css('paddingLeft', '20px');
 		$('#sub-section-list-light ul li').first().css('paddingLeft', '30px');
 		$('#sub-section-list-light ul li.active:gt(0)').css('paddingLeft', '50px');
		$('#sub-section-list-light ul').find('img').unwrap();
		$('#sub-section-list-light ul').find('img').parent().css("background-image", "none");
		$('#sub-section-list-light ul li').find('img').parent().css("paddingLeft", "0");
	} else if (directory == 0) {

		$('#sub-section-list-light ul li').css('paddingLeft', '20px');
 		$('#sub-section-list-light ul li').first().css('paddingLeft', '0');
 		$('#sub-section-list-light ul li.active:gt(0)').css('paddingLeft', '50px');
		$('#sub-section-list-light ul').find('img').unwrap();
		$('#sub-section-list-light ul').find('img').parent().css("background-image", "none");
		$('#sub-section-list-light ul li').find('img').parent().css("paddingLeft", "0");
	}


    $('#sub-section-list-light ul li:gt(0)').not(':has(img)').hover(
 		function() {
 		//alert("HERE");
 		    var thepathname = window.location.pathname;
 		    if (thepathname == '/about/leadership-team.aspx' || directory == 0) {
 		    	$(this).css('background-color', '#E2E2E2');
 		    	$(this).css('background-image', 'url("http://www.terremark.com/images/temp-four/section-list-arrow.png")');
 		    	$(this).css('background-position', '334px 50%');
 				$(this).css('margin-left', '-30px');
 				$(this).css('padding', '2px 0 1px 50px');
 		    	$(this).css('border-bottom', 'none');
 		    	$(this).css('margin-top', '-1px');
 		    	$(this).css('height', '21px');
 			} else {
 				$(this).css('background-color', '#E2E2E2');
 		    	$(this).css('background-image', 'url("http://www.terremark.com/images/temp-four/section-list-arrow.png")');
 		    	$(this).css('background-position', '334px 50%');
 				$(this).css('margin-left', '-30px');
 				$(this).css('padding', '2px 0 1px 30px');
 		    	$(this).css('border-bottom', 'none');
 		    	$(this).css('margin-top', '-1px');
 		    	$(this).css('height', '21px');	
 			}
 		   		    
 		},
 		function() {
 		     		    
 		    if (thepathname == '/about/leadership-team.aspx' || directory == 0) {
 		    	$(this).css('background-color', 'transparent');
 		   	 	$(this).css('background-image', 'url("http://www.terremark.com/images/temp-four/section-list-arrow.png")');
 		    	$(this).css('background-position', '304px 50%');
 		    	$(this).css('padding', '1px 0 1px 20px');
 		    	$(this).css('border-bottom', 'thin solid #C3C3C3');
 		    	$(this).css('margin-top', '0');
 		    	$(this).css('height', '20px');
 				$(this).css('margin-left', '0');
 			} else {
 				$(this).css('background-color', 'transparent');
 		   	 	$(this).css('background-image', 'url("http://www.terremark.com/images/temp-four/section-list-arrow.png")');
 		    	$(this).css('background-position', '304px 50%');
 		    	$(this).css('padding', '1px 0 1px 0');
 		    	$(this).css('border-bottom', 'thin solid #C3C3C3');
 		    	$(this).css('margin-top', '0');
 		    	$(this).css('height', '20px');
 				$(this).css('margin-left', '0');	
 			}
 		    
 		}
	);
$('#sub-section-list-light ul li:first').hover(
 		function() {
 		//alert("HERE");
 		    var thepathname = window.location.pathname;
 		    if (thepathname == '/about/leadership-team.aspx' || directory == 0) {
 		    	$(this).css('background-color', '#E2E2E2');
 		    	$(this).css('background-image', 'url("http://www.terremark.com/images/temp-four/section-list-arrow.png")');
 		    	$(this).css('background-position', '334px 50%');
 				$(this).css('margin-left', '-30px');
 				$(this).css('padding', '2px 0 1px 30px');
 		    	$(this).css('border-bottom', 'none');
 		    	$(this).css('margin-top', '-1px');
 		    	$(this).css('height', '21px');
 			} else {
 				$(this).css('background-color', '#E2E2E2');
 		    	$(this).css('background-image', 'url("http://www.terremark.com/images/temp-four/section-list-arrow.png")');
 		    	$(this).css('background-position', '334px 50%');
 				$(this).css('margin-left', '-30px');
 				$(this).css('padding', '2px 0 1px 30px');
 		    	$(this).css('border-bottom', 'none');
 		    	$(this).css('margin-top', '-1px');
 		    	$(this).css('height', '21px');	
 			}
 		   		    
 		},
 		function() {
 		     		    
 		    if (thepathname == '/about/leadership-team.aspx' || directory == 0) {
 		    	$(this).css('background-color', 'transparent');
 		   	 	$(this).css('background-image', 'url("http://www.terremark.com/images/temp-four/section-list-arrow.png")');
 		    	$(this).css('background-position', '304px 50%');
 		    	$(this).css('padding', '1px 0 1px 0px');
 		    	$(this).css('border-bottom', 'thin solid #C3C3C3');
 		    	$(this).css('margin-top', '0');
 		    	$(this).css('height', '20px');
 				$(this).css('margin-left', '0');
 			} else {
 				$(this).css('background-color', 'transparent');
 		   	 	$(this).css('background-image', 'url("http://www.terremark.com/images/temp-four/section-list-arrow.png")');
 		    	$(this).css('background-position', '304px 50%');
 		    	$(this).css('padding', '1px 0 1px 0');
 		    	$(this).css('border-bottom', 'thin solid #C3C3C3');
 		    	$(this).css('margin-top', '0');
 		    	$(this).css('height', '20px');
 				$(this).css('margin-left', '0');	
 			}
 		    
 		}
	);



    $('#sub-section-list-light ul li.child').hover(
 		function() {
 			$(this).css('background-color', '#E2E2E2');
 		    $(this).css('background-image', 'url("/images/temp-four/section-list-arrow.png")');
 		    $(this).css('background-position', '334px 50%');
 		    $(this).css('margin-left', '-30px');
 		    $(this).css('padding', '2px 0 1px 53px');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '-1px');
 		    $(this).css('height', '21px');
 		},
 		function() {
 		    $(this).css('background-color', 'transparent');
 		    $(this).css('background-image', 'url("/images/temp-four/section-list-arrow.png")');
 		    $(this).css('background-position', '304px 50%');
 		    $(this).css('margin-left', '0');
 		    $(this).css('padding', '1px 0 1px 23px');
 		    $(this).css('border-bottom', 'thin solid #C3C3C3');
 		    $(this).css('margin-top', '0');
 		    $(this).css('height', '20px');

 		}
	);
       
   
    $("#sub-section-list-light ul li.active").live({
        mouseover: function() {
        if (directory == 0) {
        	$(this).css('background-color', '#E2E2E2');
            $(this).css('background-color', '#E2E2E2');
            $(this).css('background-image', 'url("http://www.terremark.com/images/temp-four/section-list-arrow.png")');
            $(this).css('background-position', '334px 50%');
            $(this).css('margin-left', '-30px');
            $(this).css('padding', '2px 0 1px 50px');
            $(this).css('border-bottom', 'none');
            $(this).css('margin-top', '-1px');
            $(this).css('height', '21px');
         } else if (thepathname == '/about/leadership-team.aspx'){
         	$(this).css('background-color', '#E2E2E2');
            $(this).css('background-color', '#E2E2E2');
            $(this).css('background-image', 'url("http://www.terremark.com/images/temp-four/section-list-arrow.png")');
            $(this).css('background-position', '334px 50%');
            $(this).css('margin-left', '-30px');
            $(this).css('padding', '2px 0 1px 30px');
            $(this).css('border-bottom', 'none');
            $(this).css('margin-top', '-1px');
            $(this).css('height', '21px');
         } else {
         	$(this).css('background-color', '#E2E2E2');
            $(this).css('background-color', '#E2E2E2');
            $(this).css('background-image', 'url("/images/temp-four/section-list-arrow.png")');
            $(this).css('background-position', '334px 50%');
            $(this).css('margin-left', '-30px');
            $(this).css('padding', '2px 0 1px 30px');
            $(this).css('border-bottom', 'none');
            $(this).css('margin-top', '-1px');
            $(this).css('height', '21px');
         }
        },
        mouseout: function() {
        if (directory == 0) {
            $(this).css('background-color', '#FFB431');
            $(this).css('background-image', 'none');
            $(this).css('margin-left', '-30px');
            $(this).css('padding', '2px 0 2px 50px');
            $(this).css('border-bottom', 'none');
            $(this).css('margin-top', '-1px');
            $(this).css('height', '20px');
         } else {
         	$(this).css('background-color', '#FFB431');
            $(this).css('background-image', 'none');
            $(this).css('margin-left', '-30px');
            $(this).css('padding', '2px 0 2px 30px');
            $(this).css('border-bottom', 'none');
            $(this).css('margin-top', '-1px');
            $(this).css('height', '20px');
         }
        }
    });
    
    $("#sub-section-list-light ul li.child.active").live({
        mouseover: function() {
            $(this).css('background-color', '#E2E2E2');
            $(this).css('background-image', 'url("http://www.terremark.com/images/temp-four/section-list-arrow.png")');
            $(this).css('background-position', '334px 50%');
            $(this).css('margin-left', '-30px');
            $(this).css('padding', '2px 0 1px 53px');
            $(this).css('border-bottom', 'none');
            $(this).css('margin-top', '-1px');
            $(this).css('height', '21px');
        },
        mouseout: function() {
            $(this).css('background-color', '#FFB431');
            $(this).css('background-image', 'none');
            $(this).css('margin-left', '-30px');
            $(this).css('padding', '2px 0 2px 53px');
            $(this).css('border-bottom', 'none');
            $(this).css('margin-top', '-1px');
            $(this).css('height', '20px');
        }
    });

    $("#sub-section-list-light ul li.last").live({
        mouseover: function() {
        if (thepathname == '/about/leadership-team.aspx' || directory == 0) {
            $(this).css('background-color', '#E2E2E2');
            $(this).css('background-image', 'url("http://www.terremark.com/images/temp-four/section-list-arrow.png")');
            $(this).css('background-position', '334px 50%');
            $(this).css('margin-left', '-30px');
            $(this).css('padding', '2px 0 1px 50px');
            $(this).css('border-bottom', 'none');
            $(this).css('margin-top', '-1px');
            $(this).css('height', '20px');
         } else {
         	$(this).css('background-color', '#E2E2E2');
            $(this).css('background-image', 'url("/images/temp-four/section-list-arrow.png")');
            $(this).css('background-position', '334px 50%');
            $(this).css('margin-left', '-30px');
            $(this).css('padding', '2px 0 1px 30px');
            $(this).css('border-bottom', 'none');
            $(this).css('margin-top', '-1px');
            $(this).css('height', '20px');
         }
        },
        mouseout: function() {
        if (thepathname == '/about/leadership-team.aspx' || directory == 0) {
            $(this).css('background-color', 'transparent');
            $(this).css('background-image', 'url("http://www.terremark.com/images/temp-four/section-list-arrow.png")');
            $(this).css('background-position', '304px 50%');
            $(this).css('margin-left', '0');
            $(this).css('padding', '1px 0 1px 20px');
            $(this).css('border-bottom', 'none');
            $(this).css('none');
            $(this).css('margin-top', '0');
            $(this).css('height', '20px');
           } else {
            $(this).css('background-color', 'transparent');
            $(this).css('background-image', 'url("/images/temp-four/section-list-arrow.png")');
            $(this).css('background-position', '304px 50%');
            $(this).css('margin-left', '0');
            $(this).css('padding', '1px 0 1px 0');
            $(this).css('border-bottom', 'none');
            $(this).css('none');
            $(this).css('margin-top', '0');
            $(this).css('height', '20px');
            }
        }
    });

    $('#sub-section-list-dark ul li').hover(
 	    function() {
 	        $(this).css('background-color', '#666666');
 	        $(this).css('background-image', 'url("/images/common/arrow-right.png")');
 	        $(this).css('background-position', '342px 50%');
 	        $(this).css('margin-left', '-32px');
 	        $(this).css('padding', '2px 0 1px 32px');
 	        $(this).css('border-bottom', 'none');
 	        $(this).css('margin-top', '-1px');
 	        $(this).css('height', '21px');
 	    },
 		function() {
 		    $(this).css('background-color', 'transparent');
 		    $(this).css('background-image', 'url("/images/common/arrow-right.png")');
 		    $(this).css('background-position', '310px 50%');
 		    $(this).css('margin-left', '0');
 		    $(this).css('padding', '1px 0 1px 0');
 		    $(this).css('border-bottom', 'thin solid #4E4E4E');

 		    $(this).css('margin-top', '0');
 		    $(this).css('height', '20px');
 		}
	);




    $("#sub-section-list-dark ul li.last").live({
        mouseover: function() {
            $(this).css('background-color', '#666666');
            $(this).css('background-image', 'url("/images/common/arrow-right.png")');
            $(this).css('background-position', '342px 50%');
            $(this).css('margin-left', '-32px');
            $(this).css('padding', '2px 0 1px 32px');
            $(this).css('border-bottom', 'none');
            $(this).css('margin-top', '-1px');
            $(this).css('height', '21px');
        },
        mouseout: function() {
            $(this).css('background-color', 'transparent');
            $(this).css('background-image', 'url("/images/common/arrow-right.png")');
            $(this).css('margin-left', '0');
            $(this).css('padding', '1px 0 1px 0');
            $(this).css('border-bottom', 'none');
            $(this).css('none');
            $(this).css('margin-top', '0');
            $(this).css('height', '20px');
        }
    });
    $("#sub-section-list-dark ul li.active").live({
        mouseover: function() {
            $(this).css('background-color', '#666666');
            $(this).css('background-image', 'none');
            $(this).css('margin-left', '-30px');
            $(this).css('padding', '2px 0 1px 30px');
            $(this).css('border-bottom', 'none');
            $(this).css('margin-top', '-1px');
            $(this).css('height', '21px');
        },
        mouseout: function() {

            $(this).css('background-color', '#FFB431');
            $(this).css('background-image', 'none');
            $(this).css('margin-left', '-30px');
            $(this).css('padding', '2px 0 2px 30px');
            $(this).css('border-bottom', 'none');
            $(this).css('margin-top', '-1px');
            $(this).css('height', '20px');
        }
    });

    /////////////// END NEW SUB SECTION LIST /////////////// 		
    $('#contact-links ul li').hover(
 		function() {
 		    $(this).css('background-color', '#E2E2E2');
 		    // $(this).css('background-image','none');
 		    $(this).css('background-position', '30px 49%');
 		    $(this).css('margin-left', '-30px');
 		    $(this).css('padding', '4px 0 0 53px');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '-1px');
 		    $(this).css('height', '26px');


 		},
 		function() {
 		    $(this).css('background-color', 'transparent');
 		    // $(this).css('background-image','none');
 		    $(this).css('background-position', '0 50%');
 		    $(this).css('margin-left', '0');
 		    $(this).css('padding', '4px 0 0 23px');
 		    $(this).css('border-bottom', 'thin solid #C3C3C3');
 		    $(this).css('margin-top', '-1px');
 		    $(this).css('height', '25px');
 		    $(this).children('a:first').css('color', '#000000');

 		}
 	);


    $('#contact-links ul li.call').hover(
 		function() {
 		    $(this).css('background-color', '#E2E2E2');
 		    //$(this).css('background-image','none');
 		    $(this).css('background-position', '30px 50%');
 		    $(this).css('margin-left', '-30px');
 		    $(this).css('padding', '4px 0 0 53px');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '-1px');
 		    $(this).css('height', '25px');



 		},
 		function() {
 		    $(this).css('background-color', 'transparent');
 		    //$(this).css('background-image','none');
 		    $(this).css('background-position', '0 50%');
 		    $(this).css('margin-left', '0');
 		    $(this).css('padding', '4px 0 0 23px');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '-1px');
 		    $(this).css('height', '25px');
 		    $(this).children('a:first').css('color', '#000000');


 		}
 	);


    $('#quick-links ul li.standard').hover(
 		function() {
 		    $(this).css('background-color', '#E2E2E2');
 		    $(this).css('background-position', '334px 50%');
 		    $(this).css('margin-left', '-30px');
 		    $(this).css('padding', '2px 0 1px 30px');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '-1px');
 		    $(this).css('height', '21px');



 		},
 		function() {
 		    $(this).css('background-color', 'transparent');
 		    $(this).css('background-position', '304px 50%');
 		    $(this).css('margin-left', '0');
 		    $(this).css('padding', '1px 0 1px 0');
 		    $(this).css('border-bottom', 'thin solid #C3C3C3');
 		    $(this).css('margin-top', '0');
 		    $(this).css('height', '20px');
 		    $(this).children('a:first').css('color', '#000000');


 		}
 	);


    $('#quick-links ul li.quick-links-pdf').hover(
 		function() {
 		    $(this).css('background-color', '#E2E2E2');
 		    $(this).css('background-position', '316px 6px');
 		    $(this).css('margin-left', '-30px');
 		    $(this).css('padding', '2px 0 1px 30px');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '-1px');
 		    $(this).css('height', '21px');



 		},
 		function() {
 		    $(this).css('background-color', 'transparent');
 		    $(this).css('background-position', '286px 5px');
 		    $(this).css('margin-left', '0');
 		    $(this).css('padding', '1px 0 1px 0');
 		    $(this).css('border-bottom', 'thin solid #C3C3C3');
 		    $(this).css('margin-top', '0');
 		    $(this).css('height', '20px');
 		    $(this).children('a:first').css('color', '#000000');


 		}
 	);


    $('#quick-links ul li.quick-links-pdf-last').hover(
 		function() {
 		    $(this).css('background-color', '#E2E2E2');
 		    $(this).css('background-position', '316px 6px');
 		    $(this).css('margin-left', '-30px');
 		    $(this).css('padding', '2px 0 1px 30px');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '-1px');
 		    $(this).css('height', '21px');



 		},
 		function() {
 		    $(this).css('background-color', 'transparent');
 		    $(this).css('background-position', '286px 5px');
 		    $(this).css('margin-left', '0');
 		    $(this).css('padding', '1px 0 1px 0');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '0');
 		    $(this).css('height', '20px');
 		    $(this).children('a:first').css('color', '#000000');


 		}
 	);


    $('#quick-links.federal ul li.standard').hover(
 		function() {
 		    $(this).css('background-color', '#666666');
 		    $(this).css('background-position', '334px 50%');
 		    $(this).css('margin-left', '-30px');
 		    $(this).css('padding', '2px 0 1px 30px');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '-1px');
 		    $(this).css('height', '21px');



 		},
 		function() {
 		    $(this).css('background-color', 'transparent');
 		    $(this).css('background-position', '304px 50%');
 		    $(this).css('margin-left', '0');
 		    $(this).css('padding', '1px 0 1px 0');
 		    $(this).css('border-bottom', 'thin solid #757575');
 		    $(this).css('margin-top', '0');
 		    $(this).css('height', '20px');
 		    $(this).children('a:first').css('color', '#FFFFFF');


 		}
 	);


    $('#quick-links.federal ul li.quick-links-pdf').hover(
 		function() {
 		    $(this).css('background-color', '#666666');
 		    $(this).css('background-position', '316px 6px');
 		    $(this).css('margin-left', '-30px');
 		    $(this).css('padding', '2px 0 1px 30px');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '-1px');
 		    $(this).css('height', '21px');



 		},
 		function() {
 		    $(this).css('background-color', 'transparent');
 		    $(this).css('background-position', '286px 5px');
 		    $(this).css('margin-left', '0');
 		    $(this).css('padding', '1px 0 1px 0');
 		    $(this).css('border-bottom', 'thin solid #757575');
 		    $(this).css('margin-top', '0');
 		    $(this).css('height', '20px');
 		    $(this).children('a:first').css('color', '#FFFFFF');


 		}
 	);


    $('#quick-links.federal ul li.quick-links-pdf-last').hover(
 		function() {
 		    $(this).css('background-color', '#666666');
 		    $(this).css('background-position', '316px 7px');
 		    $(this).css('margin-left', '-30px');
 		    $(this).css('padding', '2px 0 1px 30px');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '-1px');
 		    $(this).css('height', '21px');



 		},
 		function() {
 		    $(this).css('background-color', 'transparent');
 		    $(this).css('background-position', '286px 6px');
 		    $(this).css('margin-left', '0');
 		    $(this).css('padding', '1px 0 1px 0');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '0');
 		    $(this).css('height', '21px');
 		    $(this).children('a:first').css('color', '#FFFFFF');


 		}
 	);


    $('#quick-links.temp2 ul li.standard').hover(
 		function() {
 		    $(this).css('background-color', '#666666');
 		    $(this).css('background-position', '334px 50%');
 		    $(this).css('margin-left', '-30px');
 		    $(this).css('padding', '2px 0 1px 30px');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '-1px');
 		    $(this).css('height', '21px');



 		},
 		function() {
 		    $(this).css('background-color', 'transparent');
 		    $(this).css('background-position', '304px 50%');
 		    $(this).css('margin-left', '0');
 		    $(this).css('padding', '1px 0 1px 0');
 		    $(this).css('border-bottom', 'thin solid #757575');
 		    $(this).css('margin-top', '0');
 		    $(this).css('height', '20px');
 		    $(this).children('a:first').css('color', '#FFFFFF');


 		}
 	);


    $('#quick-links.temp2 ul li.quick-links-pdf').hover(
 		function() {
 		    $(this).css('background-color', '#666666');
 		    $(this).css('background-position', '316px 6px');
 		    $(this).css('margin-left', '-30px');
 		    $(this).css('padding', '2px 0 1px 30px');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '-1px');
 		    $(this).css('height', '21px');



 		},
 		function() {
 		    $(this).css('background-color', 'transparent');
 		    $(this).css('background-position', '286px 5px');
 		    $(this).css('margin-left', '0');
 		    $(this).css('padding', '1px 0 1px 0');
 		    $(this).css('border-bottom', 'thin solid #757575');
 		    $(this).css('margin-top', '0');
 		    $(this).css('height', '20px');
 		    $(this).children('a:first').css('color', '#FFFFFF');


 		}
 	);


    $('#quick-links.temp2 ul li.quick-links-pdf-last').hover(
 		function() {
 		    $(this).css('background-color', '#666666');
 		    $(this).css('background-position', '316px 7px');
 		    $(this).css('margin-left', '-30px');
 		    $(this).css('padding', '2px 0 1px 30px');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '-1px');
 		    $(this).css('height', '21px');



 		},
 		function() {
 		    $(this).css('background-color', 'transparent');
 		    $(this).css('background-position', '286px 6px');
 		    $(this).css('margin-left', '0');
 		    $(this).css('padding', '1px 0 1px 0');
 		    $(this).css('border-bottom', 'none');
 		    $(this).css('margin-top', '0');
 		    $(this).css('height', '21px');
 		    $(this).children('a:first').css('color', '#FFFFFF');


 		}



	);


$('.mini-nav-item').hover(
 	    function() {
 	        $(this).css('background-color', '#ffb431');
 	    },
 		function() {
 		    $(this).css('background-color', '#77B4D1');

 		}
	);
$('#mn-two').hover(
 	    function() {
 	        $(this).css('background-image', 'url(/images/common/mininav_contact_bg2.png)');
 	    },
 		function() {
 		    $(this).css('background-image', 'url(/images/common/mininav_contact_bg.png)');

 		}
	);




$('.sparkbox-custom').sbCustomSelect();

});


$.extend($.expr[':'],{
containsExact: function(a,i,m){
return $.trim(a.innerHTML.toLowerCase()) === m[3].toLowerCase();
},
containsExactCase: function(a,i,m){
return $.trim(a.innerHTML) === m[3];
},
containsRegex: function(a,i,m){
 var regreg =  /^\/((?:\\\/|[^\/])+)\/([mig]{0,3})$/,
  reg = regreg.exec(m[3]);
 return RegExp(reg[1], reg[2]).test($.trim(a.innerHTML));
}
});

function onAfter(curr, next, opts) {
    var index = opts.currSlide;
    $('#prev')[index == 0 ? 'show' : 'show']();
    $('#next')[index == opts.slideCount - 1 ? 'show' : 'show']();
} 


