YAHOO.namespace('hhk');
YAHOO.namespace('hhk.basics');


YAHOO.hhk.Tooltips = (function() {
 
    function attach() {
	//console.log($('.tooltip'));
	// Tooltips hinzufügen
	$('.tooltip').tooltip({
	    track: true,
	    delay: 0,
	    showURL: false,
	    fade: 0
	});
	
    }

    YAHOO.util.Event.onDOMReady(attach);
    return {
	reAttach: attach
    };
})();


YAHOO.hhk.basics.Controller = (function() {
    function show(contentContainerId) {
	try {
	    var content = $('#' + contentContainerId).html();
	    var str = '<div><a class="close" href="javascript:void(0);"></a>' + content + '</div>';
	    
	    var dialogElement = $(str).dialog({
		    width: 660,
		    modal: true,
		    open: function(event, ui) {
			Cufon.replace('.basics-wrap h2', { fontFamily: 'Avenir-book' });
			Cufon.replace('.basics-wrap h3', { fontFamily: 'Avenir-book' });
			Cufon.now();

			$('.close').click(function() {
			    $(dialogElement).dialog('destroy');
			});

			$('.ui-widget-overlay').click(function() {
			    $(dialogElement).dialog('destroy');
			});

			$('.ui-widget-overlay').css('height', $(document).height() + 'px');
		    }
	    });
			
	}
	catch(e) {} 	

	return false;
    }
    
    return {
	show: show
    };
})();





