$(function() {

$('ul.sf-menu').superfish({ 
        delay:       1000,                            // one second delay on mouseout 
        animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
        speed:       'fast',                          // faster animation speed 
        autoArrows:  false,                           // disable generation of arrow mark-up 
        dropShadows: false                            // disable drop shadows 
}); 


$(".resize").fontScaler({
	target: '.resize',
	containerclass: 'fontScaler',
	store:true,
	fx: 'smooth',
	fxspeed: 100,
	fixed: {
		size1: '92',
		size2: '100',
		size3: '116',
title1: 'small',
title2: 'normal',
title3: 'large'
	}
});	

    $('#slides').before('<div id="pager">').cycle({
    fx:     'fade', 
    speed:  'slow', 
    timeout: 6000,
    pauseOnPagerHover: 1, // true to pause when hovering over pager link 
	pager:  '#pager' 
    });


   $("#USlink a").hover(function () {
        $("#US p").fadeIn("fast");; 
        $("#US").css("background-color", "#77a279"); 
   }, function() {
        $("#US p").fadeOut("fast");; 
        $("#US").css("background-color", "#77b63d");
    });


$("a[href^='http']").not("[href*='hillsdaleinv.com']").click(function(){
	window.open(this.href);
	return false;
});

$("a[href*=.pdf]").click(function(){
	window.open(this.href);
	return false;
});

$("a[href$='.pdf'], a[href$='.doc']").addClass("doc");
$("a[href^='http']").not("[href*='hillsdaleinv.com']").addClass("link")







        $('a[href*=#]').click(function() {
          if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target
            || $('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
              var targetOffset = $target.offset().top;
              $('html,body')
              .animate({scrollTop: targetOffset}, 1000);
             return false;
            }
          }
        });



				

});






