if (typeof site_path  == "undefined") { var site_path = '';	} 

function isNumber(n){ return !isNaN(parseFloat(n)) && isFinite(n);	}
	
var stack_bottomright = {"dir1": "up", "dir2": "left", "firstpos1": 15, "firstpos2": 15};

function show_message(msg, type){
	if (typeof msg == "undefined") { var msg = ''; } 
	if (typeof type == "undefined") { var type = 'notice'; } 
	
	if (type!='notice' && type!='error') {
		type = 'notice';
	}
		
	if (msg){
		var opts = {
			//pnotify_title: "Title here",
			pnotify_text: msg,
			pnotify_type: type,
			pnotify_delay: 5000,
			pnotify_width: "330px",
			pnotify_history: false,
			pnotify_addclass: "stack-bottomright",
			pnotify_stack: stack_bottomright
		};
		$.pnotify(opts);
	}

}

function activate_colorbox(){
	$(".lightbox").colorbox({});
}

$(document).ready(function(){

	$(".lightbox").colorbox({});
	$(".iframe").colorbox({iframe:true, width:900, height:550});
	
	$('.tip').tipsy({gravity:'s', html: true, live: true});
	$('.tip_s').tipsy({gravity:'s', html: true, live: true});
	$('.tip_w').tipsy({gravity:'w', html: true, live: true});
	$('.tip_e').tipsy({gravity:'e', html: true, live: true});
	$('.tip_n').tipsy({gravity:'n', html: true, live: true});
	$('.tip_auto').tipsy({gravity: $.fn.tipsy.autoNS, html: true, live: true});

	//$('div.message_box').prepend('<a href="#" class="remove_message">Διαγραφή</a>');
	$('div.message_box a.remove_message').hide();
	
	$("div.message_box").mouseenter(function(){
		$("a.remove_message",this).show();
	}).mouseleave(function(){
		$("a.remove_message",this).hide();
	});

	$("div.message_box a.remove_message").live('click', function(){
		$(this).parents('div.message_box').hide();
		return false;
	});
	
	setTimeout(function(){ $('.highlight_timer').removeClass('highlight_timer'); }, 9000);

});
