var OHModules = function(){};

OHModules.languages = (function(NameSpace)
{	
	function showLanguages(id){
		jQuery(document.getElementById(id)).show();
	};
	
	function hideLanguages(id){
		jQuery(document.getElementById(id)).hide();
	};
	

	
	return {
		showLanguages:showLanguages,
		hideLanguages:hideLanguages
	}	
})(OHModules);

OHModules.utils = (function(NameSpace)
{
	function vIE(){
		return (navigator.appName=='Microsoft Internet Explorer')?parseFloat((new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})")).exec(navigator.userAgent)[1]):-1;
	};
	return {
		vIE:vIE
	}	
})(OHModules);

var modules = OHModules;

var boxTimeout;
var currentInfoBox='';

function showInfoBox(parent,box){
if(currentInfoBox != '')
jQuery('#'+currentInfoBox).hide();

currentInfoBox = box;
var offset = jQuery('#'+parent).offset();
boxTimeout = setTimeout('hideInfoBox()',1500);


jQuery('#'+box)
.css({top:offset.top,left:offset.left-40})
.bind('mouseover',function(){ clearTimeout(boxTimeout);})
.bind('mouseleave',function(){boxTimeout = setTimeout('hideInfoBox()',1500);})
.fadeIn(500);

};
function hideInfoBox(box){
if(box) currentInfoBox = box;
jQuery('#'+currentInfoBox).unbind('mouseover').unbind('mouseleave').fadeOut(500);
currentInfoBox = '';
};

function toggleBoxContent(mode,box,container){
     if((jQuery('#'+container).css('display') == 'none' || mode ==
'show') && mode != 'hide'){

jQuery('#'+container).show();
         
jQuery('#'+box+'-image').attr('src','http://www.oh-barcelona.com/'+jQuery('#blog_lang').val()+'/blog/wp-content/images/less.png');
     }else{

jQuery('#'+container).hide();
         
jQuery('#'+box+'-image').attr('src','http://www.oh-barcelona.com/'+jQuery('#blog_lang').val()+'/blog/wp-content/images/plus.png'); 

     }
}







