$(document).ready(function(){
	$(".rounded").each(function(){
		$(this).css("-moz-border-radius-bottomleft","4px");
		$(this).css("-moz-border-radius-bottomright","4px");
		$(this).css("-moz-border-radius-topleft","4px");
		$(this).css("-moz-border-radius-topright","4px");
	});
});
function mailchimp_subscribe (form,site_url,link_id){
	var req = $.post
	( 
		site_url, 
		jQuery('#' + form).serialize(), 
		function(html){
			var kt = html.split('|:|');
			if(kt[0]=='Success') {
				jQuery('#' + form).addClass('success');
				jQuery('#' + form).html(kt[1]);
			}
			else if (kt[0]=='Error') {
				jQuery('#' + link_id).addClass('error');
				jQuery('#' + link_id).html(kt[1]);
			}
			else {
				alert(html);
			}
			req = null;
		}
	);
}

function doIframe(){
	o = document.getElementsByTagName('iframe');
	for(i=0;i<o.length;i++){
		if (/\bautoHeight\b/.test(o[i].className)){
			setHeight(o[i]);
			addEvent(o[i],'load', doIframe);
		}
	}
}

function setHeight(e){
	if(e.contentDocument){
		e.height = e.contentDocument.body.offsetHeight + 35;
	} else {
		e.height = e.contentWindow.document.body.scrollHeight;
	}
}

function addEvent(obj, evType, fn){
	if(obj.addEventListener)
	{
	obj.addEventListener(evType, fn,false);
	return true;
	} else if (obj.attachEvent){
	var r = obj.attachEvent("on"+evType, fn);
	return r;
	} else {
	return false;
	}
}

if (document.getElementById && document.createTextNode){
	$(document).ready(doIframe);	
}