        function survtipShow() {
	var thisspan = $(this).find('.popimage'); 
	 var hoverText = $(thisspan).html();
         var offset = $(this).offset();
         vertSpot = offset.top + $(this).height() + 6;
                horizSpot = offset.left + ($(this).width() / 2) - 75;
          if (hoverText){
                $("div.survtip").css("top", vertSpot);
                $("div.survtip").css("left", horizSpot);
                
        	     
          $("div.survtip").html(hoverText);
          
          $("div.survtip").slideDown("fast");
          }
	}
        
        function survtipHide() {

	  $("div.survtip").hide();
	}
        
var survconfig = {    
     sensitivity: 1, // number = sensitivity threshold (must be 1 or higher)    
     interval: 200, // number = milliseconds for onMouseOver polling interval    
     over: survtipShow,
     timeout: 0, // number = milliseconds delay before onMouseOut    
     out: survtipHide
};

function zipShow() {
$("div#ziphs").html('<a href="#" onclick="zipHide();return false;">Less <img src="arrowblueup.gif" width="10" height="5" alt="Less" /></a>');
	  $("div#zipmore").slideDown("fast");
	}
        function zipHide() {
$("div#ziphs").html('<a href="#" onclick="zipShow();return false;">More <img src="arrowbluedown.gif" width="10" height="5" alt="More" /></a>');
	  $("div#zipmore").hide();
	}
	
	        function tagShow() {
$("div#taghs").html('<a href="#" onclick="tagHide();return false;">Less <img src="arrowblueup.gif" width="10" height="5" alt="Less" /></a>');
	  $("div#tagmore").slideDown("fast");
	}
        function tagHide() {
$("div#taghs").html('<a href="#" onclick="tagShow();return false;">More <img src="arrowbluedown.gif" width="10" height="5" alt="More" /></a>');
	  $("div#tagmore").hide();
	}
	
	function ultagShow() {
$("div#ultaghs").html('<a href="#" onclick="ultagHide();return false;">Less <img src="arrowblueup.gif" width="10" height="5" alt="Less" /></a>');
	  $("div#ultagmore").slideDown("fast");
	}
        function ultagHide() {
$("div#ultaghs").html('<a href="#" onclick="ultagShow();return false;">More <img src="arrowbluedown.gif" width="10" height="5" alt="More" /></a>');
	  $("div#ultagmore").hide();
	}
        
        function equalHeight(group) {
    tallest = 0;
    group.each(function() {
        thisHeight = $(this).height();
        if(thisHeight > tallest) {
            tallest = thisHeight;
        }
    });
    group.height(tallest);
}


$(document).ready(function(){

$("a#scgdir").fancybox({
		'hideOnContentClick': false,
		'width': 300,
		'height': 250
	});

$('#page a:not(.fullbox, .iframe)').filter(function() {
    return this.hostname && this.hostname !== location.hostname;
    }).click(function (){
window.open(this.href);
return false;
});


	$("body").prepend('<div class="survtip"></div>');
       $("#survey>form>ul>li").hoverIntent(survconfig);
       $(".percentbar").progressBar();
        equalHeight($(".featsect"));
        
$(".rdiscl").hover(function () {
         $(".rdisc").slideDown('fast');
        }, function () {
         $(".rdisc").hide('fast');
        });

        $('.toplinks').cycle({ 
    fx:    'fade', 
    pause:  1,
    delay:  1000 
});
        
$("#disclaimer").click(function (){
$("#disc").slideToggle();
return false;
});            

});
