/* nivoSlider */ 
	var $j = jQuery.noConflict();
	
	Cufon.replace('h1,h2,h3,h4, .jqueryslidemenu ul li a',  {
		 hover: true

});
	


$j(function(){
			$j('#loopedslider').loopedSlider({
				autoHeight: true,
				addPagination: true,
				autoStart: 5000,
				slidespeed: 300,
				fadespeed: 500,
				containerClick: false
				
			});
		});
			
			
	//remove last border	
	   $j(document).ready(function() {
	  $j('.menu li:last').addClass("lastlink");
	   $j('.footer-links li:last').addClass("lastlink");
	   $j('.homepage-columns li:odd').addClass("home-alternatebox");
		$j('.homepage-columns li:last').addClass("no-margin");
		
		
 	
});


	   
// If the HTML document is ready to be manipulated
$j(document).ready(function(){
	// Add the hover handler to the link
	$j("ul.social-icons li a").hover(
		function(){
			$j(this).find("img").animate({top : '-6px'}, 200);
		},
		function(){ 
			$j(this).find("img").animate({top : '0px'}, 200);
		}
	);
});

$j("input.focus:last").focus();

$j(document).ready(function(){
	$j("a[rel^='prettyPhoto']").each(function() {	
		var $jimage = $j(this).contents("img");
			$jhoverclass = 'hover_video';

	if($j(this).attr('href').match(/(jpg|gif|jpeg|png|tif)/)) 
	$jhoverclass = 'hover_image';
		
	if ($jimage.length > 0)
	{	
		var $jhoverbg = $j("<span class='"+$jhoverclass+"'></span>").appendTo($j(this));
		
			$j(this).bind('mouseenter', function(){
			$jheight = $jimage.height();
			$jwidth = $jimage.width();
			$jpos =  $jimage.position();		
			$jhoverbg.css({height:$jheight, width:$jwidth, top:$jpos.top, left:$jpos.left});
		});
	}

});	

$j("a[rel^='prettyPhoto']").contents("img").hover(function() {
		$j(this).stop().animate({"opacity": "0.2"}, 400);
		},function() {
		$j(this).stop().animate({"opacity": "1"},400);
	});
});


