$(document).ready(function() {
	$("#editBar a, a.editFrme").fancybox({
		'autoDimensions': false,
		'width': 990,
		'height': 750,
		'padding': 3,
		'transitionIn':	'elastic',
		'speedIn': 400,
		'speedOut': 0,
		'overlayShow': true
		});
	$("a.version").fancybox({
		'autoDimensions': false,
		'width': 700,
		'height': 700,
		'padding': 3,
		'transitionIn':	'elastic',
		'speedIn': 400,
		'speedOut': 0,
		'overlayShow': true
		});
	$("a.group").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	500, 
		'speedOut'		:	300, 
		'overlayShow'	:	false
		});
});

this.imagePreview = function(){	
		xOffset = 5;
		yOffset = 15;

	$("a.preview").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("body").append("<div id='preview'><img src='"+ $(this).attr('hover') +"' /></div>");								 
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$("#preview").remove();
    });	
	$("a.preview").mousemove(function(e){
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};


$(document).ready(function(){
	imagePreview();
});


$(window).load(function() {
	$('#slider').nivoSlider({
		animSpeed:500,pauseTime:5000
		});
	});
