jQuery.noConflict();jQuery(document).ready(function($){

	//Remove right border from last nav li
	$('ul#navlist li:last').css("border-right","0");

	//Make the page peel effect work
	$("#pageflip").hover(function() { //On hover...
		$("#pageflip img , .msg_block").stop()
			.animate({ //Animate and expand the image and the msg_block (Width + height)
				width: '307px',
				height: '319px'
			}, 500);
		} , function() {
		$("#pageflip img").stop() //On hover out, go back to original size 50x52
			.animate({
				width: '50px',
				height: '52px'
			}, 220);
		$(".msg_block").stop() //On hover out, go back to original size 50x50
			.animate({
				width: '50px',
				height: '50px'
			}, 200); //Note this one retracts a bit faster (to prevent glitching in IE)
	});
	//Rollover effect for home page panels
	$('.panel img').mouseover(
      function () {
        $(this).stop().fadeTo("fast", 0.01);
      }).mouseout(
      function () {
        $(this).stop().fadeTo("fast", 1.);
      }
    );
	
	//Pictures page turn thumbs into links
	$('#pics img').each( //Run this function for each image
		function( intIndex ) {
		var thumbsrc = $(this).attr("src");
		var srclength = thumbsrc.length -12;
		var fullsrc = thumbsrc.substr(0,srclength) + ".jpg";

		$(this).wrap('<a href="' + fullsrc + '" rel="lightbox"></a>');
								 
	}); //Close each function

	// Remove border from last sb-box
	$('.sb-box:last').css("border-bottom","0");



}); // end doc ready