function _preview()
 {
     global $asg_sources;
     $data = wp_parse_args(stripslashes_deep($_REQUEST['data']));
     foreach (array_keys($asg_sources) as $key) {
         $data['asg']['sources'][$key]['link'] = 'no-link';
     }
     $id = $data['post_ID'];
     $gallery = new ASG_Gallery($id, $data['asg']);
     $gallery->render(true);
     exit;
 }
function awesome_gallery($id, $attributes = array())
{
    $gallery = new ASG_Gallery($id, $attributes);
    $gallery->ping();
    $gallery->render();
}