var $j=jQuery.noConflict();
var message = "Please be advised that you are leaving First State Bank's website. This link is provided as a courtesy. First State 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;
			}
		});
	} //END warn
	
// new page for INMO
	$j('a.newPage').attr('target', '_blank'); 

	
// bigTarget
	$j(".featured a").bigTarget({
		clickZone : '.featured'
	});
	
	$j("#comingSoon a").bigTarget({
		clickZone : '#comingSoon'
	});

	$j("#productCategory li a").bigTarget({
		clickZone : '#productCategory li'
	});

// home page featured hover
	$j("#homeFeatured .featured, #comingSoon")
	.css({'background-color': '#FBFBFB'})
	.mouseover(function(){
		$j(this).stop().animate( { backgroundColor: '#E5F4FF' }, 'fast')
		$j('h2',this).stop().animate( { color: '#003F79' }, 'fast')
		$j('.learnMore',this).stop().animate( { color: '#003F79' }, 'fast')
		$j('.learnMore',this).stop().animate( { paddingRight: '13px' }, 'fast')
	})
	.mouseout(function(){
		$j(this).stop().animate( { backgroundColor: '#FBFBFB' }, 'slow')
		$j('h2',this).stop().animate( { color: '#1F92DD' }, 'slow')
		$j('.learnMore',this).stop().animate( { color: '#1F92DD' }, 'slow')
		$j('.learnMore',this).stop().animate( { paddingRight: '10px' }, 'fast')
	});	
	
	
// category page product hover
	$j("#productCategory li.categoryListItem")
	.css({'background-color': '#FFF'})
	.mouseover(function(){
		$j(this).stop().animate( { backgroundColor: '#E5F4FF' }, 'fast')
		$j("h3 a, h4 a",this).stop().animate( { color: '#003F79' }, 'fast')
	})
	.mouseout(function(){
		$j(this).stop().animate( { backgroundColor: '#FFF' }, 'slow')
		$j("h3 a",this).stop().animate( { color: '#2093DD' }, 'fast')
		$j("h4 a",this).stop().animate( { color: '#FFF' }, 'fast')
	});	

// contact us submit button
$j(function() {
    $j("input.submitButtonPages")
        .mouseover(function() { 
            $j(this).attr("src", "/custom/firstclassbanking/image/btn-submit-ro.png");
        })
        .mouseout(function() {
            $j(this).attr("src", "/custom/firstclassbanking/image/btn-submit.png");
        })
})



// toggle product details
  
/*  $j('.showDetails')
  .click(function(){
		$j(this).closest("li").animate({height : "45em"}, function(){
			$j(this).closest("li").css('height','100%');
		});
		$j(this).closest("li").addClass("selected")
		$j(this).hide()
		$j(this).next().show();
	})
  
  $j('.hideDetails')
  .click(function(){
		$j(this).closest("li").animate({height:"10.5em"}, {duration:500})
		$j(this).closest("li").removeClass("selected")
		$j(this).hide()
		$j(this).prev().show();
	})*/
  

  
}); // END doc ready