$(document).ready(function(){

checkHub();
	//set the height
	var maxHeight = 400;
	var minHeight = 32;
	
	$('img.resize')
		//mouseOver effect
		.click(function(){
			if($(this).attr("class") == "resize"){
				$(this).stop().animate({
					height: (maxHeight) +'px'
				},1);
				$(this).addClass("on");
				$(this).attr("src",$(this).attr("id"));
			} else {
				$(this).stop().animate({
					height: (minHeight) +'px'
				},1);
				$(this).removeClass("on");
			} 
		});
});
function goTranslate(el){
if (checkHub()){
return;
};
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
 
for(var i = 0; i < hashes.length; i++)
{
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
 if(Boolean(vars['u'])){
var u=vars['u'];
} else {
var u=document.location.href;
};
if(el[el.selectedIndex]['value'] == "sk" || el[el.selectedIndex]['value'] == "sk"){
	var tURL= u;
} else {
	var tURL= "http://translate.google.com/translate_c?hl=en" + el[el.selectedIndex]['value'] + "&u="+u+"";
}
if(parent.window){
parent.window.location.href = tURL;
} else {
window.location.href = tURL;
}
//return vars;
}
function checkHub(){
var el = document.getElementById("lang_select");
if (el[el.selectedIndex]['value'] == "hub"){
	mh();
	return true;
}
return false;
}
function mh(){
$('body').addClass("hub");
}
