var $j=jQuery.noConflict();
var message = "Please be advised that you are leaving Premier Valley Bank's website. This link is provided as a courtesy.  Premier Valley Bank does not endorse or control the content of third party websites.";

$j(document).ready(function(){
	// jQuery replacement for warn
	if( $j('a.warn').length > 0 ){
		$j('a.warn').click( function(){
			alert( message );
		});
	}
	if( $j('a.confirm').length > 0 ){
		$j('a.confirm').click( function( event ){
			event = new Event(event);
			if( confirm(message) ) {
				return true;
			} else {
				event.stop();
				return false;
			}
		});
	}
	// toggle FAQ
	  $j('div#faqs> div').hide();
	  $j('div#faqs> div:first').css({'display' : 'block'});
	  $j('div#faqs> h2').click(function() {
	 var $nextDiv = $j(this).next();
	 var $visibleSiblings = $nextDiv.siblings('div:visible');
	 if ($visibleSiblings.length ) {
	   $visibleSiblings.slideUp('fast', function() {
	  $nextDiv.slideToggle('fast');
	   });
	 } else {
	    $nextDiv.slideToggle('fast');
	 }
	  });
	var IE6 = (navigator.userAgent.indexOf("MSIE 6")>=0) ? true : false;
	if(!IE6){
		jQuery(document).ready(function(){
			$j("#printShare li").hover(
				function(){
					$j(this).find("span").attr({"style": 'display:block'});
					$j(this).find("span").animate({opacity: 1}, {queue:false, duration:400});
				},
				function(){
					$j(this).find("span").animate({opacity: 0}, {queue:false, duration:400}, "linear",
					function(){
						$j(this).find("span").attr({"style": 'display:none'});
					}
				);
			});
		});
	}
});
