function OpenGM() {
	window.open('http://www.graphicmail.nl/RWCode/subscribe.asp?SiteID=4015&Mode=subscribe','','top=-175,left=135,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=450,height=230');
}

$(document).ready(function() {
  $("#main>li>ul").each(function() {
    var width = this.offsetWidth;
    $(this).find('li').each(function() {
      $(this).css('width', (width -4));
    });
    $(this).find('ul').each(function() {
      $(this).css('left', (width -3 ));
    });
  });

    $(".toggle").hover(function() {
        var id=$(this).attr("id")  ;
        animate(id);
    }, function() {
        var id=$(this).attr("id")  ;
        animateback(id);
    });

  if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
    $(".menu li").click(function(){
      // we just need to attach a click event listener to provoke iPhone/iPod/iPad's hover event
    });
  }
});


function animate(id){
  $("#"+id).animate({backgroundColor: '#ff9901', color: '#fff', height: 300,width:125}, 500);
  $("#"+id).children(".inner").removeClass("hidden");
}
function animateback(id) {
  $("#"+id).animate({backgroundColor: '#fff', color: '#004E61', height: 100, width:125}, 500);
  $("#"+id).children(".inner").addClass("hidden");
}

