var fbinit=false;
function fblikebutton(url,lang){
document.write('<fb:like layout="button_count" show_faces="false" width="100" action="like" font="verdana" colorscheme="light" height="25" locale="'+lang+'" href="'+url+'"></fb:like>');
if(!fbinit){
var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://connect.facebook.net/en_US/all.js#xfbml=1';
s1.parentNode.insertBefore(s, s1);
fbinit=true;
}
}

$(document).ready(function(){
//Swap Image on Hover
	$("ul.thumb li a").hover(function() {		
		var mainImage = $(this).attr("href"); //Find Image Name
		$("#main_view img").attr({ src: mainImage });
		return false;		
	});
$(function() {
$('.gallery-box').each(function(){
$('#'+$(this).attr('id')+' a').lightBox();
});
$('.newsimg').each(function(){
$('#'+$(this).attr('id')+' a').lightBox();
});
$('a.lightbox').lightBox();
});

});


/* collection hover fade stuff */
$(document).ready(function(){
	$(".thumb img").fadeTo("slow", 1); // This sets the opacity of the thumbs to fade down to 60% when the page loads

	$(".thumb img").hover(function(){
			$(this).fadeTo("slow", 0.8); // This should set the opacity to 100% on hover
	},function(){
			$(this).fadeTo("slow", 1); // This should set the opacity back to 60% on mouseout
	});
	
	
});

$(function(){
$('.thumb img').hover(
		function(){
			$('#main_view img').fadeOut(100, function(){
				$('#main_view img').fadeIn(300);						 
			});
		},
		function(){
			$('#main_view img').fadeOut(100, function(){
				$('#main_view img').fadeIn(300);						 
			});
		}
		);

});

/* end collection */
