function __construct()
        {
            global $wpdb;
            $action = '';
            if (isset($_REQUEST['action'])) {
                $action = $_REQUEST['action'];
            }
            if (($action == 'delete' || $action == 'duplicate') && isset($_REQUEST['id'])) {
                check_admin_referer('new_royalslider_magage_sliders');
                $sb = admin_url('admin.php?page=new_royalslider');
                $id = (int) $_REQUEST['id'];
                if ($action == 'delete') {
                    $this->delete_slider($id);
                    $sb = add_query_arg(array('action' => 'deleted', 'id' => $id), $sb);
                } else {
                    if ($action == 'duplicate') {
                        $sb = add_query_arg(array('action' => 'duplicated', 'id' => $id, 'duplicateid' => $this->duplicate_slider($id)), $sb);
                    }
                }
                echo '<script type="text/javascript">window.location.href="' . $sb . '"</script>';
                //wp_redirect($sb);
                exit;
            }
            ?>
        <div class="wrap">
            <h2 class="manage-page-title">
                <?php 
            _e('Royal&thinsp;Slider\'s', 'new_royalslider');
            ?>
                <a class="add-new-h2 new-royalslider-add-manage" href="#"><?php 
            _e('Add New', 'new_royalslider');
            ?>
</a>
                <a class="new-royalslider-embed in-page-action" href="#"><?php 
            _e('How to embed RoyalSlider to site', 'new_royalslider');
            ?>
</a>
            </h2>
<?php 
            $action = '';
            if (isset($_REQUEST['action'])) {
                $action = $_REQUEST['action'];
            }
            if ($action == 'deleted' || $action == 'duplicated') {
                ?>
<div id="message" class="updated"><p>
<?php 
                $sname = 'RoyalSlider ' . (isset($_REQUEST['id']) ? '#' . $_REQUEST['id'] : '') . ' ';
                if ($action == 'duplicated') {
                    echo $sname . __('successfully duplicated.', 'new_royalslider') . (isset($_REQUEST['duplicateid']) ? __(' New slider with id #', 'new_royalslider') . $_REQUEST['duplicateid'] : '');
                } else {
                    if ($action == 'deleted') {
                        echo $sname . __('permanently deleted.', 'new_royalslider');
                    }
                }
                ?>
</p></div>
<?php 
            }
            ?>
    <script>
    jQuery(document).ready(function($) {

        var ie_lt9 = /MSIE [1-8]\b/.test(navigator.userAgent);
        if ( ie_lt9 ) {
          alert('Warning! To work correctly RoyalSlider admin requires modern browser, IE9+, Chrome, Safari or Firefox.'); 
        }

        $('#new-royalslider-manage-table').on('click', '.new-rs-delete', function(e) {
            e.preventDefault();
            if(confirm("<?php 
            _e('This action will PERMANENTLY DELETE slider. Continue?', 'new_royalslider');
            ?>
")){
                window.location = $(e.target).attr('data-href');
            } else {
                return false;
            }
            
        });




        $('.new-royalslider-embed').click(function(e) {
            e.preventDefault();

            var dialog = $('#embed-info').dialog({
                modal: true,
                title: "",
                zIndex: 80,
                width: 500,
                resizable: false,
                height: 'auto',
                beforeClose: function() {

                },
                open: function() { 
                    $(".ui-widget-overlay").unbind('click.rst').bind('click.rst', function () {
                         dialog.dialog( "close" );
                    });
                }

            })

        });

        $('.new-royalslider-add-manage').click(function(e) {
            e.preventDefault();

            var dialog = $('.create-popup').dialog({
                modal: true,
                title: "<?php 
            _e('Choose the type of slider to create', 'new_royalslider');
            ?>
",
                zIndex: 80,
                width: 494,
                height: 484,
                resizable: false,
                beforeClose: function() {

                },
                open: function() { 
                    $(".ui-widget-overlay").unbind('click.rst').bind('click.rst', function () {
                         dialog.dialog( "close" );
                    });
                }

            })

        });
        $('.rs-help-el').qtip({
            overwrite: false,
            content: {
                attr: 'data-help'
            },
            position: {
                at: 'top center', 
                my: 'bottom center'
            },
            style: {
                classes: 'ui-tooltip-rounded ui-tooltip-shadow ui-tooltip-tipsy rs-tooltip'
            }
        });

        $('#new-royalslider-manage-table').on('click', '.active-indicator', function(e) {
            var closestRow = $(e.target).closest('tr');
            closestRow.toggleClass('disabled');

            var isActive = !closestRow.hasClass('disabled');
            var currId = closestRow.data('id');
               // 'toggleActiveNonce' => wp_create_nonce( 'new_royalslider_toggle_active_ajax_nonce' )

            $.ajax({
                url: newRsVars.ajaxurl,
                type: 'post',
                data: {
                    action : 'toggleActiveClass',
                    id : currId,
                    isActive: isActive ? 1 : 0,
                    _ajax_nonce : newRsVars.toggleActiveNonce
                }
            });

        });
    });
    </script>
    <?php 
            if (current_user_can('manage_options')) {
                $version = NewRoyalSliderMain::get_update_version();
                if ($version) {
                    ?>
            <div class="updated" style="max-width: 685px;"><p>
            <?php 
                    _e('New version of RoyalSlider is available.', 'new_royalslider');
                    echo sprintf(__(' %sSee whats new in %s and how to upgrade%s', 'new_royalslider'), '<a href="http://dimsemenov.com/plugins/royal-slider/wp-update/?v=' . $version . '" target="_blank">', $version, '</a>');
                    ?>
            </p></div>
            <?php 
                }
            }
            ?>
    <table id="new-royalslider-manage-table" class='royalsliders-table  wp-list-table widefat fixed'>
        <thead>
            <tr>
                <th width='4%'><?php 
            _e('ID', 'new_royalslider');
            ?>
</th>
                <th width='40%'><?php 
            _e('Title', 'new_royalslider');
            ?>
</th>
                <th width='10%'><?php 
            _e('Type', 'new_royalslider');
            ?>
</th>    
                <th width='20%'><?php 
            _e('Shortcode', 'new_royalslider');
            ?>
</th>    
                <th width='11%'><?php 
            _e('Active', 'new_royalslider');
            ?>
<i class="help-ico rs-help-el" data-help="<?php 
            _e('Always mark sliders that you don\'t use as inactive. It\'ll  prevent including unwanted JS and CSS files of skins and templates.', 'new_royalslider');
            ?>
"></i></th>   
            </tr>
        </thead>
        <tbody>
            <?php 
            $nextgen_slider_index = -1;
            $prefix = $wpdb->prefix;
            $sliders = $wpdb->get_results("SELECT * FROM " . $prefix . "new_royalsliders ORDER BY id");
            if (count($sliders) == 0) {
                ?>
                    <tr class="no-items"><td class="colspanchange" colspan="5" style="padding: 30px;"><?php 
                echo sprintf(__("You don't have any slideshows. %sCreate first%s to get started.", "new_royalslider"), '<a class="new-royalslider-add-manage" href="#">', "</a>");
                ?>
</td></tr>
                    <?php 
            } else {
                $slider_display_name;
                $count = 0;
                foreach ($sliders as $slider) {
                    ++$count;
                    $slider_display_name = $slider->name;
                    if (!$slider_display_name) {
                        $slider_display_name = __('Untitled slider #', 'new_royalslider') . $slider->id;
                    }
                    if ($nextgen_slider_index === -1 && $slider->type === 'nextgen') {
                        $nextgen_slider_index = $slider->id;
                    }
                    $type = '&rstype=' . $slider->type;
                    $edit_url = admin_url('admin.php?page=new_royalslider&action=edit&id=' . $slider->id . $type);
                    $duplicate_url = wp_nonce_url(admin_url('admin.php?page=new_royalslider&action=duplicate&id=' . $slider->id), 'new_royalslider_magage_sliders');
                    $delete_url = wp_nonce_url(admin_url('admin.php?page=new_royalslider&action=delete&id=' . $slider->id), 'new_royalslider_magage_sliders');
                    ?>
                        <tr class="<?php 
                    echo $slider->active ? '' : ' disabled ';
                    echo $count % 2 ? ' alternate ' : '';
                    ?>
" data-id="<?php 
                    echo $slider->id;
                    ?>
">
                            <td><?php 
                    echo $slider->id;
                    ?>
</td>
                            
                            <td>
                                <strong><a class="row-title" href="<?php 
                    echo $edit_url;
                    ?>
"><?php 
                    echo $slider_display_name;
                    ?>
</a></strong>
                                <div class="row-actions">
                                    <span class="edit"><a href="<?php 
                    echo $edit_url;
                    ?>
"><?php 
                    _e('Edit', 'new_royalslider');
                    ?>
</a> | </span>
                                    <span class="view"><a href="<?php 
                    echo $duplicate_url;
                    ?>
"><?php 
                    _e('Duplicate', 'new_royalslider');
                    ?>
</a> | </span>    
                                    <span class="trash"><a class="new-rs-delete submitdelete" data-href="<?php 
                    echo $delete_url;
                    ?>
" href="#"><?php 
                    _e('Delete', 'new_royalslider');
                    ?>
</a></span> 
                                </div>
                            </td>
                            <td><span class="rs-type-label"><?php 
                    echo $slider->type;
                    ?>
</span></td>
                            <td>
                                <input type="text" value="<?php 
                    if ($slider->type == 'gallery') {
                        echo esc_attr('[gallery royalslider="' . $slider->id . '"]');
                    } else {
                        if ($slider->type == 'nextgen') {
                            echo esc_attr('');
                        } else {
                            echo esc_attr('[new_royalslider id="' . $slider->id . '"]');
                        }
                    }
                    ?>
">
                            </td>
                            <td  class="active-indicator"><div ><span></span></div></td>
                        </tr>
                        <?php 
                }
                // slides
            }
            // if exist
            ?>
        </tbody>         
    </table>
    <?php 
            echo NewRoyalSliderMain::get_embed_help_block(123);
            ?>
    <p style="max-width: 700px;">         
        <a class='button-primary new-royalslider-add-manage' href='#'><?php 
            _e('Create New Slider', 'new_royalslider');
            ?>
</a>
        <span style="float: right; margin-top: 5px;"><?php 
            _e('Having issues? Need a feature? Visit <a href="http://dimsemenov.com/private/forum.php" target="_blank">RoyalSlider support desk</a>.', 'new_royalslider');
            ?>
</span>

        <div class="create-popup">
            <a class="create-custom"  href='<?php 
            echo admin_url("admin.php?page=new_royalslider&action=add&rstype=custom");
            ?>
'>
                <h4><span class='in-page-action'><?php 
            _e('Custom slider', 'new_royalslider');
            ?>
</span></h4>
                <p><?php 
            _e('For slideshows where each slide has different structure.', 'new_royalslider');
            ?>
</p>
            </a>
            <a class="create-from-posts"  href='<?php 
            echo admin_url("admin.php?page=new_royalslider&action=add&rstype=posts");
            ?>
'>
                <h4><span class='in-page-action'><?php 
            _e('Posts slider', 'new_royalslider');
            ?>
</span></h4>
                <p><?php 
            _e('For slideshows that grab data from contents of posts.', 'new_royalslider');
            ?>
</p>
            </a>
            <a class="replace-default" href='<?php 
            echo admin_url("admin.php?page=new_royalslider&action=add&rstype=gallery");
            ?>
'>
                <h4><span class='in-page-action'><?php 
            _e('Default WordPress [gallery]', 'new_royalslider');
            ?>
</span></h4>
                <p><?php 
            _e('For image galleries that will be added inside post.', 'new_royalslider');
            ?>
</p>
            </a>

             <a class="create-from-500px"  href='<?php 
            echo admin_url("admin.php?page=new_royalslider&action=add&rstype=instagram");
            ?>
'>
                <h4><span class='in-page-action'><?php 
            _e('Instagram gallery', 'new_royalslider');
            ?>
</span></h4>
                <p><?php 
            _e('For image galleries that will grab data from Instagram.', 'new_royalslider');
            ?>
</p>
            </a>

            <a class="create-from-500px"  href='<?php 
            echo admin_url("admin.php?page=new_royalslider&action=add&rstype=500px");
            ?>
'>
                <h4><span class='in-page-action'><?php 
            _e('500px gallery', 'new_royalslider');
            ?>
</span></h4>
                <p><?php 
            _e('For image galleries that will grab data from 500px.com', 'new_royalslider');
            ?>
</p>
            </a>
            <a class="create-from-500px"  href='<?php 
            echo admin_url("admin.php?page=new_royalslider&action=add&rstype=flickr");
            ?>
'>
                <h4><span class='in-page-action'><?php 
            _e('Flickr gallery', 'new_royalslider');
            ?>
</span></h4>
                <p><?php 
            _e('For image galleries that will grab data from Flickr photoset.', 'new_royalslider');
            ?>
</p>
            </a>

            


            

            <a class="replace-default" href='<?php 
            $keyword = '';
            if ($nextgen_slider_index !== -1) {
                $keyword = __('Edit ', 'new_royalslider');
                echo admin_url('admin.php?page=new_royalslider&action=edit&id=' . $nextgen_slider_index . '&rstype=nextgen');
            } else {
                echo admin_url("admin.php?page=new_royalslider&action=add&rstype=nextgen");
            }
            ?>
'>
                <h4><span class='in-page-action'><?php 
            echo $keyword . ' ' . __('NextGEN config', 'new_royalslider');
            ?>
</span></h4>
                <p><?php 
            _e('Override default NextGEN gallery with RoyalSlider.', 'new_royalslider');
            ?>
</p>
            </a>



        </div>
    </p> 
        </div>

            <?php 
        }
        function build_view()
        {
            ?>

<div id="new-royalslider-edit-page" class="wrap">
    <h2 id="edit-slider-text"><span>

    <?php 
            if ($this->slider_type != 'nextgen') {
                ?>
        <?php 
                if (!$this->is_add_new) {
                    if ($this->slider_id) {
                        echo sprintf(__('Editing %s RoyalSlider #', 'new_royalslider'), ucfirst($this->slider_type));
                        echo '<span>';
                        echo $this->slider_id;
                        echo '</span>';
                    }
                    ?>
        <?php 
                } else {
                    ?>
                <?php 
                    echo sprintf(__('New %s RoyalSlider', 'new_royalslider'), ucfirst($this->slider_type));
                    ?>
        <?php 
                }
                ?>
    <?php 
            } else {
                ?>
        <?php 
                _e('NextGEN template configuration', 'new_royalslider');
                if ($this->slider_id) {
                    echo ' #<span>';
                    echo $this->slider_id;
                    echo '</span>';
                }
                ?>
    <?php 
            }
            ?>
       </span>
       <a href="#" class="add-new-h2 rs-embed-to-site <?php 
            echo $this->slider_id ? '' : 'rs-hidden';
            ?>
"><?php 
            _e('Embed this slider to site', 'new_royalslider');
            ?>
</a>
       <a href="admin.php?page=new_royalslider" class="add-new-h2"><?php 
            _e('Back to list', 'new_royalslider');
            ?>
</a>
       
    </h2>
    <?php 
            echo NewRoyalSliderMain::get_embed_help_block($this->slider_id ? $this->slider_id : 123);
            ?>
    <div id="poststuff" class="metabox-holder has-right-sidebar">

        <div id="side-info-column" class="options-sidebar">
            <div id="slider-actions" class="postbox action actions-holder"> 
                <?php 
            if ($this->slider_type != 'gallery' && $this->slider_type != 'nextgen') {
                ?>
                            
                    <a class="alignleft button-secondary button80" id="preview-slider" href="#"><?php 
                _e('Preview slider', 'new_royalslider');
                ?>
</a>
                <?php 
            }
            ?>

                    <div id="save-progress" class="waiting ajax-saved" >
                        <?php 
            _e('Saved!', 'new_royalslider');
            ?>
                    </div>
                    <a class="alignright button-primary button80" id="save-slider" data-slider-id="<?php 
            echo $this->slider_id;
            ?>
" data-create="<?php 
            echo $this->slider_id ? 'false' : 'true';
            ?>
" data href="#"><?php 
            if ($this->slider_id) {
                _e('Save slider', 'new_royalslider');
            } else {
                _e('Create slider', 'new_royalslider');
            }
            ?>
</a>   
                <br class="clear">              
            </div>
                        
            <div id="new-royalslider-options">
                <div class="postbox open">    
                    <div class="handlediv" title="Toggle view"></div>           
                    <h3 class="hndle"><?php 
            _e('General options', 'new_royalslider');
            ?>
</h3> 
                    <div class="inside slider-opts-group">
                                             <div class="rs-opt">
                                                <div data-help="<?php 
            _e('Template resets all slider settings to create specific type of slideshow. After you set it you may (optionally) modify other options to fit your requirements.<br/><br/> Please note that most templates (except first one) add additional CSS file and change slide HTML markup, so some options might requre minor CSS modifications.', 'new_royalslider');
            ?>
" class="rs-template-title rs-help-el"><span id="rs-template-title-text"><?php 
            _e('Templates', 'new_royalslider');
            ?>
</span><i class="help-ico"></i></div>
                                                <div id="template-select" class="templates-grid">
                                                    <?php 
            require_once 'NewRoyalSliderOptions.php';
            $newrs_templates = NewRoyalSliderOptions::getRsTemplates();
            $value = isset($this->res['template']) ? $this->res['template'] : 'default';
            $template_obj = $newrs_templates[$value];
            $template_html = isset($template_obj['template-html']) ? $template_obj['template-html'] : $newrs_templates['default']['template-html'];
            $col = 0;
            $row = 0;
            foreach ($newrs_templates as $key => $args) {
                $label = $args['label'];
                //$label
                echo sprintf('<div class="rs-template"><input id="%s" type="radio" name="template" value="%s" %s><label style="background-position: %s ;" for="%s">%s</label></div>', $key, $key, checked($value, $key, false), '-' . $col * 89 . 'px -' . ($row * 65 + 100) . 'px', $key, '');
                $col++;
                if ($col > 1) {
                    $col = 0;
                    $row++;
                }
            }
            ?>
                                                </div>
                                            </div>
                                            <hr>
                                            <div class="rs-opt">
                                                <div data-help="<?php 
            _e('Skin is a set of CSS styled UI controls.', 'new_royalslider');
            ?>
" class="rs-template-title rs-skin-title rs-help-el"><?php 
            _e('Skin', 'new_royalslider');
            ?>
<i class="help-ico"></i></div>
                                                <select id="skin-select">
                                                    <?php 
            require_once 'NewRoyalSliderOptions.php';
            $newrs_skins = NewRoyalSliderOptions::getRsSkins();
            $value = isset($this->res['skin']) ? $this->res['skin'] : 'rsUni';
            foreach ($newrs_skins as $key => $args) {
                $label = $args['label'];
                echo sprintf('<option value="%s"%s>%s</option>', $key, selected($value, $key, false), $label);
            }
            ?>
                                                </select>
                                                <a href="http://help.dimsemenov.com/kb/wordpress-royalslider-advanced/wp-adding-custom-skin-without-modifying-core-of-slider" target="_blank" style="color: #888; display:block; margin-top: 5px;"><?php 
            _e('how to add custom skin');
            ?>
</a>
                                            </div>
                                            <hr>
                                            <a id="edit-slide-markup" class="in-page-action" href="#"><?php 
            _e('Edit slide markup', 'new_royalslider');
            ?>
</a>

                    </div>
                </div>
                <div class="other-options">
                     <?php 
            $this->get_slider_options();
            ?>
                </div>
            </div>        
        </div>

       
        <div class="sortable-slides-body">                              
            <div class="sortable-slides-container">
                <div id="titlediv">
                    <div id="titlewrap">           
                        <input type="text" name="title" size="40" maxlength="255" placeholder="<?php 
            _e('Slider name', 'new_royalslider');
            ?>
" id="title" value="<?php 
            echo isset($this->res) ? $this->res['name'] : '';
            ?>
" />
                    </div>
                </div>
                <div id="template-editor" style="display:none;">
                    <textarea style="width: 80%; height: 200px;"><?php 
            echo isset($this->res['template_html']) ? esc_html($this->res['template_html']) : esc_html($template_html);
            ?>
</textarea>
                </div>
                <input id="admin-slider-type" type="hidden" value="<?php 
            echo isset($_REQUEST['rstype']) ? $_REQUEST['rstype'] : '';
            ?>
" />
                <?php 
            if ($this->slider_type == 'custom') {
                ?>
                    <div class="rs-add-slides-wrap">
                        <a class="button" id="create-new-slide" href="#"><?php 
                _e('Create New Slide', 'new_royalslider');
                ?>
</a> or 
                        <a class="button" id="add-images" href="#"><?php 
                _e('Add Images', 'new_royalslider');
                ?>
</a>
                    </div>

                    <div id="rs-be" style="display:none;" class="with-animation-options">
                        <div id="rs-be-buttons">
                            <button class="button button-primary rs-be-add-html-block"><?php 
                _e('Add HTML block', 'new_royalslider');
                ?>
</button>or
                            <button class="button rs-be-add-image-block"><?php 
                _e('Add image', 'new_royalslider');
                ?>
</button>
                        </div>

                        <div class="rs-ab-props">
                            <label for="block-classes-select" class="rs-help-el" data-align="top" data-help="<?php 
                _e('CSS class that is applied to selected block.', 'new_royalslider');
                ?>
"><?php 
                _e('Block CSS class:', 'new_royalslider');
                ?>
</label>
                            <select id="block-classes-select">
                                <option value=''><?php 
                _e('No class', 'new_royalslider');
                ?>
</option>
                            <?php 
                $anim_block_classes = array('abBlackBox', 'abWhiteBox', 'abTextAlignCenter');
                //$anim_block_classes = array('testClass1', 'testClass2');
                $saved_items = get_option("new_royalslider_anim_block_classes");
                if (is_array($saved_items)) {
                    $anim_block_classes = array_merge($anim_block_classes, $saved_items);
                }
                $anim_block_classes = apply_filters('new_royalslider_animated_block_classes', $anim_block_classes);
                foreach ($anim_block_classes as $key => $value) {
                    ?>
                                    <option value='<?php 
                    echo $value;
                    ?>
'><?php 
                    echo $value;
                    ?>
</option>
                                    <?php 
                }
                ?>
                                <option value='rs_add_user_class'><?php 
                _e('>> Add new class <<', 'new_royalslider');
                ?>
</option>
                                <option value='rs_remove_user_class'><?php 
                _e('>> Remove class <<', 'new_royalslider');
                ?>
</option>
                            </select>
                            <label for="rs-a-b-animEnabled" class=" animation-cb">
                                <input id="rs-a-b-animEnabled" type="checkbox" value="true" checked="checked" />
                                <?php 
                _e('Use block animation', 'new_royalslider');
                ?>
                            </label>
                            <i class="help-ico rs-help-el"  class="rs-help-el" data-align="top" data-help="<?php 
                echo esc_attr(__('Leave animation fields empty to use default settings that are defined in right sidebar options.<br/>Please don\'t overuse animation. Use it wisely and only when it
                            \'s really required.', 'new_royalslider'));
                ?>
"></i>
                        </div>
                        <div class="clear"></div>
                        <div class="rs-be-blocks-list"></div>
                        <div class="rs-anim-blocks-inputs">
                            
                            <div class="rs-be-editorarea"><textarea></textarea></div>
                            <div class="size-fields">
                                <div>
                                    <label for="rs-a-b-width" class="rs-help-el" data-help="<?php 
                echo esc_attr(__('Width in pixels, percents or auto.<br/> e.g. \'123px\', \'50%\' or \'auto\'. ', 'new_royalslider'));
                ?>
"><?php 
                _e('Width', 'new_royalslider');
                ?>
</label>
                                    <input id="rs-a-b-width" value="" />
                                </div>
                                <div>
                                    <label for="rs-a-b-height" class="rs-help-el" data-help="<?php 
                echo esc_attr(__('Height in pixels, percents or auto.<br/> e.g. \'123px\', \'50%\' or \'auto\'. ', 'new_royalslider'));
                ?>
"><?php 
                _e('Height', 'new_royalslider');
                ?>
</label>
                                    <input id="rs-a-b-height" value="" />
                                </div>

                                <div>
                                    <label for="rs-a-b-left" class="rs-help-el" data-help="<?php 
                echo esc_attr(__('Distance from left in pixels, percents or auto.<br/> e.g. \'123px\', \'50%\' or \'auto\'. ', 'new_royalslider'));
                ?>
"><?php 
                _e('Left', 'new_royalslider');
                ?>
</label>
                                    <input id="rs-a-b-left" value="" />
                                </div>
                                <div>
                                    <label for="rs-a-b-right" class="rs-help-el" data-help="<?php 
                echo esc_attr(__('Distance from right in pixels, percents or auto.<br/> e.g. \'123px\', \'50%\' or \'auto\'. ', 'new_royalslider'));
                ?>
"><?php 
                _e('Right', 'new_royalslider');
                ?>
</label>
                                    <input id="rs-a-b-right" value="" />
                                </div>
                                <div >
                                    <label for="rs-a-b-top" class="rs-help-el" data-help="<?php 
                echo esc_attr(__('Distance from top in pixels, percents or auto.<br/> e.g. \'123px\', \'50%\' or \'auto\'. ', 'new_royalslider'));
                ?>
"><?php 
                _e('Top', 'new_royalslider');
                ?>
</label>
                                    <input id="rs-a-b-top" value="" />
                                </div>
                                <div>
                                    <label  class="rs-help-el" data-help="<?php 
                echo esc_attr(__('Distance from bottom in pixels, percents or auto.<br/> e.g. \'123px\', \'50%\' or \'auto\'. ', 'new_royalslider'));
                ?>
" for="rs-a-b-bottom"><?php 
                _e('Bottom', 'new_royalslider');
                ?>
</label>
                                    <input id="rs-a-b-bottom" value="" />
                                </div>
                            </div>
                        </div>
                        <div class="transition-fields rs-anim-blocks-inputs">
                            <div>
                                <label for="rs-a-b-speed" class="rs-help-el" data-help="<?php 
                echo esc_attr(__('Animation speed of block.', 'new_royalslider'));
                ?>
"><?php 
                _e('Speed', 'new_royalslider');
                ?>
</label>
                                <input id="rs-a-b-speed" value="300" />
                            </div>
                            <div class="rs-be-fade-effect">
                                <label for="rs-a-b-fade-effect">
                                <input id="rs-a-b-fade-effect" type="checkbox" checked="checked" value="true" />
                                <?php 
                _e('Fade in', 'new_royalslider');
                ?>
</label>
                            </div>
                            <div>
                                <label for="rs-a-b-move-offset"  class="rs-help-el" data-help="<?php 
                echo esc_attr(__('Distance for move animation.', 'new_royalslider'));
                ?>
"><?php 
                _e('Move offset', 'new_royalslider');
                ?>
</label>
                                <input id="rs-a-b-move-offset" value="300" />
                            </div>
                            <div>
                                <label for="rs-a-b-move-effect" class="rs-help-el" data-help="<?php 
                echo esc_attr(__('Move/slide animation', 'new_royalslider'));
                ?>
"><?php 
                _e('Move effect', 'new_royalslider');
                ?>
</label>
                                <select id="rs-a-b-move-effect">
                                    <option value="left"><?php 
                _e('From left', 'new_royalslider');
                ?>
</option>
                                    <option value="right"><?php 
                _e('From right', 'new_royalslider');
                ?>
</option>
                                    <option value="top"><?php 
                _e('From top', 'new_royalslider');
                ?>
</option>
                                    <option value="bottom"><?php 
                _e('From bottom', 'new_royalslider');
                ?>
</option>
                                    <option value="none"><?php 
                _e('None', 'new_royalslider');
                ?>
</option>
                                </select>
                            </div>
                            <div>
                                <label for="rs-a-b-delay" class="rs-help-el" data-help="<?php 
                echo esc_attr(__('Delay before block shows up. Leave field empty or set to AUTO to use default sequential delay.', 'new_royalslider'));
                ?>
"><?php 
                _e('Delay', 'new_royalslider');
                ?>
</label>
                                <input id="rs-a-b-delay" value="400" />
                            </div>
                            <div>
                                <label for="rs-a-b-easing"  class="rs-help-el" data-help="<?php 
                echo esc_attr(__('Easing function for animation', 'new_royalslider'));
                ?>
"><?php 
                _e('Easing', 'new_royalslider');
                ?>
</label>
                                <select id="rs-a-b-easing">
                                    <option value="easeOutSine"><?php 
                _e('easeOutSine', 'new_royalslider');
                ?>
</option>
                                    <option value="easeInOutSine"><?php 
                _e('easeInOutSine', 'new_royalslider');
                ?>
</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div id="rs-no-slides-block">
                        <h2><?php 
                _e("You don't have any slides", 'new_royalslider');
                ?>
</h2>
                        <p><?php 
                _e("Get started by adding slides via buttons above or watch <a target=\"_blank\" href=\"http://help.dimsemenov.com/kb/wordpress-royalslider-tutorials/wp-creating-custom-slider\">introductory video</a>.", 'new_royalslider');
                ?>
</p>
                    </div>
                    <div id="new-rs-slides">
                         <?php 
                $this->get_slider_items();
                ?>
                    </div> 
                <?php 
            } else {
                if ($this->slider_type === 'gallery') {
                    ?>
                    <div class="rs-info">
                        <p class="rs-awesome-paragraph"><?php 
                    _e('Here you can create configuration of RoyalSlider that will override default WordPress gallery, and can be added only inside post.', 'new_royalslider');
                    ?>
</p>

                        <div class="help-video"><a class="in-page-action" target="_blank" href="http://help.dimsemenov.com/kb/wordpress-royalslider-tutorials/wp-creating-royalslider-from-images-attached-to-post"><?php 
                    _e('View help video about how to create such slider', 'new_royalslider');
                    ?>
</a></div><br/>
                        <p>Or follow these steps:</p>
                        <ol>
                            <li><?php 
                    _e('Enter name for slider.', 'new_royalslider');
                    ?>
</li>
                            <li><?php 
                    _e('Configure slider options at right side, most of time you just need to change "Template" and "Skin" options.', 'new_royalslider');
                    ?>
</li>
                            <li><?php 
                    _e('Click create(save) slider button.', 'new_royalslider');
                    ?>
</li>
                            <li><?php 
                    _e('Go to any post and insert default WordPress gallery as usually.', 'new_royalslider');
                    ?>
</li>
                            <li><?php 
                    _e('Switch to Text(HTML) tab in post content editor and add <code>royalslider="SLIDER_ID"</code> attribute to gallery shortcode, where <code>SLIDER_ID</code> is id of slider that you\'re editing now.<br/>For example if ID of your slider is 3: <code>[gallery ids="24,22"]</code> should be changed to <code>[gallery royalslider="3"  ids="24,22"]</code>.', 'new_royalslider');
                    ?>
</li>
                            <li><?php 
                    _e('Optionally change configuration of the slider or change Slide HTML markup.', 'new_royalslider');
                    ?>
</li>
                        </ol>
                        <p><?php 
                    _e('You may also override all default WordPress galleries in posts (without adding royalslider attribute to [gallery] shortcode), visit RoyalSlider global settings page to learn more.', 'new_royalslider');
                    ?>
</p>
                    </div>
                <?php 
                } else {
                    if ($this->slider_type === '500px') {
                        NewRoyalSlider500pxSource::show_admin_options($this->parsed_options);
                    } else {
                        if ($this->slider_type === 'posts') {
                            NewRoyalSliderPostsSource::show_admin_options($this->parsed_options);
                        } else {
                            if ($this->slider_type === 'nextgen') {
                                NewRoyalSliderNextGenSource::show_admin_options($this->parsed_options);
                            } else {
                                if ($this->slider_type === 'flickr') {
                                    NewRoyalSliderFlickrSource::show_admin_options($this->parsed_options);
                                } else {
                                    if ($this->slider_type === 'instagram') {
                                        NewRoyalSliderInstagramSource::show_admin_options($this->parsed_options);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            ?>
            </div>
        </div>
        

    </div>
</div>
            <?php 
        }