/*
 * 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
		
	/* END CONFIG */
	$("a.preview").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("body").append("<p id='preview'><img src='"+ this.href +"' alt='Image preview' />"+ c +"</p>");								 
		$("#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 -200) + "px")
			.css("left",(e.pageX + yOffset -300) + "px");
	});			
};
/*
function loadthis(a)
{
	$('#menu a').removeClass('selected');
	$(a).addClass('selected');
	$("body").css("cursor", "progress");
	if(a.href.indexOf('?')!=-1)window.location.hash=a.href.substr(a.href.indexOf('?')+1);
	$('#column2').load(a.href+'&ajax', function()
		{
			$('#column2').fadeOut(150);
			$("body").css("cursor", "auto");
			$('#column2').fadeIn();
			//setTimeout($('#column2').fadeIn(),500);
		});
	return false;
}

// starting the script on page load
$(document).ready(function(){
	imagePreview();		
	//by xadi

	//inicjalizacja dzialania menu ajaxowego
	$('#menu a').each(function(i,a)
		{
		if (a.href.indexOf('index.php')!=-1)
		$(a).click(function(){return loadthis(this);});
		//jesli jest hash, to wczytajmy ten plik 
		}
	);
	$('#column2').delay(150).load('index.php?'+window.location.hash.substr(1)+'&ajax');
	//by xadi end.
});
*/

						   
if(0)$(document).ready(function(){
	$('#column1>#menu:eq(1)').parent().append('<div style="display:relative;"><div id="curr" >•</div></div>');

var i=0;
if(0)setInterval(function(){
var ile='rotate(-'+ i++ +'deg)';
$('#curr').attr('style',
'width:5px;border:1px solid black;'
+'-moz-transform: '+ile
+';'+'-o-transform: '+ile
+';'+'-webkit-transform: '+ile
+';'+'filter: progid:DXImageTransform.Microsoft.BasicImage(rotation='+i*0.011+')'
+'; display:block;');},100);
});