document.observe("dom:loaded", function() {
  $$('ul.hshop li.parent').each(function(e,i){
		e.observe('over',function(event){
			e.next('ul.child').show();
		});
		e.observe('out',function(event){
                        e.next('ul.child').hide();
                });
	});
});

// kipling geolocation
//
function haveGeoCookie() {
    if (document.cookie.indexOf('geo=') == -1) {
        return false;
    }
    return true;
}

function doGeolocation(targetUrl)
{
    if (!haveGeoCookie()) {
         new Ajax.Request(targetUrl, {
                method:'get',
                onComplete: function(transport){
                    var data = transport.responseText.evalJSON();
                    if (data.redirect) {
                        $('geolocation_layer').update(data.message);
                    }
                }
            });
    }
}

function closeGeolocation(){
	$('geochange').hide();
}


//customer account edit -> new password check
function checkNewPassword()
{
	if ($('password').value != '') {
		$('change_password').value = 1;
	}
}

