(function($){
	
	$.confirm2 = function(title, msg, url){

		var markup = [
			'<div id="confirmOverlay">',
			'<div id="confirmBox">',
			'<h3>'+title+'</h3>',
			'<p>'+msg,
			'<div id="confirmButtons"><a id="button_ok" class="orange awesome">törlés</a> <a id="button_cancel" class="awesome">mégse</a></div>',
      '</div></div>'
		].join('');
		
		$(markup).hide().appendTo('body').fadeIn();
		//$(markup).appendTo('body');
		toppos = $('#confirmBox').css('top');
		$('#confirmBox').css('top', 0);
		$('#confirmBox').animate({top: toppos},"fast");

	}
					
	$.confirm2.hide = function(){
		$('#confirmOverlay').fadeOut(function(){
			$(this).remove();
		});
	}
	
	$('#button_cancel').live('click', function(){
		$('#confirmOverlay').fadeOut(function(){
			$(this).remove();
			return false;
		});
	});
	
	$('#button_ok').live('click', function(){
			window.location=url;
			return false;
	});
})(jQuery);


var IE = /*@cc_on!@*/false;
var IE6 = (IE && (navigator['appVersion'].indexOf('MSIE 6') > 0)) ? true : false;

var site = function() {

	$(document).ready(function() {

// Confirm box

	$('.confirmthis').click(function(){
    url = $(this).attr("href");
    var title = 'Figyelem!';
    var msg = $(this).attr("title");
    
		$.confirm2(title, msg, url);
    return false;
	});

// Galéria
$("a[rel^='galeria']").prettyPhoto({overlay_gallery: false, show_title: false});

// Táblázatok rendezése
$("table.sortable").tablesorter();

// Tooltip (Pl. fotóknál)
//$('.tt').betterTooltip();

// Klikkelhető táblázatsorok
$("tbody.klikk tr").click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
});

		site.initialize();
	});

return {

		// IE fixes
		IEfix: function() {
			if (IE) {
				setTimeout(function() {
				}, 10);
			}
			return false;
		},

		initialize: function() {

			var a = null;
			var obj = null;
			var tmp = null;

		} // /init

	}
	// /return


}();
// /site

