if (!extension_loaded('gd') || !function_exists('gd_info')) {
        $errors[] = 'This plugin requires GD support';
    }
    if (!empty($errors)) {
        deactivate_plugins(basename(__FILE__));
        wp_die(implode('<br />', $errors) . '<br /><br />Please contact with your hosting provider', 'Plugin Activation Error', array('response' => 200, 'back_link' => true));
    }
    add_option(GAP_TYPE_OPTION_NAME, GAP_TYPE_LOOP_PREVIEW);
    add_option(GAP_MOBILE_OPTION_NAME, 1);
    add_option(GAP_EFFECT_OPTION_NAME, 1);
    add_option(GAP_HOVER_OPTION_NAME, 1);
    add_option(GAP_HOVER_METADATA_NAME, 0);
    add_option(GAP_THUMBNAIL_OPTION_NAME, 1);
    return true;
}
function gap_del_options()
{
    delete_option(GAP_TYPE_OPTION_NAME);
    delete_option(GAP_MOBILE_OPTION_NAME);
    delete_option(GAP_EFFECT_OPTION_NAME);
    delete_option(GAP_HOVER_OPTION_NAME);
    delete_option(GAP_METADATA_OPTION_NAME);
    delete_option(GAP_THUMBNAIL_OPTION_NAME);
}
if (is_admin()) {
    require_once dirname(__FILE__) . '/settings.class.php';
    GAP_Settings_Page::load();
} else {
    require_once dirname(__FILE__) . '/gap.class.php';
    GIF_Animation_Preview::load();
}
 public static function load()
 {
     $class = __CLASS__;
     return self::$plugin ? self::$plugin : (self::$plugin = new $class());
 }