<!--

//mouseover preview viewer
this.screenshotPreview = function(){	
	/* CONFIG */

		xOffset = 0;
		yOffset = 8;
		$("body").append("<div id='screenshot'></div>");
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
		var newxOffset;
		var newyOffset;
		var isHover = false;

	/* END CONFIG */
	$(".flickr-thumb").hover(function(e){
		isHover = true;
		$(this).css('cursor','pointer');
		//$("#screenshot").stop();
		$("#screenshot").empty();
		
		this.t = jQuery(this).find("a").find("img").attr("title");
		jQuery(this).find("a").find("img").removeAttr('title');
		this.title = "";
		var thisBG = $(this).css('backgroundImage').replace(/^url|[\(\)]/g, '');
		//alert($(this).css('backgroundImage'));
		var c = (this.t != "") ? "<br/>"+ this.t : "";
		$("#screenshot").append("<img src='"+ thisBG +"' alt='url preview' />");
		
		var xPos = e.pageX + xOffset;
		var preWidth = $("#screenshot").innerWidth();
		var totalWidth = xPos + preWidth;
		/*newxOffset = xOffset;
		if (e.pageX > ($(document).width()/2)){
			//xPos = e.pageX - xOffset - preWidth;
			newxOffset = 0 - preWidth - xOffset;
		}*/
		
		var textWidth = preWidth - 15;
		$("#screenshot").append("<div style='width:"+textWidth+"px;'>"+c+"</div>");
		
		/*var yPos = e.pageY + yOffset;
		var preHeight = $("#screenshot").outerHeight();
		var totalHeight = yPos + preHeight;
		newyOffset = yOffset;
		if (totalHeight > ($(document).height())){
			newyOffset = 0 - preHeight - yOffset;
		}*/
		
		newxOffset = e.pageX - (e.pageX/($(document).width()))*($("#screenshot").innerWidth());
		newyOffset = yOffset;
		var preHeight = $("#screenshot").outerHeight();
		if (preHeight > e.pageY) {
			var newYpos = e.pageY - newyOffset + 20;
		}else{
			var newYpos = e.pageY - newyOffset - preHeight;
		}
		$("#screenshot")
			.css("top",newYpos + "px")
			.css("left", newxOffset + "px")
			.fadeIn("fast");
		
    },
	function(){
		isHover = false;
		jQuery(this).find("a").find("img").attr('title',this.t)
		//this.title = this.t;
		setTimeout(
			function(){
				if (!isHover){
					$("#screenshot").fadeOut("fast");
				}
			},250
		);
    });	
	$(".flickr-thumb a").mousemove(function(e){
		$(this).css('cursor','pointer');
		var newxOffset = e.pageX - (e.pageX/($(document).width()))*($("#screenshot").innerWidth());
		var preHeight = $("#screenshot").outerHeight();
		if (preHeight > e.pageY) {
			var newYpos = e.pageY - newyOffset + 20;
		}else{
			var newYpos = e.pageY - newyOffset - preHeight;
		}
		
		$("#screenshot")
			.css("top",newYpos + "px")
			.css("left", newxOffset + "px");
	});			
};


	$(document).ready(function() {	
		
		//enable mouseover preview viewer
		screenshotPreview();
		
		//currently not using this
		showComments  = function(){
			//alert("test")
			$("#comment_area").slideToggle("fast");
		}
		
		//fade for icon link images
		$(".icon").hover(
			function(e){
				$(this).fadeTo("fast",1);
			},
			function(e){
				$(this).fadeTo("fast",0.1);
			}
		);
		
		$("a#feature_info_link").click(function() {
			$("#feature_info").toggle('slow');
			$('#feature_info_link').toggleClass("floatinglink_on");
		});
		
		//animates sliding image viewer
		$("#slideshow").mousemove(function(e){ 
			var imgbarwidth = $("#slideshow div span").width();
			var winwidth = $("#slideshow").width();
			var movepos = (-1)*(e.pageX/winwidth)*(imgbarwidth-winwidth);
			//var moveto = "-"+movepos+"px";
			$('#slideshow div').animate({left: movepos}, { queue:false, duration:2000});
		});
		
		//slide in bottem menu
		//$('.footer-one').animate({bottom: 0}, 500);
		
		//this is for any functions specific to the post being shown
		postFunctions();
	});
//-->
