var bussy=false;
var bdebug=false;
jQuery.fn.exists = function(){return jQuery(this).length>0;}
$(document).ready(function () 
{
$('#hh1').hide();
var cssObj = {
    'background-color' : 'transparent',
    'padding' : 0,
	'margin' : 0
    };
var selector='.parmumsbilde2';
var elements = $('img.parmumsbilde');
elements.each(function() 
{ 
var w=this.width;
var h=this.height;
$(this).wrap("<div class=\"parmumsbilde2\" style=\"width: " + w + "px; height:" + h + "px\"></div>");
$(this).css(cssObj);
}
);
if ($(selector).exists()) 
{
$(selector).corner();
}

start_io(1);
});
$(window).resize(function()
{
start_io(0);  
});
function log(obj) 
{
if (!bdebug) return;
	try{
	console.log(obj);
	}
	catch (e) 
	{
		bdebug=false;
	}	
}
function start_io(all)
{
if (bussy) return;
bussy=true;
var height;
height=Math.max($('#content').height(),$('#left').height(),$('#extra').height(),$(window).height()-$('#footer').height()-12);
$('#content').height(height);
bussy=false;
}
function write(t)
{
//$("#ppp").append(t+'<br/>');
}
