$(document).ready(function() {
	
	$('ul#nav').superfish({ 
		delay:       700,
		animation:   {opacity:'show'}, 
		speed:       'fast',
		autoArrows:  false,
		dropShadows: false
	}); 
	
	if ($("#packages-small")) {
		$("#packages-small .package-small").each(function() {
			$(this).css('cursor','pointer');
			$(this).click(function() {
				window.location.href = $(this).find("a").attr('href');
			})
		});
	}
	$("h2 span").corner("tl 15px").corner("tr 15px");
	$("#tryout h3").corner("15px");
	$(".list").corner("10px");
	$(".buy a").corner("10px");
	$("a.orange-button").corner("10px");
	
	if ($('.right-text').length) {
		if ($('.right-text').html().length < 10) {
			$('.right-text').height($('#main-text').height()+"px");
		}
	}
	if ($('input[name=h_kotisivut]').length) {
		if($('input[name=h_kotisivut]').val() == 1) {
			$('input:[name=kotisivut]').attr('checked', true);
		}
		if($('input[name=h_verkkokauppa]').val() == 1) {
			$('input:[name=verkkokauppa]').attr('checked', true);
		}
		if($('input[name=h_suoramainos]').val() == 1) {
			$('input:[name=suoramainos]').attr('checked', true);
		}
		if($('input[name=h_verkkolehti]').val() == 1) {
			$('input:[name=verkkolehti]').attr('checked', true);
		}
		if($('input[name=h_asiakaskysely]').val() == 1) {
			$('input:[name=asiakaskysely]').attr('checked', true);
		}
	}
	
	
});
