function cmp_load_actions(url){
    jQuery(document).ready(function(){
        var cmp_container = jQuery('#cmp_container');
        var mask = jQuery("#cmp_mask");
        var content = jQuery('#cmp_box');
        var winWidth = jQuery(window).width();
        var winHeight = jQuery(window).height();
        var docHeight = jQuery(document).height();
       //load stylesheet
       var link = jQuery("<link>");
       link.attr({
           type: 'text/css',
           rel: 'stylesheet',
           href: 'wp-content/plugins/ng_custom_modal/css/modal.css'
       });
       //add to head
       jQuery("head").append(link);
       cmp_container.css({'display':'block'});
       //show everything       
       mask.css({'width': winWidth, 'height': docHeight, 'opacity': .8});
       content.css({'width' : winWidth/2, 'left' : winWidth/4});
       var top = winHeight/2-content.height()/2
       if (top < winHeight){
           content.css({'top' : winHeight/2-content.height()/2});
       }else{
           content.css({'top' : top/2});
       }
       //add close action
       jQuery("#cmp_mask, #cmp_close").click(function(e){
           e.preventDefault();
           cmp_container.css('display','none');
           window.open(url);
       });


    });
}

