/*
 * Image preview script 
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by Alen Grakalic (http://cssglobe.com)
 * 
 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
 *
 */
 
this.imagePreview = function(){	
	/* CONFIG */
		
		xOffset = 10;
		yOffset = 30;
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		var q = $("a.preview").queue("fx");
	/* END CONFIG */
	$("a.preview").mouseover(function(e){
		if (q.length == 0)
		{
			$(this).children("img").animate({
					width:62,
					height:40},200,queue = false);
		}
    });	
	$("a.preview").mouseout(function(e){
		$("a.preview").children("img").animate({
			width:39,
			height:25},200,queue = false);
	});
};


// starting the script on page load
$(document).ready(function(){
		xOffset = 10;
		yOffset = 30;
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		var q = $("a.preview").queue("fx");
	/* END CONFIG */
	$("a.preview").mouseover(function(e){
		if (q.length == 0)
		{
			$(this).children("img").animate({
					width:62,
					height:40},200,queue = false);
		}
    });	
	$("a.preview").mouseout(function(e){
		$("a.preview").children("img").animate({
			width:39,
			height:25},200,queue = false);
	});
});
