/**
* on DOM ready
*/
if (typeof pseudoArr == 'undefined')
	var pseudoArr = new Array();

project = {};
	
project.pseudoReady = function(){

	for (var i in pseudoArr){
		if (typeof pseudoArr[i] == 'function'){
			pseudoArr[i]();
		}
	}
	
	var ans_popup = null, ans_popup_bg = null;
	
	try {
		$('.class-answer').click(function(e){
			if (!ans_popup){
				ans_popup = $('<div/>').addClass('answer-popup');
				ans_popup_bg = $('<div/>').addClass('bg-answer-popup');
				ans_popup_bg.appendTo(document.body);
				ans_popup.appendTo(document.body);
				ans_popup_bg.click(function(){ans_popup.css('display', 'none'); $(this).css('display', 'none')});
			}
			var pos = $(this).offset();
			ans_popup.html(typeof this.getAttribute('alt') != 'undefined' && this.getAttribute('alt') != '' && this.getAttribute('alt')? this.getAttribute('alt') : this.getAttribute('title')).css('display', 'block').css('left', pos.left + 'px').css('top', pos.top - 30 + 'px');
			ans_popup_bg.css('display', 'block');
			e.preventDefault();
			e.stopPropagation();
		}).each(function(){
			$(this).css('text-decoration', 'none').css('color', '#C42632');
		});
	} catch(e) {
		console.log(e);
	}
	
	// checking for input hash
	if (document.location.hash){
		//parseHash();	
	}
}
