Example #1
1
 function woocommerce_output_related_products()
 {
     echo '<div id="related-products">';
     echo '<h3>', apply_filters('yiw_related_products_text', __('Related Products', 'yiw')), '</h3>';
     $cols = $prod = yiw_layout_page() == 'sidebar-no' ? 5 : 4;
     if (yiw_get_option('shop_show_related_single_product')) {
         $prod = yiw_get_option('shop_number_related_single_product');
         $cols = yiw_get_option('shop_columns_related_single_product');
     }
     woocommerce_related_products(apply_filters('related_products_posts_per_page', $prod), apply_filters('related_products_columns', $cols));
     echo '</div>';
 }
Example #2
0
/**
 * Retrieve the escluded categories, set on Theme Options
 * 
 * @return string String with all id categories excluded, separeted by a comma
 * 
 * @since 1.0                
 */
function yiw_get_exclude_categories()
{
    $cats = yiw_get_option('blog_cats_exclude_1');
    $cats = str_replace(" ", "", $cats);
    // tolgo gli spazi che l'utente inserisce
    $cats = explode(",", $cats);
    // divido le categorie tramite le virgole inserite
    $temp = array();
    foreach ($cats as $cat) {
        $temp[] = $cat;
        // metto tutte le categorie in un array temporaneo
    }
    // genero una nuova stringa con l'esclusione delle categorie passate in parametro, aggiugendo un meno davanti ad ogni numero (-1,-4,-7,ecc...)
    $i = 0;
    $query = '';
    foreach ($temp as $c) {
        if ($i != 0) {
            $query .= ',';
        }
        // aggiunge la virgola, soltanto se non � il primo elemento processato
        $query .= "-{$c}";
        $i++;
    }
    return $query;
}
Example #3
0
function yiw_get_color($name, $echo = TRUE, $default = FALSE)
{
    global $yiw_colors, $color_theme;
    $color = '';
    // retrieve the default colors
    $default_color = array();
    foreach ($yiw_colors as $section => $the_) {
        foreach ($the_['options'] as $id => $args) {
            $default_color[$id] = $args['default'];
        }
    }
    $color = '';
    if (yiw_get_option('colors_' . $name, '') != '') {
        $color = yiw_get_option('colors_' . $name);
    } else {
        $default = TRUE;
    }
    if ($default && isset($default_color[$name])) {
        $color = $default_color[$name];
    }
    if ($echo) {
        echo $color;
    }
    return $color;
}
Example #4
0
function yiw_get_configuration($settings)
{
    $fields = array();
    foreach ($settings as $setting => $val) {
        $var = yiw_get_option("slider_flash_{$setting}");
        $var = str_replace('#', '0x', $var);
        if ($var) {
            $fields[] = "{$setting}=\"{$var}\"";
        } else {
            $fields[] = "{$setting}=\"{$val}\"";
        }
    }
    return $fields;
}
Example #5
0
 function yiw_show_right_sliders_settings()
 {
     global $yiw_options;
     if (!isset($yiw_options['sliders'])) {
         return;
     }
     $slider = yiw_get_option('slider_choosen', 'sheeva');
     if ($slider == 'none' || $slider == 'fixed-image' || $slider == 'layers' || $slider == 'minilayers' || $slider == 'carousel') {
         unset($yiw_options['sliders']['slides']);
     }
     foreach ($yiw_options['sliders'] as $section => $options) {
         if (preg_match('/settings-(.*)/', $section) && $section != 'settings-' . $slider) {
             unset($yiw_options['sliders'][$section]);
         }
     }
 }
Example #6
0
        ?>

                       <li><a href="<?php 
        echo $my_account_url;
        ?>
"><?php 
        echo $label;
        ?>
</a></li>
                        <?php 
    }
}
if (!$yiw_is_woocommerce and !yiw_get_option('topbar_login') and !yiw_get_option('topbar_register')) {
    echo ' | ';
}
if (!$yiw_is_woocommerce && !yiw_get_option('topbar_register')) {
    echo '<li>';
    wp_register('', '');
    echo '</li>';
}
?>

                    </ul>
                </div>
				<?php 
if ($show_ribbon) {
    ?>

                <div id="cart">
					<?php 
    yiw_minicart();
Example #7
0
                <?php 
}
?>

            
    
                <!-- START CONTENT -->
                <div id="content" class="group">
                    <?php 
if (yiw_get_option('show_breadcrumb_single_blog')) {
    yiw_breadcrumb();
}
?>

                    <?php 
$blog_type = yiw_get_option('blog_type');
?>

                    
                    <?php 
switch ($post_type) {
    case TYPE_GALLERY:
        get_template_part('loop', 'internal');
        break;
    default:
        get_template_part('loop', 'index');
}
?>

    
                </div>                       
        ?>

                        </div>

                        <?php 
    }
    ?>
  

                        <div class="work-description">
                            <h3><?php 
    the_title();
    ?>
</h3>
                            <?php 
    $read_more_button = yiw_get_option('portfolio_show_view_project') ? $yiw_portfolio[$post_type]['read_more'] : '';
    ?>

                            <?php 
    echo yiw_content('content', 25, $read_more_button);
    ?>

                        </div>
                        <div class="clear"></div>
                    </div>                         
                    <?php 
}
?>
        

                </div>                          
Example #9
0
        ?>

                                </div>
                                
                                <?php 
        if ($video) {
            ?>
<h2><?php 
            the_title();
            ?>
</h2><?php 
        }
        ?>

                                <?php 
        the_content(__(yiw_get_option('blog_read_more_text')));
        ?>

                            </div>
                            
                        <div class="post_ group">
                            <?php 
        wp_link_pages();
        ?>

    
                            <?php 
        if (is_single()) {
            edit_post_link(__('Edit', 'yiw'), '<span class="edit-link">', '</span>');
        }
        ?>
Example #10
0
    wp_get_archives('type=monthly&show_post_count=1');
    ?>

                </ul>
            </div>
            
            <div class="widget">
                <h3><?php 
    _e('Categories');
    ?>
</h3>
                <ul>
                    <?php 
    $cat_params = array('hide_empty' => FALSE, 'title_li' => '');
    if (strlen(trim(yiw_get_option('blog_cats_exclude_2'))) > 0) {
        $cat_params['exclude'] = trim(yiw_get_option('blog_cats_exclude_2'));
    }
    wp_list_categories($cat_params);
    ?>

                </ul>
            </div>
            
            <div class="widget">
                <h3><?php 
    _e('Blogroll');
    ?>
</h3>
                <ul>
                    <?php 
    wp_list_bookmarks('title_li=&categorize=0');
Example #11
0
<?php

/**
 * @package WordPress
 * @since 1.0
 */
$layout_type = yiw_get_option('portfolio_layout_page', 'sidebar-right');
get_header();
?>
           
        <div id="primary" class="layout-<?php 
echo $layout_type;
?>
">   
		    <div class="inner group">
                <?php 
if (get_post_meta(get_the_ID(), '_slogan_page', true)) {
    ?>
                <div id="slogan">
                    <h2><?php 
    echo get_post_meta(get_the_ID(), '_slogan_page', true);
    ?>
</h2>
                    <h3><?php 
    echo get_post_meta(get_the_ID(), '_subslogan_page', true);
    ?>
</h3>
                </div>
                <?php 
}
?>
Example #12
0
<div id="footer" class="<?php 
if ($layout_page_type) {
    echo $layout_page_type;
} else {
    echo yiw_layout_page();
}
?>
">
    <?php 
for ($i = 1; $i <= yiw_get_option('footer_rows', 1); $i++) {
    ?>

    <div class="group inner footer_row_<?php 
    echo $i;
    ?>
 footer_cols_<?php 
    echo yiw_get_option('footer_columns', 1);
    ?>
">            
                <?php 
    dynamic_sidebar("Footer Row {$i}");
    ?>

    </div>
    <?php 
}
?>
         
</div>
Example #13
0
        $args = array('post_type' => $post_type, sanitize_title($yiw_portfolio[$post_type]['tax']) => $cat_slug, 'paged' => $paged, 'posts_per_page' => -1);
        //wp_reset_query();
        $portfolio_items = new WP_Query($args);
        echo "<h3>{$cat_name}</h3>\n";
        echo '<div class="portfolio-slider">';
        echo '<ul>' . "\n";
        while ($portfolio_items->have_posts()) {
            $portfolio_items->the_post();
            if ($thumb = get_post_meta(get_the_ID(), '_portfolio_video', true)) {
                $class = 'video';
            } else {
                $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
                $thumb = $thumb[0];
                $class = 'img';
            }
            $click_event = yiw_get_option('portfolio_thumbnail_click', 'lightbox');
            ?>
                                                   

                <li class="post-<?php 
            echo get_the_ID();
            ?>
">
                    <?php 
            if (has_post_thumbnail()) {
                ?>

                        <?php 
                if ($click_event == 'lightbox') {
                    ?>
Example #14
0
    ?>

                    <li class="group">
                        <div class="slider-featured group">
                        <?php 
    yiw_slide_the('featured-content', array('container' => false, 'video_width' => 439, 'video_height' => 245));
    ?>
 
                        </div>
                        
                        <?php 
    if (yiw_slide_get('content')) {
        ?>

                        <div class="slider-caption caption-<?php 
        echo yiw_get_option('slider_elegant_caption_position');
        ?>
">
                                <h2><?php 
        yiw_slide_the('title');
        ?>
</h2>
                                <h4><?php 
        yiw_slide_the('subtitle');
        ?>
</h4>
                                <?php 
        yiw_slide_the('content');
        ?>

                        </div>
Example #15
0
/**
 * Retrive the icon from the database and return it in a <i> tag.
 * 
 * @param $icon_name
 * @param $return_tag
 * @return string
 */
function yiw_get_icon($icon_name, $default = false, $return_tag = false)
{
    $icon = maybe_unserialize(yiw_get_option($icon_name, $default));
    if (!$return_tag) {
        return $icon['icon'];
    }
    if (!empty($icon['custom'])) {
        return '<img src="' . $icon['custom'] . '" alt="' . $icon['icon'] . '" />';
    } else {
        return '<i class="' . $icon['icon'] . '"></i>';
    }
}
Example #16
0
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        echo $before_widget;
        echo $before_title . $title . $after_title;
        echo '<div class="list-tweets' . '-' . $this->number . '">';
        $access_token = isset($instance['access_token']) && $instance['access_token'] != '' ? $instance['access_token'] : yiw_get_option('twitter_access_token');
        $access_token_secret = isset($instance['access_token_secret']) && $instance['access_token_secret'] != '' ? $instance['access_token_secret'] : yiw_get_option('twitter_access_token_secret');
        $consumer_key = isset($instance['consumer_key']) && $instance['consumer_key'] != '' ? $instance['consumer_key'] : yiw_get_option('twitter_consumer_key');
        $consumer_secret = isset($instance['consumer_secret']) && $instance['consumer_secret'] != '' ? $instance['consumer_secret'] : yiw_get_option('twitter_consumer_secret');
        $twitter_data = yit_get_tweets($access_token, $access_token_secret, $consumer_key, $consumer_secret, $instance['limit']);
        if (!isset($twitter_data->errors)) {
            echo '<ul class="last-tweets">';
            $i = 1;
            foreach ($twitter_data as $tweet) {
                if (!empty($tweet)) {
                    $text = $tweet->text;
                    $text_in_tooltip = str_replace('"', '', $text);
                    // replace " to avoid conflicts with title="" opening tags
                    $id = $tweet->id;
                    $time = strftime('%d/%m/%Y %H:%M:%S', strtotime($tweet->created_at));
                    $username = $tweet->user->name;
                }
                echo '<li class="tweet_' . $i . '"><p><span class="text">' . $text . '</span><br />';
                if ($instance['time']) {
                    echo '<span class="meta">' . $time . '</span>';
                }
                echo '</p></li>';
                ?>

                <script type="text/javascript">
                    jQuery(function($){
                        var test = twttr.txt.autoLink("<?php 
                echo addslashes(str_replace("\n", " ", $text));
                ?>
");
                        $('ul.last-tweets li.tweet_<?php 
                echo $i;
                ?>
 span.text').replaceWith(test);
                    });
                </script>
                <?php 
                $i++;
            }
            echo '</ul>';
        }
        echo '</div>';
        echo $after_widget;
    }
Example #17
0
//if ( !yiw_can_show_slider() )
//    return;
global $post, $wp_query, $woocommerce;
wp_reset_query();
$responsive = array('unoslider', 'elastic', 'layers', 'minilayers');
ob_start();
$post_id = yiw_post_id();
if ($slider = get_post_meta($post_id, 'slider_type', true)) {
    if (is_string($slider) && $slider != 'none' && !empty($slider)) {
        get_template_part('slider', $slider);
    }
} elseif (is_home() || is_front_page() || is_page_template('home.php')) {
    if (($slider = yiw_get_option('slider_type', 'none')) && $slider != 'none' && !empty($slider)) {
        get_template_part('slider', $slider);
    }
} else {
    return;
}
$slider_html = ob_get_clean();
if ($slider != 'none' && !in_array($slider, $responsive) && yiw_get_option('slider_responsive') == 'fixed-image' && $slider != 'fixed-image') {
    ?>
   
        <div class="slider-mobile">
           <?php 
    get_template_part('slider', 'fixed-image');
    ?>
    
        </div>   
    <?php 
}
echo $slider_html;
Example #18
0
/**
 * <short description>
 *
 * <long description>
 *
 * @package 
 * @subpackage 
 * @since 
 */
function yiw_admin($vars)
{
    global $yiw_options, $yiw_theme_options_items, $yiw_awesome_icons;
    if (empty($vars)) {
        return;
    }
    $i = $show_form = 0;
    $deps = array();
    // tutte quelle opzioni che devon omostrarsi solo ad un determinato valore di un altra opzione
    $class_dep = $fade_color_dep = '';
    $actual_section = isset($_GET['section_opened']) ? $_GET['section_opened'] : '';
    yiw_message();
    $current_tab = yiw_get_current_tab();
    $webfont_html = $googlefont_html = $cufonfont_html = '';
    foreach (yiw_list_standard_fonts() as $val => $option) {
        $webfont_html .= "<option value=\"{$val}\">{$option}</option>";
    }
    foreach (yiw_list_google_fonts() as $val => $option) {
        $googlefont_html .= "<option value=\"{$val}\">{$option}</option>";
    }
    foreach (yiw_list_cufon_fonts() as $val => $option) {
        $cufonfont_html .= "<option value=\"{$val}\">{$option}</option>";
    }
    foreach ($vars as $section => $values) {
        foreach ($values as $value) {
            if (!isset($value['std'])) {
                $value['std'] = '';
            }
            // deps
            if (isset($value['deps'])) {
                $value['deps']['id_input'] = yiw_option_id($value['deps']['id'], false);
                $deps[$value['id']] = $value['deps'];
                $class_dep = ' yiw-deps';
                $fade_color_dep = '<div class="fade_color"></div>';
            }
            $is_section = $actual_section == $section ? true : false;
            switch ($value['type']) {
                // ================== OPEN =====================
                case "open":
                    ?>

                
                <?php 
                    break;
                    // ================== SECTION =====================
                // ================== SECTION =====================
                case "section":
                    $i++;
                    if (isset($value['effect']) and !$value['effect']) {
                        $class_effect = '';
                        $class_img = 'noeffect';
                    } else {
                        $class_effect = ' section_effect';
                        $class_img = 'inactive';
                    }
                    if ($is_section) {
                        $class_img = 'active';
                    }
                    $img = '<img src="' . yiw_panel_url() . '/include/images/trans.png" class="' . $class_img . '" alt="">';
                    if (isset($value['valueButton'])) {
                        $valueButton = __($value['valueButton'], 'yiw');
                    } else {
                        $valueButton = __('Save changes', 'yiw');
                    }
                    ?>

                
                    <div class="rm_section<?php 
                    echo $class_effect;
                    ?>
" id="<?php 
                    echo $section;
                    ?>
-section">
                    <div class="rm_title">
						<h3<?php 
                    if ($is_section) {
                        echo ' class="active"';
                    }
                    ?>
><?php 
                    echo $img . __($value['name'], 'yiw');
                    ?>
</h3>
						
						<?php 
                    if (!isset($value['show-submit']) or isset($value['show-submit']) and $value['show-submit']) {
                        ?>

						<span class="submit">
							<input type="submit" value="<?php 
                        echo $valueButton;
                        ?>
" class="button-secondary" />  
                    	</span>
                    	<?php 
                    }
                    ?>

						
						<div class="clearfix"></div>
					</div>
                    <div class="rm_options<?php 
                    if ($is_section) {
                        echo ' opened';
                    }
                    ?>
"<?php 
                    if ($is_section) {
                        echo ' style="display:block;"';
                    }
                    ?>
>
                
                
                <?php 
                    break;
                    // ================== CLOSE =====================
                // ================== CLOSE =====================
                case "close":
                    ?>

                                         
                        </div>                                    
                        <?php 
                    if ($is_section) {
                        echo '<input type="hidden" name="section-opened" value="' . $section . '-section" />';
                    }
                    ?>

                    </div>
                    <br />
                
                
                <?php 
                    break;
                    // ================== TITLE =====================
                // ================== TITLE =====================
                case "title":
                    ?>

                    <!--<p><?php 
                    _e('To easily use the options of the theme, you can use the menu below.', 'yiw');
                    ?>
</p>--> 
    
                    <div class="wrap rm_wrap">   
                    
                    <div id="icon-options-general" class="icon32"><br></div>
                    <h2><?php 
                    _e($value['name'], 'yiw');
                    ?>
</h2>  
                    <br />                                                       
    
                    <div class="rm_tabmenu">
                    
                        <ul id="sidemenu">
                            <?php 
                    foreach ($yiw_theme_options_items as $tab => $tab_value) {
                        $current = $current_tab == $tab ? ' class="current"' : '';
                        ?>

                            <li><a href="?page=<?php 
                        echo $_GET['page'];
                        ?>
&tab=<?php 
                        echo $tab;
                        ?>
"<?php 
                        echo $current;
                        ?>
><?php 
                        _e($tab_value, 'yiw');
                        ?>
</a></li>
                            <?php 
                    }
                    ?>

                        </ul>
                    
                    </div>
                    
                    <div class="clear"></div>
                    
                    <div class="rm_opts">
                    
                    <?php 
                    if (!isset($value['showform']) or $value['showform']) {
                        $show_form = true;
                    }
                    ?>

                    
                    <?php 
                    if ($show_form) {
                        ?>

                    <form method="post" action="?page=<?php 
                        echo $_GET['page'];
                        ?>
&tab=<?php 
                        echo $current_tab;
                        ?>
">  
                    <?php 
                    }
                    ?>
                                       
                
                
                <?php 
                    break;
                    // ================== ECHO TEXT =====================
                // ================== ECHO TEXT =====================
                case 'show-text':
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    // if button copy
                    $before_text = $after_text = $button = '';
                    if (isset($value['copy-button']) and $value['copy-button']) {
                        $before_text = '<div class="copy-text">';
                        $after_text = '</div>';
                        $button = '<a href="#" class="button-secondary copy-to-clipboard">' . __('Copy to clipboard', 'yiw') . '</a>';
                    }
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_text">
                        <label><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        <textarea type="text" style="width:340px;height:28px;" class="copy-text"><?php 
                    echo $value['text'];
                    ?>
</textarea> <?php 
                    echo $button;
                    ?>

						
						<small><?php 
                    echo $value['desc'];
                    ?>
</small><div class="clearfix"></div>
                                                   
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                    </div>
                <?php 
                    break;
                    // ================== ECHO TEXT =====================
                // ================== ECHO TEXT =====================
                case 'simple-text':
                    ?>

                
                    <div class="rm_option rm_input rm_text" style="text-align:center;">
                        <p><?php 
                    echo $value['desc'];
                    ?>
</p>
						
						<div class="clearfix"></div>
                    
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                    </div>
                <?php 
                    break;
                    // ================== TEXT =====================
                // ================== TEXT =====================
                case 'text':
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_text<?php 
                    echo $class_dep;
                    ?>
">
                        <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        <input name="<?php 
                    yiw_option_name($value['id']);
                    ?>
" 
							   id="<?php 
                    yiw_option_id($value['id']);
                    ?>
" 
							   type="<?php 
                    echo $value['type'];
                    ?>
" 
							   <?php 
                    if (!isset($value['show_value']) or $value['show_value']) {
                        ?>

							   value="<?php 
                        echo str_replace('"', "'", stripslashes_deep(yiw_get_option($value['id'], $value['std'])));
                        ?>
"
							   <?php 
                    }
                    ?>

							   <?php 
                    if (isset($value['button'])) {
                        ?>
style="width:240px;" <?php 
                    }
                    ?>
/>
                        
						<?php 
                    if (isset($value['button'])) {
                        ?>

						<input type="submit" value="<?php 
                        echo $value['button'];
                        ?>
" class="button" name="button_save" id="<?php 
                        yiw_option_id($value['id']);
                        ?>
_save">
						<?php 
                    }
                    ?>

                        
						<?php 
                    if (isset($value['action'])) {
                        ?>

						<input type="hidden" name="secondary-action" value="<?php 
                        echo $value['action'];
                        ?>
" />
						<?php 
                    }
                    ?>

						
						<small><?php 
                    echo $value['desc'];
                    ?>
</small><div class="clearfix"></div>
                    
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                    </div>
                     
                <?php 
                    break;
                    // ================== TEXTAREA =====================
                // ================== TEXTAREA =====================
                case 'textarea':
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_textarea<?php 
                    echo $class_dep;
                    ?>
">
                        <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        <textarea name="<?php 
                    yiw_option_name($value['id']);
                    ?>
" type="<?php 
                    echo $value['type'];
                    ?>
" cols="" rows="" class="listdata form-input-tip"><?php 
                    echo stripslashes_deep(yiw_get_option($value['id'], $value['std']));
                    ?>
</textarea>
                        <small><?php 
                    echo $value['desc'];
                    ?>
</small><div class="clearfix"></div>
                    
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                    </div>                  
                     
                                            
                <?php 
                    break;
                    // ================== SELECT =====================
                // ================== SELECT =====================
                case 'select':
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_select<?php 
                    echo $class_dep;
                    ?>
">
                        <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        
                        <select name="<?php 
                    yiw_option_name($value['id']);
                    ?>
" id="<?php 
                    yiw_option_id($value['id']);
                    ?>
" <?php 
                    if (isset($value['button'])) {
                        ?>
style="width:240px;" <?php 
                    }
                    ?>
>
                            <?php 
                    foreach ($value['options'] as $val => $option) {
                        ?>

                                <option value="<?php 
                        echo $val;
                        ?>
" <?php 
                        selected(yiw_get_option($value['id'], $value['std']), $val);
                        ?>
><?php 
                        echo $option;
                        ?>
</option>
                            <?php 
                    }
                    ?>

                        </select>                          
                        
						<?php 
                    if (isset($value['button'])) {
                        ?>

						<input type="submit" value="<?php 
                        echo $value['button'];
                        ?>
" class="button" name="<?php 
                        yiw_option_id($value['id']);
                        ?>
_save" id="<?php 
                        yiw_option_id($value['id']);
                        ?>
_save">
						<?php 
                    }
                    ?>
          
                        
						<?php 
                    if (isset($value['action'])) {
                        ?>

						<input type="hidden" name="secondary-action" value="<?php 
                        echo $value['action'];
                        ?>
" />
						<?php 
                    }
                    ?>

                        
                        <small><?php 
                    echo $value['desc'];
                    ?>
</small>
                        <div class="clearfix"></div>
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                    </div>  
                     
                <?php 
                    break;
                    // ================== MULTISELECT =====================
                // ================== MULTISELECT =====================
                case 'multiselect':
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    $selected = yiw_get_option($value['id'], array());
                    if (!is_array($selected)) {
                        $selected = array($selected);
                    } else {
                        $selected = explode(',', $selected);
                    }
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_select<?php 
                    echo $class_dep;
                    ?>
">
                        <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        
                        <select multiple size="15" name="<?php 
                    yiw_option_name($value['id']);
                    ?>
[]" id="<?php 
                    yiw_option_id($value['id']);
                    ?>
" <?php 
                    if (isset($value['button'])) {
                        ?>
style="width:240px;" <?php 
                    }
                    ?>
>
                            <?php 
                    foreach ($value['options'] as $val => $option) {
                        ?>

                                <option value="<?php 
                        echo $val;
                        ?>
" <?php 
                        selected(in_array($val, $selected));
                        ?>
><?php 
                        echo $option;
                        ?>
</option>
                            <?php 
                    }
                    ?>

                        </select>                          
                        
						<?php 
                    if (isset($value['button'])) {
                        ?>

						<input type="submit" value="<?php 
                        echo $value['button'];
                        ?>
" class="button" name="<?php 
                        yiw_option_id($value['id']);
                        ?>
_save" id="<?php 
                        yiw_option_id($value['id']);
                        ?>
_save">
						<?php 
                    }
                    ?>
          
                        
						<?php 
                    if (isset($value['action'])) {
                        ?>

						<input type="hidden" name="secondary-action" value="<?php 
                        echo $value['action'];
                        ?>
" />
						<?php 
                    }
                    ?>

                        
                        <small><?php 
                    echo $value['desc'];
                    ?>
</small>
                        <div class="clearfix"></div>
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                    </div>  
                     
                <?php 
                    break;
                    // ================== SELECT ICON =====================
                // ================== SELECT ICON =====================
                case 'select-icon':
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    $icon_value = maybe_unserialize(yiw_get_option($value['id'], $value['std']));
                    if (!is_array($icon_value)) {
                        $icon_value = array('icon' => $icon_value, 'custom' => '');
                    }
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_select<?php 
                    echo $class_dep;
                    ?>
">
                        <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        
                        <select style="width:318px;" name="<?php 
                    yiw_option_name($value['id']);
                    ?>
[icon]" id="<?php 
                    yiw_option_id($value['id']);
                    ?>
" <?php 
                    if (isset($value['button'])) {
                        ?>
style="width:200px;" <?php 
                    }
                    ?>
>
                            <?php 
                    foreach ($yiw_awesome_icons as $key => $name) {
                        ?>

                                <option value="<?php 
                        echo $key;
                        ?>
" <?php 
                        if (isset($icon_value['icon'])) {
                            selected($icon_value['icon'], $key);
                        }
                        ?>
><?php 
                        echo $name;
                        ?>
</option>
                            <?php 
                    }
                    ?>

                        </select><i style="font-size:18px;padding-left: 5px;" id="<?php 
                    yiw_option_id($value['id']);
                    ?>
_icon"></i>                          
                        
						<?php 
                    if (isset($value['upload']) && $value['upload']) {
                        ?>

						<br />
						<div class="upload-button" style="width:340px;float:left;position:relative;margin-left:200px;">
						    <?php 
                        _e('or upload your icon:', 'yiw');
                        ?>

						    <input type="text" style="width:163px;" id="<?php 
                        yiw_option_id($value['id']);
                        ?>
_custom" name="<?php 
                        yiw_option_name($value['id']);
                        ?>
[custom]" value="<?php 
                        if (isset($icon_value['custom'])) {
                            echo $icon_value['custom'];
                        }
                        ?>
" />
						    <a href="#" class="button-secondary" id="<?php 
                        yiw_option_id($value['id']);
                        ?>
_upload_button"><?php 
                        _e('Upload', 'yiw');
                        ?>
</a>
                        </div>
                        <?php 
                    } else {
                        ?>

                        <input type="hidden" name="<?php 
                        yiw_option_name($value['id']);
                        ?>
[custom]" value="" /> 
                        <?php 
                    }
                    ?>
                                  
                        
						<?php 
                    if (isset($value['button'])) {
                        ?>

						<input type="submit" value="<?php 
                        echo $value['button'];
                        ?>
" class="button" name="<?php 
                        yiw_option_id($value['id']);
                        ?>
_save" id="<?php 
                        yiw_option_id($value['id']);
                        ?>
_save">
						<?php 
                    }
                    ?>
          
                        
						<?php 
                    if (isset($value['action'])) {
                        ?>

						<input type="hidden" name="secondary-action" value="<?php 
                        echo $value['action'];
                        ?>
" />
						<?php 
                    }
                    ?>

                        
                        <small><?php 
                    echo $value['desc'];
                    ?>
</small>
                        <div class="clearfix"></div>
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                    </div>
                    <script type="text/javascript">
                    jQuery(document).ready( function( $ ) {
                        $( '#<?php 
                    yiw_option_id($value['id']);
                    ?>
_icon' ).attr( 'class', $( '#<?php 
                    yiw_option_id($value['id']);
                    ?>
' ).val() );
                        
                        $( '#<?php 
                    yiw_option_id($value['id']);
                    ?>
' ).change( function() {
                            $( '#<?php 
                    yiw_option_id($value['id']);
                    ?>
_icon' ).removeAttr( 'class' );
                            $( '#<?php 
                    yiw_option_id($value['id']);
                    ?>
_icon' ).attr( 'class', $( this ).val() );    
                        });   
                             
                         $('#<?php 
                    yiw_option_id($value['id']);
                    ?>
_upload_button').live('click', function(){
                    		var yiw_this_object = $(this).prev();
                    		
                    		tb_show('', 'media-upload.php?post_id=0&type=image&TB_iframe=true');    
                    	
                    		window.send_to_editor = function(html) {
                    			imgurl = $('img', html).attr('src');
                    			yiw_this_object.val(imgurl);
                    			
                    			tb_remove();
                    		}          
                    		
                    		return false;
                    	});
                    });
                    </script>
                     
                <?php 
                    break;
                    // ================== RADIO=====================
                // ================== RADIO=====================
                case 'radio':
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input<?php 
                    echo $class_dep;
                    ?>
">
                        <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        
                        <div class="rm_radio">
                        <?php 
                    foreach ($value['options'] as $val => $option) {
                        ?>

                        	<label class="radio-inline">
                            	<input type="radio" name="<?php 
                        yiw_option_name($value['id']);
                        ?>
" id="<?php 
                        yiw_option_id($value['id']);
                        ?>
" value="<?php 
                        echo $val;
                        ?>
" <?php 
                        checked(yiw_get_option($value['id'], $value['std']), $val);
                        ?>
 /> <?php 
                        echo $option;
                        ?>

                        	</label>
						<?php 
                    }
                    ?>
    
						</div>  
                        
                        <small><?php 
                    echo $value['desc'];
                    ?>
</small>
                        <div class="clearfix"></div>
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                    </div>        
                     
                <?php 
                    break;
                    // ================== CHECKBOX =====================
                // ================== CHECKBOX =====================
                case "checkbox":
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_checkbox<?php 
                    echo $class_dep;
                    ?>
">
                        <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        
                        <input type="checkbox" name="<?php 
                    yiw_option_name($value['id']);
                    ?>
" id="<?php 
                    yiw_option_id($value['id']);
                    ?>
" value="true" <?php 
                    checked(yiw_get_option($value['id'], $value['std']), true);
                    ?>
 />
                        
                        
                        <small><?php 
                    echo $value['desc'];
                    ?>
</small><div class="clearfix"></div>
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                    </div>          
                     
                <?php 
                    break;
                    // ================== BUTTON =====================
                // ================== BUTTON =====================
                case 'button':
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_text<?php 
                    echo $class_dep;
                    ?>
">
                        <label><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        
						<input type="submit" value="<?php 
                    echo $value['label'];
                    ?>
" class="button" />
						<input type="hidden" name="secondary-action" value="<?php 
                    echo $value['action'];
                    ?>
" />
						
						<small><?php 
                    echo $value['desc'];
                    ?>
</small><div class="clearfix"></div>
                    
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                    </div>        
                     
                <?php 
                    break;
                    // ================== ON / OFF =====================
                // ================== ON / OFF =====================
                case "on-off":
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_on_off<?php 
                    echo $class_dep;
                    ?>
">
                        <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        
                        <div class="iphone-check"><input type="checkbox" name="<?php 
                    yiw_option_name($value['id']);
                    ?>
" id="<?php 
                    yiw_option_id($value['id']);
                    ?>
" value="1" <?php 
                    checked(yiw_get_option($value['id']), true);
                    ?>
 class="on_off" /></div>
                        
                        
                        <small><?php 
                    echo $value['desc'];
                    ?>
</small><div class="clearfix"></div>
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                    </div>       
                     
                <?php 
                    break;
                    // ================== SLIDER CONTROL =====================
                // ================== SLIDER CONTROL =====================
                case "slider_control":
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input slider_control<?php 
                    echo $class_dep;
                    ?>
">
                        <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        
                        <?php 
                    $labels = isset($value['label']) ? ' ' . $value['label'] : '';
                    ?>

                        
                        <div class="ui-slider">
                            <span class="minCaption"><?php 
                    echo $value['min'] . $labels;
                    ?>
</span>
                            <span class="maxCaption"><?php 
                    echo $value['max'] . $labels;
                    ?>
</span>
                            <span id="<?php 
                    yiw_option_id($value['id']);
                    ?>
-feedback" class="feedback"><strong><?php 
                    echo yiw_get_option($value['id'], $value['std']) . $labels;
                    ?>
</strong></span>
                            <div id="<?php 
                    yiw_option_id($value['id']);
                    ?>
" class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all">
                                <input type="hidden" name="<?php 
                    yiw_option_name($value['id']);
                    ?>
" value="<?php 
                    echo yiw_get_option($value['id'], $value['std']);
                    ?>
" />
                            </div> 
                        </div> 
                        
                        <script type="text/javascript">
                            jQuery(document).ready(function($){
                                $('#<?php 
                    yiw_option_id($value['id']);
                    ?>
').each(function(e){
                                    var val = <?php 
                    echo yiw_get_option($value['id'], $value['std']);
                    ?>
; 
                                    var minValue = <?php 
                    echo $value['min'];
                    ?>
; 
                                    var maxValue = <?php 
                    echo $value['max'];
                    ?>
; 
                                    $(this).slider({
                                        value: val,
                                        min: minValue,
                                        max: maxValue,
                                        range: 'min',
                                        <?php 
                    if (isset($value['step'])) {
                        ?>

                                        step: <?php 
                        echo $value['step'];
                        ?>
,
                                        <?php 
                    }
                    ?>

                                        slide: function( event, ui ) {
                                			$( 'input[name="<?php 
                    yiw_option_name($value['id']);
                    ?>
"]' ).val( ui.value );
                                			$( '#<?php 
                    yiw_option_id($value['id']);
                    ?>
-feedback strong' ).text( ui.value + '<?php 
                    echo $labels;
                    ?>
' );
                                		}
                                    });
                                });
                            });
                        </script>
                        
                        <small><?php 
                    echo $value['desc'];
                    ?>
</small><div class="clearfix"></div>
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                    </div>     
                     
                <?php 
                    break;
                    // ================== SIZE =====================
                // ================== SIZE =====================
                case 'size':
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    $size = maybe_unserialize(yiw_get_option($value['id'], serialize($value['std'])));
                    $label = !isset($value['label']) ? 'px' : $value['label'];
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_text<?php 
                    echo $class_dep;
                    ?>
">
                        <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        <input name="<?php 
                    yiw_option_name($value['id']);
                    ?>
[width]" 
							   id="<?php 
                    yiw_option_id($value['id']);
                    ?>
_width" 
							   type="text" 
							   <?php 
                    if (!isset($value['show_value']) or $value['show_value']) {
                        ?>

							   value="<?php 
                        echo $size['width'];
                        ?>
"
							   <?php 
                    }
                    ?>

                               style="width:50px;" />
                               
                        &nbsp;x&nbsp;          
                               
                        <input name="<?php 
                    yiw_option_name($value['id']);
                    ?>
[height]" 
							   id="<?php 
                    yiw_option_id($value['id']);
                    ?>
_height" 
							   type="text" 
							   <?php 
                    if (!isset($value['show_value']) or $value['show_value']) {
                        ?>

							   value="<?php 
                        echo $size['height'];
                        ?>
"
							   <?php 
                    }
                    ?>

                               style="width:50px;" />
                               
                        <?php 
                    echo $label;
                    ?>

                        
						<?php 
                    if (isset($value['button'])) {
                        ?>

						<input type="submit" value="<?php 
                        echo $value['button'];
                        ?>
" class="button" name="button_save" id="<?php 
                        yiw_option_id($value['id']);
                        ?>
_save">
						<?php 
                    }
                    ?>

                        
						<?php 
                    if (isset($value['action'])) {
                        ?>

						<input type="hidden" name="secondary-action" value="<?php 
                        echo $value['action'];
                        ?>
" />
						<?php 
                    }
                    ?>

						
						<small><?php 
                    echo $value['desc'];
                    ?>
</small><div class="clearfix"></div>
                    
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                    </div>
                     
                <?php 
                    break;
                    // ================ CHECKBOX ARRAY ============
                // ================ CHECKBOX ARRAY ============
                case "check-array":
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    ?>

                
    			<div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_multi_checkbox<?php 
                    echo $class_dep;
                    ?>
">
                                                                              
        	        <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                                            
                    <ul id="<?php 
                    yiw_option_id($value['id']);
                    ?>
" class="list-sortable<?php 
                    echo $class;
                    ?>
">  
    				
                    <?php 
                    $selected = explode(',', yiw_get_option($value['id'], ''));
                    if (!is_array($selected)) {
                        $selected = array($selected);
                    }
                    //if($heads) echo '<li class="head">'.$value['heads'][$i-1].'</li>';
                    foreach ($value['options'] as $check_id => $check_val) {
                        ?>

                    
                    	<li>
                            <input type="checkbox" name="<?php 
                        yiw_option_name($value['id']);
                        ?>
[]" value="<?php 
                        echo $check_id;
                        ?>
" <?php 
                        checked(in_array($check_id, $selected));
                        ?>
 id="<?php 
                        yiw_option_id($value['id']);
                        ?>
-<?php 
                        echo $check_id;
                        ?>
" style="float:left;margin-right:5px;" />&nbsp;
                            <label for="<?php 
                        yiw_option_id($value['id']);
                        ?>
-<?php 
                        echo $check_id;
                        ?>
" class="label-check"><?php 
                        echo $check_val;
                        ?>
</label>
                        </li>
                    <?php 
                    }
                    ?>

                    </ul>
                        
                	<small><?php 
                    echo $value['desc'];
                    ?>
</small><div class="clearfix"></div>
                	<?php 
                    echo $fade_color_dep;
                    ?>

                </div>       
                     
                 
                <?php 
                    break;
                    // ================ EXCLUDE CATEGORIES ============
                // ================ EXCLUDE CATEGORIES ============
                case "cat":
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    ?>

                
    			<div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_multi_checkbox<?php 
                    echo $class_dep;
                    ?>
">
                    <?php 
                    $cats = get_categories('orderby=name&use_desc_for_title=1&hierarchical=1&style=0&hide_empty=0');
                    $class = $descr = $ext = '';
                    $cols = 1;
                    if (isset($value['cols']) && $value['cols']) {
                        $heads = FALSE;
                        if (isset($value['heads'])) {
                            $heads = TRUE;
                        }
                        $cols = $value['cols'];
                        $class = ' small';
                        if ($cols > 1) {
                            $descr = "<small>{$value['desc']}</small>";
                        }
                    }
                    ?>

                                                                                                          
        	        <label for="<?php 
                    yiw_option_id($value['id'] . $ext);
                    ?>
"><?php 
                    _e($value['name'], 'yiw') . $descr;
                    ?>
</label>
                    
                    <?php 
                    for ($i = 1; $i <= $cols; $i++) {
                        $ext = $cols > 1 ? "_{$i}" : '';
                        ?>
                           
                        <ul id="<?php 
                        yiw_option_id($value['id'] . $ext);
                        ?>
" class="list-sortable<?php 
                        echo $class;
                        ?>
">  
        				
                        <?php 
                        $selected_cats = explode(",", yiw_get_option($value['id'] . $ext));
                        if ($heads) {
                            echo '<li class="head">' . $value['heads'][$i - 1] . '</li>';
                        }
                        $c = 0;
                        foreach ($cats as $cat) {
                            ?>

                        
                        	<li>
                                <input type="checkbox" name="<?php 
                            yiw_option_name($value['id'] . $ext);
                            ?>
[]" value="<?php 
                            echo $cat->cat_ID;
                            ?>
" <?php 
                            checked(in_array($cat->cat_ID, $selected_cats), true);
                            ?>
 id="<?php 
                            yiw_option_id($value['id']);
                            ?>
-<?php 
                            echo $c . $ext;
                            ?>
" />&nbsp;
                                <label for="<?php 
                            yiw_option_id($value['id']);
                            ?>
-<?php 
                            echo $c . $ext;
                            ?>
" class="label-check"><?php 
                            echo $cat->cat_name;
                            ?>
</label>
                            </li>
                        <?php 
                            $c++;
                        }
                        ?>

                        </ul>
                    <?php 
                    }
                    ?>

                	<?php 
                    if ($cols <= 1) {
                        ?>
<small><?php 
                        echo $value['desc'];
                        ?>
</small><?php 
                    }
                    ?>
<div class="clearfix"></div>
                	<?php 
                    echo $fade_color_dep;
                    ?>

                </div>       
                     
                 
                <?php 
                    break;
                    // ================ EXCLUDE PAGES ============
                // ================ EXCLUDE PAGES ============
                case "pag":
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    $pags = get_pages('orderby=name&use_desc_for_title=1&hierarchical=1&style=0&hide_empty=0');
                    $selected_pags = explode(",", yiw_get_option($value['id']));
                    ?>

    			<div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_multi_checkbox<?php 
                    echo $class_dep;
                    ?>
">
    	            <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                    <ul>
                    <?php 
                    $c = 0;
                    ?>

    	            <?php 
                    foreach ($pags as $pag) {
                        ?>

                
    	                <li><input type="checkbox" name="<?php 
                        yiw_option_name($value['id']);
                        ?>
[]" value="<?php 
                        echo $pag->ID;
                        ?>
" <?php 
                        checked(in_array($pag->ID, $selected_pag), true);
                        ?>
 id="<?php 
                        yiw_option_id($value['id']);
                        ?>
-<?php 
                        echo $c;
                        ?>
" />&nbsp;
                        <label for="<?php 
                        yiw_option_id($value['id']);
                        ?>
-<?php 
                        echo $c;
                        ?>
" class="label-check"><?php 
                        echo $pag->post_title;
                        ?>
</label></li>
    	            <?php 
                        $c++;
                    }
                    ?>
		
                    </ul>
                	<small><?php 
                    echo $value['desc'];
                    ?>
</small><div class="clearfix"></div>
                	<?php 
                    echo $fade_color_dep;
                    ?>

                </div>      
                     
                             
                <?php 
                    break;
                    // ================== UPLOAD =====================
                // ================== UPLOAD =====================
                case 'upload':
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    $url_image = yiw_get_option($value['id']);
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_text rm_upload<?php 
                    echo $class_dep;
                    ?>
">
                        <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        <div style="float:left; width:280px">    
                            <input type="text" name="<?php 
                    yiw_option_name($value['id']);
                    ?>
" id="<?php 
                    yiw_option_id($value['id']);
                    ?>
" value="<?php 
                    echo $url_image;
                    ?>
" />     
							<input type="button" value="<?php 
                    _e('Upload Image', 'yiw');
                    ?>
" id="<?php 
                    yiw_option_id($value['id']);
                    ?>
-button" />
                        </div>
                        <small><?php 
                    echo $value['desc'];
                    ?>
</small><div class="clearfix"></div>
                    
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                	</div>      
                     
                <?php 
                    break;
                    // ================== COLOR-PICKER =====================
                // ================== COLOR-PICKER =====================
                case 'color-picker':
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_color<?php 
                    echo $class_dep;
                    ?>
">                                                   
                        <div class="double">    
                            <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                            <input name="<?php 
                    yiw_option_name($value['id']);
                    ?>
" id="<?php 
                    yiw_option_id($value['id']);
                    ?>
" type="text" value="<?php 
                    echo trim(stripslashes_deep(yiw_get_option($value['id'], $value['std'])));
                    ?>
" />
                            &nbsp;<img src="<?php 
                    echo yiw_panel_url();
                    ?>
/include/images/color_picker.png" alt="Color Picker" class="colorpicker-icon" /><br/>          
                            <div class="clearfix"></div>
                        </div>                                      
                        <small><?php 
                    echo $value['desc'];
                    ?>
</small><div class="clearfix"></div>
                        <div class="colorpicker"></div>
                        <div class="clearfix"></div>
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                	</div>     
                     
                <?php 
                    break;
                    // ================== TABLE SIDEBAR =====================
                // ================== TABLE SIDEBAR =====================
                case 'sidebar-table':
                    $i = 0;
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_sidebar<?php 
                    echo $class_dep;
                    ?>
"> 
                        <label><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        
                        <?php 
                    $sidebars = yiw_get_option($value['values']);
                    if (!is_array($sidebars)) {
                        $sidebars = unserialize($sidebars);
                    }
                    ?>

                        
						<table class="cc-options">
    						<tbody>                       
                                                                                 
                        	<?php 
                    if (is_array($sidebars) and !empty($sidebars)) {
                        ?>

                        		
								<?php 
                        foreach ($sidebars as $id => $sidebar) {
                            ?>

								<tr>
						            <td>                                          
							            <div class="delete-btn"><a href="?page=<?php 
                            echo $_GET['page'];
                            ?>
&tab=<?php 
                            echo $current_tab;
                            ?>
&action=delete&<?php 
                            echo $value['values'];
                            ?>
=<?php 
                            echo $id;
                            ?>
&key=values" title="<?php 
                            _e('Delete', 'yiw');
                            ?>
"><img src="<?php 
                            echo yiw_panel_url();
                            ?>
/include/images/close_16.png" alt="<?php 
                            _e('Delete', 'yiw');
                            ?>
" /></a></div>
							            <div class="name"><?php 
                            echo $sidebar;
                            ?>
</div>
							            <div class="loading-icon"><img alt="" src="<?php 
                            bloginfo('siteurl');
                            ?>
/wp-admin/images/wpspin_light.gif" style="display: none;" class="waiting"></div>
						            </td>
						        </tr>                                  
						        <?php 
                        }
                        ?>
 
						
							<?php 
                    } else {
                        ?>

								
								<tr><td><?php 
                        _e(sprintf('No %s created!', strtolower($value['label'][1])));
                        ?>
</td></tr>
						
							<?php 
                    }
                    ?>

					                                              
					        </tbody>
						</table>
						          
                        <small><?php 
                    echo $value['desc'];
                    ?>
</small><div class="clearfix"></div>
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                	</div>       
                     
                <?php 
                    break;
                    // ================== TABLE FEATURES TAB =====================
                // ================== TABLE FEATURES TAB =====================
                case 'featurestab-table':
                    $i = 0;
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_sidebar<?php 
                    echo $class_dep;
                    ?>
"> 
                        <label><?php 
                    echo $value['name'];
                    ?>
</label>
                        
                        <?php 
                    $sidebars = yiw_get_option($value['values']);
                    if (!is_array($sidebars)) {
                        $sidebars = unserialize($sidebars);
                    }
                    ?>

                        
						<table class="cc-options">
    						<tbody>                       
                                                                                 
                        	<?php 
                    if (is_array($sidebars) and !empty($sidebars)) {
                        ?>

                        		
								<?php 
                        foreach ($sidebars as $id => $sidebar) {
                            ?>

								<tr>
						            <td>                                          
							            <div class="delete-btn"><a href="?page=<?php 
                            echo $_GET['page'];
                            ?>
&tab=<?php 
                            echo $current_tab;
                            ?>
&action=delete&<?php 
                            echo $value['values'];
                            ?>
=<?php 
                            echo $id;
                            ?>
&key=values" title="<?php 
                            _e('Delete', 'yiw');
                            ?>
"><img src="<?php 
                            echo yiw_panel_url();
                            ?>
/include/images/close_16.png" alt="<?php 
                            _e('Delete', 'yiw');
                            ?>
" /></a></div>
							            <div class="name"><?php 
                            echo $sidebar;
                            ?>
</div>
                                        <div class="name" style="font-size: 11px;width:auto;"><?php 
                            echo '[features_tab name="', $sidebar, '" open="1"]';
                            ?>
</div>
							            <div class="loading-icon"><img alt="" src="<?php 
                            bloginfo('siteurl');
                            ?>
/wp-admin/images/wpspin_light.gif" style="display: none;" class="waiting"></div>
						            </td>
						        </tr>                                  
						        <?php 
                        }
                        ?>
 
						
							<?php 
                    } else {
                        ?>

								
								<tr><td><?php 
                        _e(sprintf('No %s created!', strtolower($value['label'][1])));
                        ?>
</td></tr>
						
							<?php 
                    }
                    ?>

					                                              
					        </tbody>
						</table>
						          
                        <small><?php 
                    echo $value['desc'];
                    ?>
</small><div class="clearfix"></div>
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                	</div>       
                     
                <?php 
                    break;
                    // ================== TABLE-SLIDES =====================
                // ================== TABLE-SLIDES =====================
                case 'slides-table':
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    $value_array = yiw_get_option($value['id']);
                    if ($value_array and !is_array($value_array)) {
                        $value_array = yiw_subval_sort(unserialize($value_array), 'order');
                    }
                    if (!$value_array) {
                        $value_array = array();
                    }
                    //echo '<pre>';
                    //print_r( yiw_cleanArray($value_array) );
                    //echo '</pre>';
                    array_push($value_array, array());
                    $configs = explode(',', str_replace(" ", "", $value['config']));
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_slides<?php 
                    echo $class_dep;
                    ?>
">        
						<ul id="SlideShow">
							
							<?php 
                    foreach ($value_array as $id => $field) {
                        ?>

							<li class="isSortable slide-item noNesting">
								<div class="sortItem">              
									<table width="100%" cellspacing="0" cellpadding="3">
										<tbody>
											<tr>
												<td class="handle">
													<br/>
													&nbsp;<strong><?php 
                        _e('Order', 'yiw');
                        ?>
:</strong>
													<input type="text" name="<?php 
                        yiw_option_name($value['id']);
                        ?>
[<?php 
                        echo $id;
                        ?>
][order]" class="item_order_value" value="<?php 
                        echo $id;
                        ?>
" />
													<div></div>
												</td>
												<td>  
													<?php 
                        if (isset($field['content_type']) and in_array('video', $configs) and $field['content_type'] == 'video') {
                            ?>
                                                      
													<div class="ss-ImageSample"><img src="<?php 
                            echo get_template_directory_uri();
                            ?>
/core/theme-options/include/images/video-preview.png" /></div>
													<?php 
                        } else {
                            ?>
                      
													<img class="ss-ImageSample" src="<?php 
                            echo isset($field['image_url']) ? $field['image_url'] : '';
                            ?>
">
													<?php 
                        }
                        ?>

													<table width="100%" cellspacing="5" cellpadding="0">
														<tbody>
															<?php 
                        foreach ($configs as $config) {
                            switch (trim($config)) {
                                case 'title':
                                    ?>

															<tr>
																<td colspan="4">&nbsp;<strong><?php 
                                    _e('Slide Title', 'yiw');
                                    ?>
:</strong><br> 
																	<input type="text" value="<?php 
                                    echo isset($field['slide_title']) ? stripslashes($field['slide_title']) : '';
                                    ?>
" alt="<?php 
                                    _e('Slide Title', 'yiw');
                                    ?>
" class="ss-ImageTitle" name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][slide_title]">
																</td>
															</tr>
															<?php 
                                    break;
                                case 'caption':
                                    ?>

															<tr>
																<td colspan="4">&nbsp;<strong><?php 
                                    _e('Tooltip Content', 'yiw');
                                    ?>
</strong> <em class="small">(<?php 
                                    _e('HTML Tags allowed', 'yiw');
                                    ?>
)</em><br>
																	<textarea alt="<?php 
                                    _e('Tooltip Content', 'yiw');
                                    ?>
" class="ss-ImageDesc" name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][tooltip_content]" type="text"><?php 
                                    echo isset($field['tooltip_content']) ? stripslashes($field['tooltip_content']) : '';
                                    ?>
</textarea>
																</td>
															</tr>                                   
															<?php 
                                    break;
                                case 'image-position':
                                    ?>

                                                            <tr>
                                                                <td colspan="4">&nbsp;<strong><?php 
                                    _e('Image position', 'yiw');
                                    ?>
</strong> <em class="small">(<?php 
                                    _e('Values must be expressed in pixels', 'yiw');
                                    ?>
)</em><br />
                                                                    <div class="positions">
                                                                        <div class="position-top position"><label><strong><?php 
                                    _e('Top', 'yiw');
                                    ?>
</strong><br /><input type="text" name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][slide_image_position_top]" value="<?php 
                                    echo isset($field['slide_image_position_top']) ? $field['slide_image_position_top'] : '';
                                    ?>
" /></label></div>
                                                                        <div class="position-left position"><label><strong><?php 
                                    _e('Left', 'yiw');
                                    ?>
</strong><br /><input type="text" name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][slide_image_position_left]" value="<?php 
                                    echo isset($field['slide_image_position_left']) ? $field['slide_image_position_left'] : '';
                                    ?>
" /></label></div>
                                                                        <div class="position-right position"><label><strong><?php 
                                    _e('Right', 'yiw');
                                    ?>
</strong><br /><input type="text" name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][slide_image_position_right]" value="<?php 
                                    echo isset($field['slide_image_position_right']) ? $field['slide_image_position_right'] : '';
                                    ?>
" /></label></div>
                                                                        <div class="position-bottom position"><label><strong><?php 
                                    _e('Bottom', 'yiw');
                                    ?>
</strong><br /><input type="text" name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][slide_image_position_bottom]" value="<?php 
                                    echo isset($field['slide_image_position_bottom']) ? $field['slide_image_position_bottom'] : '';
                                    ?>
" /></label></div>
                                                                    </div>
                                                                </td>
                                                            </tr>                                   
                                                            <?php 
                                    break;
                                case 'text-position':
                                    ?>

                                                            <tr>
                                                                <td colspan="4">&nbsp;<strong><?php 
                                    _e('Text position', 'yiw');
                                    ?>
</strong> <em class="small">(<?php 
                                    _e('Values must be expressed in pixels', 'yiw');
                                    ?>
)</em><br />
                                                                    <div class="positions">
                                                                        <div class="position-top position"><label><strong><?php 
                                    _e('Top', 'yiw');
                                    ?>
</strong><br /><input type="text" name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][slide_text_position_top]" value="<?php 
                                    echo isset($field['slide_text_position_top']) ? $field['slide_text_position_top'] : '';
                                    ?>
" /></label></div>
                                                                        <div class="position-left position"><label><strong><?php 
                                    _e('Left', 'yiw');
                                    ?>
</strong><br /><input type="text" name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][slide_text_position_left]" value="<?php 
                                    echo isset($field['slide_text_position_left']) ? $field['slide_text_position_left'] : '';
                                    ?>
" /></label></div>
                                                                        <div class="position-right position"><label><strong><?php 
                                    _e('Right', 'yiw');
                                    ?>
</strong><br /><input type="text" name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][slide_text_position_right]" value="<?php 
                                    echo isset($field['slide_text_position_right']) ? $field['slide_text_position_right'] : '';
                                    ?>
" /></label></div>
                                                                        <div class="position-bottom position"><label><strong><?php 
                                    _e('Bottom', 'yiw');
                                    ?>
</strong><br /><input type="text" name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][slide_text_position_bottom]" value="<?php 
                                    echo isset($field['slide_text_position_bottom']) ? $field['slide_text_position_bottom'] : '';
                                    ?>
" /></label></div>
                                                                    </div>
                                                                </td>
                                                            </tr>                                   
                                                            <?php 
                                    break;
                                case 'color-picker':
                                    ?>

                                                            <tr>
                                                                <td colspan="4">
                                                                    <div class="rm_option rm_input rm_color">
                                                                        <div class="double">
                                                                            <label for="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][background_color]"><strong>Background color</strong></label>
                                                                            <input name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][background_color]" id="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][background_color]" type="text" value="<?php 
                                    if (isset($field['background_color'])) {
                                        echo trim(stripslashes_deep($field['background_color']));
                                    }
                                    ?>
" />
                                                                            &nbsp;<img src="<?php 
                                    echo yiw_panel_url();
                                    ?>
/include/images/color_picker.png" alt="Color Picker" class="colorpicker-icon" /><br/>
                                                                            <div class="clearfix"></div>
                                                                        </div>
                                                                        <small>This background color should be used when the image uploaded is smaller than 1920px</small><div class="clearfix"></div>
                                                                        <div class="colorpicker"></div>
                                                                        <div class="clearfix"></div>
                                                                    </div>
                                                                </td>
                                                            </tr>
                                                            <?php 
                                    break;
                                case 'image':
                                    ?>

															<tr>
																<td align="left" colspan="3" class="rm_upload">
																	<label style="color:#333;float:none;display:inline;line-height:1em;">  
																		&nbsp;<input type="radio" name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][content_type]" id="<?php 
                                    yiw_option_id($value['id']);
                                    ?>
-contentimage-<?php 
                                    echo $id;
                                    ?>
" value="image"<?php 
                                    if (!isset($field['content_type']) or ($field['content_type'] == '' or $field['content_type'] == 'image')) {
                                        ?>
 checked=""<?php 
                                    }
                                    ?>
 /> 
																		<strong><?php 
                                    _e('Image URL', 'yiw');
                                    ?>
:</strong>
																	</label><br>
																	<input type="text" alt="<?php 
                                    _e('Image URL', 'yiw');
                                    ?>
" class="ss-Image" name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][image_url]" value="<?php 
                                    echo isset($field['image_url']) ? $field['image_url'] : '';
                                    ?>
" rel="<?php 
                                    yiw_option_id($value['id']);
                                    ?>
-contentimage-<?php 
                                    echo $id;
                                    ?>
" />
																	<input type="button" class="button-secondary" value="<?php 
                                    _e('Upload Image', 'yiw');
                                    ?>
" id="<?php 
                                    yiw_option_id($value['id']);
                                    ?>
-upload" />
																	<input type="hidden" name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][image_id]" value="<?php 
                                    echo isset($field['image_id']) ? $field['image_id'] : '';
                                    ?>
" class="idattachment" />
																</td>
															</tr>              
															<?php 
                                    break;
                                case 'video':
                                    ?>

															<tr>
																<td align="left" colspan="3">
																	<label style="color:#333;float:none;display:inline;line-height:1em;">  
																		&nbsp;<input type="radio" name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][content_type]" id="<?php 
                                    yiw_option_id($value['id']);
                                    ?>
-contentvideo-<?php 
                                    echo $id;
                                    ?>
" value="video"<?php 
                                    if (isset($field['content_type']) && $field['content_type'] == 'video') {
                                        ?>
 checked=""<?php 
                                    }
                                    ?>
 /> 
																		<strong><?php 
                                    _e('URL Video', 'yiw');
                                    ?>
:</strong>
																	</label>
																	<em class="small">(<?php 
                                    _e('url by Youtube or Vimeo', 'yiw');
                                    ?>
)</em><br>
																	<input type="text" alt="<?php 
                                    _e('URL Video', 'yiw');
                                    ?>
" name="<?php 
                                    yiw_option_name($value['id']);
                                    ?>
[<?php 
                                    echo $id;
                                    ?>
][url_video]" value="<?php 
                                    if (isset($field['url_video'])) {
                                        echo stripslashes_deep($field['url_video']);
                                    }
                                    ?>
" rel="<?php 
                                    yiw_option_id($value['id']);
                                    ?>
-contentvideo-<?php 
                                    echo $id;
                                    ?>
" />
																</td>
															</tr>              
															<?php 
                                    break;
                                default:
                                    do_action('yiw_slider_config_' . $config, $value, $id, $field);
                            }
                        }
                        ?>
                
															<tr>
																<td colspan="2" align="left" style="white-space: nowrap;">  
																	<?php 
                        if (in_array('link', $configs)) {
                            ?>

																	<br/>
																	<label style="color:#333">&nbsp;<strong><?php 
                            _e('Slide Link', 'yiw');
                            ?>
:</strong></label>
																	
																	<?php 
                            $types = array('page' => __('page', 'yiw'), 'category' => __('category', 'yiw'), 'url' => __('url', 'yiw'), 'none' => __('none', 'yiw'));
                            ?>

																	
																	<?php 
                            $check = FALSE;
                            foreach ($types as $type => $title_type) {
                                if ((isset($field['link_type']) and $field['link_type'] == $type or $type == 'none') and !$check) {
                                    $checked_class = 'checked ';
                                    $checked = 'checked ';
                                    $check = TRUE;
                                } else {
                                    $checked_class = '';
                                    $checked = '';
                                }
                                ?>

																	<label class="<?php 
                                echo $checked_class;
                                ?>
radioLink">
																		<input type="radio" value="<?php 
                                echo $type;
                                ?>
" id="<?php 
                                yiw_option_id($value['id'] . '-' . $id . '-' . $type);
                                ?>
" name="<?php 
                                yiw_option_name($value['id']);
                                ?>
[<?php 
                                echo $id;
                                ?>
][link_type]" <?php 
                                echo $checked;
                                ?>
/>&nbsp;<?php 
                                echo ucfirst($title_type);
                                ?>

																	</label>
																	<?php 
                            }
                            ?>

																	
																	<?php 
                            foreach ($types as $type => $title_type) {
                                if (isset($field['link_type']) and $field['link_type'] == $type) {
                                    $checked = 'style="display: block;" ';
                                } else {
                                    $checked = '';
                                }
                                switch ($type) {
                                    case 'page':
                                        ?>
		
																	<?php 
                                        $pags = get_pages('orderby=name&use_desc_for_title=1&hierarchical=1&style=0&hide_empty=0');
                                        ?>
					
																	<select <?php 
                                        echo $checked;
                                        ?>
name="<?php 
                                        yiw_option_name($value['id']);
                                        ?>
[<?php 
                                        echo $id;
                                        ?>
][link_page]" class="ss-Link <?php 
                                        echo $type;
                                        ?>
">
																		<option value=""><?php 
                                        _e('Choose a page...', 'yiw');
                                        ?>
</option>
																		<?php 
                                        foreach ($pags as $page) {
                                            if (!isset($field['link_page'])) {
                                                $field['link_page'] = false;
                                            }
                                            ?>

																		<option value="<?php 
                                            echo $page->ID;
                                            ?>
"<?php 
                                            selected($page->ID, $field['link_page']);
                                            ?>
><?php 
                                            echo $page->post_title;
                                            ?>
</option>
																		<?php 
                                        }
                                        ?>

																	</select>
																	<?php 
                                        break;
                                        ?>

																	
																	<?php 
                                    case 'category':
                                        ?>

																	<select <?php 
                                        echo $checked;
                                        ?>
name="<?php 
                                        yiw_option_name($value['id']);
                                        ?>
[<?php 
                                        echo $id;
                                        ?>
][link_category]" class="ss-Link <?php 
                                        echo $type;
                                        ?>
">
																		<?php 
                                        foreach ($GLOBALS['wp_cats'] as $slug => $cat) {
                                            if (!isset($field['link_category'])) {
                                                $field['link_category'] = false;
                                            }
                                            ?>

																		<option value="<?php 
                                            echo $slug;
                                            ?>
"<?php 
                                            selected($slug, $field['link_category']);
                                            ?>
><?php 
                                            echo $cat;
                                            ?>
</option>
																		<?php 
                                        }
                                        ?>

																	</select>			
																	<?php 
                                        break;
                                        ?>

																	
																	<?php 
                                    case 'url':
                                        ?>
											
																	<input type="text" <?php 
                                        echo $checked;
                                        ?>
class="ss-Link <?php 
                                        echo $type;
                                        ?>
" value="<?php 
                                        echo isset($field['link_url']) ? $field['link_url'] : '';
                                        ?>
" name="<?php 
                                        yiw_option_name($value['id']);
                                        ?>
[<?php 
                                        echo $id;
                                        ?>
][link_url]" />
																	<?php 
                                        break;
                                        ?>

																	
																	<?php 
                                }
                            }
                            ?>
  
																<?php 
                        }
                        ?>
     
                                                                <?php 
                        if (in_array('tooltip', $configs)) {
                            ?>

        														<tr>
        															<td colspan="4">&nbsp;<strong><?php 
                            _e('Extra Tooltip', 'yiw');
                            ?>
</strong> <br/><em class="small">(<?php 
                            _e('The tooltip that you can add inside the image. Leave empty the content to not use', 'yiw');
                            ?>
)</em><br>
        																<textarea alt="<?php 
                            _e('Extra Tooltip', 'yiw');
                            ?>
" class="ss-ImageDesc" name="<?php 
                            yiw_option_name($value['id']);
                            ?>
[<?php 
                            echo $id;
                            ?>
][extra_tooltip_content]" type="text"><?php 
                            echo isset($field['extra_tooltip_content']) ? stripslashes($field['extra_tooltip_content']) : '';
                            ?>
</textarea>
        															    <br/><strong>Image</strong>: <input type="text" name="<?php 
                            yiw_option_name($value['id']);
                            ?>
[<?php 
                            echo $id;
                            ?>
][extra_tooltip_image]" value="<?php 
                            echo isset($field['extra_tooltip_image']) ? stripslashes($field['extra_tooltip_image']) : '';
                            ?>
" style="width:194px;">
        															    <input type="button" class="upload-button button-secondary" value="Upload Image" />
                                                                        <br/><strong>URL</strong>: <input type="text" name="<?php 
                            yiw_option_name($value['id']);
                            ?>
[<?php 
                            echo $id;
                            ?>
][extra_tooltip_url]" value="<?php 
                            echo isset($field['extra_tooltip_url']) ? stripslashes($field['extra_tooltip_url']) : '';
                            ?>
" style="width:306px;">
        															    <strong>Coords</strong>: x <input type="text" name="<?php 
                            yiw_option_name($value['id']);
                            ?>
[<?php 
                            echo $id;
                            ?>
][extra_tooltip_x_pos]" value="<?php 
                            echo isset($field['extra_tooltip_x_pos']) ? stripslashes($field['extra_tooltip_x_pos']) : '';
                            ?>
" style="width:40px;">
        															    y <input type="text" name="<?php 
                            yiw_option_name($value['id']);
                            ?>
[<?php 
                            echo $id;
                            ?>
][extra_tooltip_y_pos]" value="<?php 
                            echo isset($field['extra_tooltip_y_pos']) ? stripslashes($field['extra_tooltip_y_pos']) : '';
                            ?>
" style="width:40px;">
                                                                    </td>
        														</tr>                                   
        														<?php 
                        }
                        ?>
    
																</td>
																<td width="90" align="center" class="delete-button">
																	<div class="button-secondary delete-item"><a href="?page=<?php 
                        echo $_GET['page'];
                        ?>
&tab=<?php 
                        echo $current_tab;
                        ?>
&action=delete&<?php 
                        echo $value['id'];
                        ?>
=<?php 
                        echo $id;
                        ?>
&key=id"><?php 
                        _e('Delete', 'yiw');
                        ?>
</a></div>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</li>           
							<?php 
                    }
                    ?>

										
						</ul>            
						<p>
							<input class="button-secondary add-slide-button hide-if-no-js" type="button" value="<?php 
                    _e('Add Slide', 'yiw');
                    ?>
" />
							<input class="button-secondary hide-if-js" type="submit" value="<?php 
                    _e('Add/Edit Slide', 'yiw');
                    ?>
" />
							<a href="?page=<?php 
                    echo $_GET['page'];
                    ?>
&tab=<?php 
                    echo $current_tab;
                    ?>
&action=delete&id=<?php 
                    echo $value['id'];
                    ?>
" class="button-secondary"><?php 
                    _e('Delete all slides', 'yiw');
                    ?>
</a>
						</p>
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                	</div>     
                	
                	<script type="text/javascript">
                		jQuery(document).ready(function($){
							
							$('#<?php 
                    echo $value['id'];
                    ?>
-option .add-slide-button').click(function(){   
								var empty_slide = $('#SlideShow li:last-child').clone(); 
								var last_index = parseInt( $('#SlideShow li:last-child input[name*="[order]"]').val() );
								//alert(last_index);
								
								// empty all inputs
								$('input:not(input[name*="[order]"], input[type="button"], input[type="checkbox"], input[type="radio"]), textarea', empty_slide).val('');
								// change the id of the inputs name
								var pattern_inputs = /\[(\d+)\]/;
								$('input[name*="<?php 
                    yiw_option_name($value['id']);
                    ?>
"], textarea[name*="<?php 
                    yiw_option_name($value['id']);
                    ?>
"], select[name*="<?php 
                    yiw_option_name($value['id']);
                    ?>
"]', empty_slide).each(function(){
									var name = $(this).attr('name');
									var name_match = name.match( pattern_inputs );
									var new_name = name.replace(pattern_inputs, "["+(parseInt(name_match[1])+1)+"]");
									$(this).attr('name', new_name);
								});
								// delete preview image
								$('.ss-ImageSample', empty_slide).attr('src', '');
								
								empty_slide.appendTo('#SlideShow');
								$('#SlideShow li:last-child input[name*="[order]"]').val(last_index+1);
								
								return false;
							});	
						});
                	</script>
                     
                <?php 
                    break;
                    // ================== TABLE CONTACT =====================
                // ================== TABLE CONTACT =====================
                case 'contact-table':
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    $contact_form = yiw_get_option('contact_form_choosen');
                    $fields = maybe_unserialize(yiw_get_option($value['id']));
                    //echo '<pre>', print_r($fields), '</pre>';
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_contact<?php 
                    echo $class_dep;
                    ?>
">
					
						<p>
							<a href="<?php 
                    echo yiw_panel_url();
                    ?>
/include/contact_add.php?id=<?php 
                    echo $value['id'];
                    ?>
&action=new-field&page=<?php 
                    echo $_GET['page'];
                    ?>
&tab=<?php 
                    echo $current_tab;
                    ?>
&TB_iframe=true" class="button-primary thickbox">Add field</a>
						</p> 
                    
					    <table class="wp-list-table widefat fixed posts" cellpadding="0">
					    	<thead>
					    		<tr>                                                     
					    			<th scope="col" class="name-field"><?php 
                    _e('Field Title', 'yiw');
                    ?>
</th>
					    			<th scope="col" class="info-field"><?php 
                    _e('Data Name', 'yiw');
                    ?>
</th>
					    			<th scope="col" class="info-field"><?php 
                    _e('Required', 'yiw');
                    ?>
</th>
					    			<th scope="col"><?php 
                    _e('Type', 'yiw');
                    ?>
</th>      
					    			<th scope="col" class="controls-field">&nbsp;</th>
								</tr>	
					    	</thead>
					    	<tbody>
					    	
							<?php 
                    if (!empty($fields)) {
                        ?>
	
					    		<?php 
                        foreach ($fields as $id => $field) {
                            ?>

								<tr<?php 
                            if ($id % 2) {
                                echo ' class="alternate"';
                            }
                            ?>
 valign="top">             
					    			<th class="name-field" scope="row"><?php 
                            echo stripslashes_deep($field['title']);
                            ?>
</th>
					    			<td class="info-field"><?php 
                            echo stripslashes_deep($field['data_name']);
                            ?>
</td>
					    			<td class="info-field"><?php 
                            echo (isset($field['required']) and $field['required'] == 'yes') ? __('Yes', 'yiw') : __('No', 'yiw');
                            ?>
</td>
					    			<td><?php 
                            echo $field['type'];
                            ?>
</td>
					    			<td class="controls-field">      
										<span class="items-ord">                          
											<?php 
                            if ($id != 0) {
                                ?>

											<a href="?page=<?php 
                                echo $_GET['page'];
                                ?>
&tab=<?php 
                                echo $current_tab;
                                ?>
&action=array-ord&id=<?php 
                                echo $value['id'];
                                ?>
&dir=up&from=<?php 
                                echo $id;
                                ?>
" class="item-move-up"><abbr title="<?php 
                                _e('Move up', 'yiw');
                                ?>
">&#8593;</abbr></a>   
											<?php 
                            } else {
                                ?>

											&nbsp;
											<?php 
                            }
                            ?>
 
											|                                     
											<?php 
                            if ($id != count($fields) - 1) {
                                ?>

											<a href="?page=<?php 
                                echo $_GET['page'];
                                ?>
&tab=<?php 
                                echo $current_tab;
                                ?>
&action=array-ord&id=<?php 
                                echo $value['id'];
                                ?>
&dir=down&from=<?php 
                                echo $id;
                                ?>
" class="item-move-down"><abbr title="<?php 
                                _e('Move down', 'yiw');
                                ?>
">&#8595;</abbr></a>   
											<?php 
                            } else {
                                ?>

											&nbsp;
											<?php 
                            }
                            ?>
                                                                 
										</span>
										<a href="<?php 
                            echo yiw_panel_url();
                            ?>
/include/contact_add.php?page=<?php 
                            echo $_GET['page'];
                            ?>
&tab=<?php 
                            echo $current_tab;
                            ?>
&id=<?php 
                            echo $value['id'];
                            ?>
&c=<?php 
                            echo $id;
                            ?>
&action=edit-field&TB_iframe=true" title="<?php 
                            _e('Edit', 'yiw');
                            ?>
" class="button-primary thickbox"><?php 
                            _e('Edit', 'yiw');
                            ?>
</a>
										<a href="?page=<?php 
                            echo $_GET['page'];
                            ?>
&tab=<?php 
                            echo $current_tab;
                            ?>
&action=delete&key=id&<?php 
                            echo $value['id'];
                            ?>
=<?php 
                            echo $id;
                            ?>
&TB_iframe=true" title="<?php 
                            _e('Delete', 'yiw');
                            ?>
" class="button-secondary"><?php 
                            _e('Delete', 'yiw');
                            ?>
</a>
									</td>
					    		</tr>
					    		<?php 
                        }
                        ?>

					    	<?php 
                    } else {
                        ?>

					    		<tr>
					    			<td colspan="4"><?php 
                        _e('No fields created yet.', 'yiw');
                        ?>
</td>
					    		</tr>
					    	<?php 
                    }
                    ?>

					    		
					    	</tbody>
						</table>              
						    
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                	</div>    
                     
                <?php 
                    break;
                    // ================== FONTS SELECT =====================
                // ================== FONTS SELECT =====================
                case 'font-select':
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    $types = array('cufon' => 'Cufon', 'google-font' => 'Google Fonts', 'web-fonts' => 'Web Fonts Family');
                    $font_option = maybe_unserialize(yiw_get_option($value['id'], serialize($value['std'])));
                    $font_type_selected = $font_option['type'];
                    $font_selected = stripslashes($font_option[$font_type_selected]);
                    $type_allowed = explode(',', $value['font-types']);
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_select<?php 
                    echo $class_dep;
                    ?>
">
                        <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
_type"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        
                        <div style="float:left; width:280px">                                
                            <select class="font-type-select" name="<?php 
                    yiw_option_name($value['id']);
                    ?>
[type]" id="<?php 
                    yiw_option_id($value['id']);
                    ?>
_type">
                                <?php 
                    foreach ($type_allowed as $id_type) {
                        ?>

                                    <option value="<?php 
                        echo $id_type;
                        ?>
" <?php 
                        selected($font_type_selected, $id_type);
                        ?>
><?php 
                        echo $types[$id_type];
                        ?>
</option>
                                <?php 
                    }
                    ?>

                            </select>  
                            
                            <br/>
                            
                            <select name="<?php 
                    yiw_option_name($value['id']);
                    ?>
[cufon]" class="font cufon">
                                <?php 
                    echo str_replace("<option value=\"{$font_selected}\">", "<option value=\"{$font_selected}\" selected=\"selected\">", $cufonfont_html);
                    ?>

                            </select> 
                            
                            <select name="<?php 
                    yiw_option_name($value['id']);
                    ?>
[google-font]" class="font google-font">
                                <?php 
                    echo str_replace("<option value=\"{$font_selected}\">", "<option value=\"{$font_selected}\" selected=\"selected\">", $googlefont_html);
                    ?>

                            </select>    
                            
                            <select name="<?php 
                    yiw_option_name($value['id']);
                    ?>
[web-fonts]" class="font web-fonts">
                                <?php 
                    echo str_replace("<option value=\"{$font_selected}\">", "<option value=\"{$font_selected}\" selected=\"selected\">", $webfont_html);
                    ?>

                            </select>                            
                        </div>    
                        
                        <small><?php 
                    echo $value['desc'];
                    ?>
</small>
                        <div class="clearfix"></div>
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                        <div style="padding-top: 25px;text-align: center;height:35px;" class="preview-text-wrapper"><input style="background-color: transparent;border: none;font-size:24px;text-align: center;width:100%;" type="text" class="font-example-text-input" value="<?php 
                    _e($value['name'], 'yiw');
                    ?>
" /></span></div>
                    	
                    	<script type="text/javascript">
                    	   jQuery(document).ready(function($){
                                var this_option = $('#<?php 
                    echo $value['id'];
                    ?>
-option'); 
                                
                                $('.font', this_option).hide();
                                $('.' + $('.font-type-select', this_option).val(), this_option).show();
                                
                                $( '.font-type-select', this_option ).change(function(){
                                    var value = $(this).val();              
                                    $('.font', this_option).hide();
                                    $('.'+value, this_option).show();
                                });
                                
                                if( '<?php 
                    echo $font_type_selected;
                    ?>
' == 'google-font' ) {
                                    WebFontConfig = {
                                        google: { families: [ "<?php 
                    echo $font_selected;
                    ?>
" ] }
                                    };
                                    (function() {
                                        var wf = document.createElement('script');
                                        wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
                                            '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
                                        wf.type = 'text/javascript';
                                        wf.async = 'true';
                                        var s = document.getElementsByTagName('script')[0];
                                        s.parentNode.insertBefore(wf, s);
                                    })();
                                }
                                
                                $( '.font-example-text-input', this_option ).css({
                                    fontFamily : "<?php 
                    echo $font_selected;
                    ?>
"
                                });          
                                
                                $( '.cufon, .font-type-select', this_option ).change( function() {   
                                    var thisEl = $(this);
                                    var fontValue = $(this).val();
                                    if ( thisEl.hasClass('font-type-select') ) {
                                        if ( thisEl.val() != 'cufon' )
                                            return;
                                        thisEl = $( '.' + $(this).val() );
                                        fontValue = $('option:first-child', thisEl).attr('value');
                                    }
                                    
                                    var load_url = '<?php 
                    echo get_template_directory_uri();
                    ?>
/core/theme-options/include/cufon-example-loader.php?font=' + fontValue;
                                                                                    
                                    $( '.write-font-example-iframe', this_option ).remove();
                                    $( '.preview-text-wrapper', this_option ).append( '<iframe class="write-font-example-iframe" src="'+load_url+'" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>' );
                                    $( '.font-example-text-input', this_option ).hide();
                                });
                                
                                $('.google-font, .font-type-select', this_option ).change( function() {
                                    var thisEl = $(this);         
                                    var fontValue = $(this).val();
                                    if ( thisEl.hasClass('font-type-select') ) {
                                        if ( thisEl.val() != 'google-font' )
                                            return;
                                        thisEl = $( '.' + $(this).val() );    
                                        fontValue = $('option:first-child', thisEl).attr('value');
                                    }
                                    WebFontConfig = {
                                        google: { families: [ thisEl.val() ] }
                                    };
                                    (function() {
                                        var wf = document.createElement('script');
                                        wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
                                            '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
                                        wf.type = 'text/javascript';
                                        wf.async = 'true';
                                        var s = document.getElementsByTagName('script')[0];
                                        s.parentNode.insertBefore(wf, s);
                                    })();
                                    
                                    $( '.write-font-example-iframe', this_option ).remove();
                                    $( '.font-example-text-input', this_option ).show().css({
                                        fontFamily : fontValue 
                                    });
                                });
                                
                                $( '.web-fonts, .font-type-select', this_option ).change( function() {    
                                    var thisEl = $(this);           
                                    var fontValue = $(this).val();
                                    if ( thisEl.hasClass('font-type-select') ) {
                                        if ( thisEl.val() != 'web-fonts' )
                                            return;
                                        thisEl = $( '.' + $(this).val() );         
                                        fontValue = $('option:first-child', thisEl).attr('value');
                                    }
                                    $( '.write-font-example-iframe', this_option ).remove();
                                    $( '.font-example-text-input', this_option ).show().css({
                                        fontFamily : fontValue 
                                    });
                                })
                           });
                    	</script>
                    </div>  
                     
                <?php 
                    break;
                    // ================== TABLE CONTACT =====================
                // ================== TABLE CONTACT =====================
                case 'composer':
                    global $yiw_home_sections;
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    $elements = maybe_unserialize(yiw_get_option($value['id'], array()));
                    if (empty($elements)) {
                        $elements = $value['std'];
                    }
                    //yiw_debug($elements);
                    //echo '<pre>', print_r($fields), '</pre>';
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_contact<?php 
                    echo $class_dep;
                    ?>
">
					
						<p>
							<?php 
                    _e('Use this table to compose your home page.', 'yiw');
                    ?>

						</p> 
                    
					    <table class="wp-list-table widefat fixed posts" cellpadding="0">
					    	<thead>
					    		<tr>                                                     
					    			<th scope="col" class="name-field"><?php 
                    _e('Element', 'yiw');
                    ?>
</th>
					    			<th scope="col" class="info-field"><?php 
                    _e('Visibile', 'yiw');
                    ?>
</th>
					    			<th scope="col" class="controls-field">&nbsp;</th>
								</tr>	
					    	</thead>
					    	<tbody>
					    	
							<?php 
                    if (!empty($elements)) {
                        ?>
	
					    		<?php 
                        foreach ($elements as $id => $element) {
                            ?>

								<tr<?php 
                            if ($id % 2) {
                                echo ' class="alternate"';
                            }
                            ?>
 valign="top">             
					    			<th class="name-field" scope="row">
                                        <?php 
                            echo $yiw_home_sections[$element['slug']];
                            ?>

                                        <input type="hidden" name="<?php 
                            yiw_option_name($value['id']);
                            ?>
[<?php 
                            echo $id;
                            ?>
][name]" value="<?php 
                            echo $element['name'];
                            ?>
" />
                                        <input type="hidden" name="<?php 
                            yiw_option_name($value['id']);
                            ?>
[<?php 
                            echo $id;
                            ?>
][slug]" value="<?php 
                            echo $element['slug'];
                            ?>
" />
                                    </th>
					    			<td class="info-field">  
                                        <select name="<?php 
                            yiw_option_name($value['id']);
                            ?>
[<?php 
                            echo $id;
                            ?>
][visible]" style="width:auto;">
                                            <option value="yes"<?php 
                            selected($element['visible'], 'yes');
                            ?>
 style="padding-right:10px;"><?php 
                            _e('Yes', 'yiw');
                            ?>
</option>
                                            <option value="no"<?php 
                            selected($element['visible'], 'no');
                            ?>
 style="padding-right:10px;"><?php 
                            _e('No', 'yiw');
                            ?>
</option>
                                        </select>
                                    </td>
					    			<td class="controls-field">      
										<span class="items-ord">                          
											<?php 
                            if ($id != 0) {
                                ?>

											<a href="?page=<?php 
                                echo $_GET['page'];
                                ?>
&tab=<?php 
                                echo $current_tab;
                                ?>
&action=array-ord&id=<?php 
                                echo $value['id'];
                                ?>
&dir=up&from=<?php 
                                echo $id;
                                ?>
" class="item-move-up"><abbr title="<?php 
                                _e('Move up', 'yiw');
                                ?>
">&#8593;</abbr></a>   
											<?php 
                            } else {
                                ?>

											&nbsp;
											<?php 
                            }
                            ?>
 
											|                                     
											<?php 
                            if ($id != count($elements) - 1) {
                                ?>

											<a href="?page=<?php 
                                echo $_GET['page'];
                                ?>
&tab=<?php 
                                echo $current_tab;
                                ?>
&action=array-ord&id=<?php 
                                echo $value['id'];
                                ?>
&dir=down&from=<?php 
                                echo $id;
                                ?>
" class="item-move-down"><abbr title="<?php 
                                _e('Move down', 'yiw');
                                ?>
">&#8595;</abbr></a>   
											<?php 
                            } else {
                                ?>

											&nbsp;
											<?php 
                            }
                            ?>
                                                                 
										</span>
									</td>
					    		</tr>
					    		<?php 
                        }
                        ?>

					    	<?php 
                    } else {
                        ?>

					    		<tr>
					    			<td colspan="4"><?php 
                        _e('No elements available.', 'yiw');
                        ?>
</td>
					    		</tr>
					    	<?php 
                    }
                    ?>

					    		
					    	</tbody>
						</table>              
						    
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                	</div>    
                     
                <?php 
                    break;
                    // ================== TABLE FEATURES TAB =====================
                // ================== TABLE FEATURES TAB =====================
                case 'featurestab-table':
                    $i = 0;
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    ?>

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_sidebar<?php 
                    echo $class_dep;
                    ?>
"> 
                        <label><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        
                        <?php 
                    $sidebars = yiw_get_option($value['values']);
                    if (!is_array($sidebars)) {
                        $sidebars = unserialize($sidebars);
                    }
                    ?>

                        
						<table class="cc-options">
    						<tbody>                       
                                                                                 
                        	<?php 
                    if (is_array($sidebars) and !empty($sidebars)) {
                        ?>

                        		
								<?php 
                        foreach ($sidebars as $id => $sidebar) {
                            ?>

								<tr>
						            <td>                                          
							            <div class="delete-btn"><a href="?page=<?php 
                            echo $_GET['page'];
                            ?>
&tab=<?php 
                            echo $current_tab;
                            ?>
&action=delete&<?php 
                            echo $value['values'];
                            ?>
=<?php 
                            echo $id;
                            ?>
&key=values" title="<?php 
                            _e('Delete', 'yiw');
                            ?>
"><img src="<?php 
                            echo yiw_panel_url();
                            ?>
/include/images/close_16.png" alt="<?php 
                            _e('Delete', 'yiw');
                            ?>
" /></a></div>
							            <div class="name"><?php 
                            echo $sidebar;
                            ?>
</div>
                                        <div class="name" style="font-size: 11px;width:auto;"><?php 
                            echo '[features_tab name="', $sidebar, '" open="1"]';
                            ?>
</div>
							            <div class="loading-icon"><img alt="" src="<?php 
                            bloginfo('siteurl');
                            ?>
/wp-admin/images/wpspin_light.gif" style="display: none;" class="waiting"></div>
						            </td>
						        </tr>                                  
						        <?php 
                        }
                        ?>
 
						
							<?php 
                    } else {
                        ?>

								
								<tr><td><?php 
                        _e(sprintf('No %s created!', strtolower($value['label'][1])));
                        ?>
</td></tr>
						
							<?php 
                    }
                    ?>

					                                              
					        </tbody>
						</table>
						          
                        <small><?php 
                    echo $value['desc'];
                    ?>
</small><div class="clearfix"></div>
                    	<?php 
                    echo $fade_color_dep;
                    ?>

                	</div>       
                     
                <?php 
                    break;
                    // ================== CONNECTED LIST =====================
                // ================== CONNECTED LIST =====================
                case 'connectedlist':
                    $i = 0;
                    if (isset($value['id'])) {
                        $id_container = 'id="' . $value['id'] . '-option" ';
                    }
                    ?>


                    <div <?php 
                    echo $id_container;
                    ?>
 class="rm_option rm_input rm_text rm_connectedlist <?php 
                    echo $class_dep;
                    ?>
">
                        <div class="option">
                            <label for="<?php 
                    echo $value['id'];
                    ?>
"><?php 
                    echo $value['name'];
                    ?>
</label>

                            <?php 
                    $yit_option = json_decode(stripslashes(yiw_get_option($value['id'])), true);
                    ?>

                            <?php 
                    $value['lists'] = is_array($yit_option) ? $yit_option : $value['lists'];
                    ?>


                            <?php 
                    foreach ($value['lists'] as $list => $options) {
                        ?>

                                <div class="list_container">
                                    <h4><?php 
                        echo $value['heads'][$list];
                        ?>
</h4>
                                    <ul id="list_<?php 
                        echo $list;
                        ?>
" class="connectedSortable" data-list="<?php 
                        echo $list;
                        ?>
">
                                        <?php 
                        foreach ($options as $option => $label) {
                            ?>

                                            <li data-option="<?php 
                            echo $option;
                            ?>
" class="ui-state-default"><?php 
                            echo $label;
                            ?>
</li>
                                        <?php 
                        }
                        ?>

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

                            <input type="hidden" name="<?php 
                    yiw_option_name($value['id']);
                    ?>
" id="<?php 
                    echo $value['id'];
                    ?>
" value='<?php 
                    echo stripslashes(yiw_get_option($value['id']));
                    ?>
' />
                        </div>
                        <div class="description">
                            <?php 
                    echo $value['desc'];
                    ?>

                        </div>
                        <div class="clear"></div>
                    </div>
                   <?php 
                    break;
                    // ================== INCLUDE =====================
                // ================== INCLUDE =====================
                case 'include':
                    if (file_exists($value['file'])) {
                        include $value['file'];
                    }
                    break;
                default:
                    do_action('yiw_panel_type_' . $value['type'], $value);
            }
        }
    }
    ?>

    
    <?php 
    if ($show_form) {
        ?>
                                                                                                             
        <input type="hidden" name="action" value="save" />
        <input type="submit" value="<?php 
        _e('Save changes', 'yiw');
        ?>
" class="button-primary" style="float:left;" />
    </form>
    
    <form method="post">
        <div class="submit">
        	<?php 
        $warning = __('If you continue with this action, you will reset all options are in this page.', 'yiw');
        ?>

            <input name="reset" type="submit" class="button-secondary" value="<?php 
        _e("Reset", 'yiw');
        ?>
" title="<?php 
        echo $warning;
        ?>
" onclick="return confirm('<?php 
        echo $warning . '\\n' . __('Are you sure of it?', 'yiw');
        ?>
');" style="margin-left:10px;" />
            <input type="hidden" name="action" value="reset" />
        </div>
    </form>
    <?php 
    }
    ?>

    
    <div class="clear"></div>
    
    <div style="font-size:9px; margin-bottom:10px;">
        Icons: <a href="http://www.woothemes.com/2009/09/woofunction/">WooFunction</a></div>
    </div> 
    
    <?php 
    if (!empty($deps)) {
        // all deps script
        ?>

    <script type="text/javascript">
    	var deps_options = new Array(); 
    	<?php 
        foreach ($deps as $id => $dep) {
            echo "deps_options[\"{$id}-option\"] = new Array();\n";
            foreach ($dep as $arg => $value) {
                echo "deps_options[\"{$id}-option\"][\"{$arg}\"] = \"{$value}\";\n";
            }
        }
        ?>

    </script>
    <?php 
    }
    ?>

    

<?php 
}
    ?>
">
        
            <div class="internal_page_item internal_page_item_gallery">
                <?php 
    the_post_thumbnail('thumb_gallery', array('class' => 'picture'));
    ?>
                <div class="overlay">                            
                    <h5><a href="<?php 
    the_permalink();
    ?>
"><?php 
    the_title();
    ?>
</a></h5>
                    <?php 
    echo yiw_excerpt(12);
    ?>
                    <div class="controls">
                        <a class="icon-zoom" href="<?php 
    echo $image[0];
    ?>
" rel="prettyPhoto" title="<?php 
    the_title();
    ?>
">Zoom</a>
                        <?php 
    if (yiw_get_option('portfolio_details_icon')) {
        ?>
    					<a class="icon-more" href="<?php 
        the_permalink();
 class="shadow"<?php 
}
?>
>
				
		<?php 
/** 
 * woocommerce_before_subcategory_title hook
 *
 * @hooked woocommerce_subcategory_thumbnail - 10
 */
do_action('woocommerce_before_subcategory_title', $category);
?>
		
		<h3 class="<?php 
echo yiw_get_option('shop_title_position_categories_page');
?>
">
			<?php 
echo $category->name;
?>
 
			<?php 
if ($category->count > 0) {
    ?>
				<mark class="count">(<?php 
    echo $category->count;
    ?>
)</mark>
			<?php 
}
Example #21
0
function yiw_add_share_products()
{
    if (yiw_get_option('shop_show_share_socials')) {
        echo do_shortcode('[share title="' . yiw_get_option('shop_share_title') . '" socials="' . yiw_get_option('shop_share_socials') . '"]');
    }
}
Example #22
0
<?php

/**
 * @package WordPress
 * @subpackage Sheeva
 * @since 1.0
 */
$slider = yiw_get_option('slider_layers_choose', 1);
?>

 
<!-- START SLIDER -->
<div id="slider" class="layers-slider"> 
    <div class="shadowWrapper">
        <?php 
echo do_shortcode('[layerslider id="' . $slider . '"]');
?>

        <div class="shadow-left"></div>
        <div class="shadow-right"></div>
    </div>
</div>
<!-- END SLIDER -->
Example #23
0
                <div class="popup_message <?php 
    echo $image ? 'two-fourth last' : ' no-image';
    ?>
 ">
                    <?php 
    echo yiw_addp(stripslashes($message));
    ?>

                    <?php 
    if ($newsletter) {
        $action = yiw_get_option('popup_newsletter_form_action');
        $email = yiw_get_option('popup_newsletter_form_email');
        $email_label = yiw_get_option('popup_newsletter_form_label_email');
        $hidden_fields = yiw_get_option('popup_newsletter_form_label_hidden_fields');
        $submit = yiw_get_option('popup_newsletter_form_label_submit');
        $method = yiw_get_option('popup_newsletter_form_method');
        ?>


                        <div class="popup-newsletter-section group">
                            <form method="<?php 
        echo $method;
        ?>
" action="<?php 
        echo $action;
        ?>
">
                                <fieldset class="row">
                                    <ul class="group">
                                        <li class="two-third">
                                            <input type="text" name="<?php 
Example #24
0
        the_permalink();
        ?>
" title="<?php 
        the_title();
        ?>
">
			
			<div class="thumbnail">
    			<?php 
        do_action('woocommerce_before_shop_loop_item_title');
        ?>
    		
    			<div class="thumb-shadow"></div>
    			
    			<?php 
        if (yiw_get_option('shop_show_name')) {
            ?>
<strong class="<?php 
            echo $title_position;
            ?>
"><?php 
            the_title();
            ?>
</strong><?php 
        }
        ?>
    		</div>
			
			<?php 
        do_action('woocommerce_after_shop_loop_item_title');
        ?>
Example #25
0
">    
		    <div class="inner group">
                <?php 
get_template_part('slogan');
?>

    			
    			<?php 
get_template_part('accordion-slider');
?>
  
    			
                <!-- START CONTENT -->
                <div id="content" class="group">
                    <?php 
if (yiw_get_option('_show_breadcrumbs_page') == 'yes') {
    yiw_breadcrumb();
}
?>

                    
                    <div class="archive-list">
        				<?php 
$args = array('posts_per_page' => 30);
if (!empty($cat_not_in)) {
    $args['category__not_in'] = $cat_not_in;
}
if (!empty($cat_in)) {
    $args['category__in'] = $cat_in;
}
$lastposts = new WP_Query($args);
Example #26
0
                            </div>
                            
                            <div class="blog-elegant-right">
                            <?php 
// thumbnail
if ($has_thumbnail) {
    the_post_thumbnail('blog_elegant');
}
// content
add_filter('excerpt_more', create_function('$more', 'return "<br /><br /><a class=\\"more-link\\" href=\\"' . get_permalink(get_the_ID()) . '\\">' . yiw_get_option('blog_read_more_text') . '</a>";'));
if (!is_single() or get_post_type() == 'bl_testimonials') {
    if (is_category() || is_archive() || is_search()) {
        the_excerpt();
    } else {
        the_content(str_replace('->', '&rarr;', yiw_get_option('blog_read_more_text')));
    }
}
?>

                            </div>                            
                       </div>
                       
                        <?php 
if (is_single() and get_post_type() != 'bl_testimonials') {
    echo '<div class="the_content">', the_content(), '</div>';
}
wp_link_pages();
edit_post_link(__('Edit', 'yiw'), '<p class="edit-link">', '</p>');
?>
Example #27
0
        <?php 
wp_get_archives('type=monthly&show_post_count=1');
?>
    </ul>
</div>

<div class="widget widget_list_categories">
    <h3><?php 
_e('Categories', 'yit');
?>
</h3>
    <ul>
        <?php 
$cat_params = array('hide_empty' => FALSE, 'title_li' => '');
if (strlen(trim(yit_get_option('blog-cats-exclude[2]'))) > 0) {
    $cat_params['exclude'] = trim(yiw_get_option('blog-cats-exclude[2]'));
}
wp_list_categories($cat_params);
?>
    </ul>
</div>

<div class="widget">
    <h3><?php 
_e('Blogroll', 'yit');
?>
</h3>
    <ul>
        <?php 
wp_list_bookmarks('title_li=&categorize=0');
?>
Example #28
0
    ?>
</a></h5>
                                        <p><?php 
    echo yiw_excerpt(12, '', false);
    ?>
</p>
                                        <div class="controls">
                                            <a class="icon-zoom" href="<?php 
    echo $image[0];
    ?>
" rel="prettyPhoto" title="<?php 
    the_title();
    ?>
">Zoom</a>
                                            <?php 
    if (yiw_get_option('gallery_details_icon')) {
        ?>
                        					<a class="icon-more" href="<?php 
        the_permalink();
        ?>
" title="<?php 
        the_title();
        ?>
"><?php 
        _e('View More', 'yiw');
        ?>
</a>
                        					<?php 
    }
    ?>
                    					</div>
Example #29
0
   
                               
                <?php 
if ($portfolio_type == 'filterable') {
    ?>

                <!-- FILTERS -->
                <div class="gallery-filters">
                    <?php 
    if ($_active_title == 'yes' || !$_active_title) {
        the_title('<h1>', '</h1>');
    }
    ?>

                    <?php 
    if (yiw_get_option('portfolio_show_filters')) {
        ?>

                    <ul class="filters gallery-categories">
                        <li class="segment-1 first"><a data-value="all" href="#"><?php 
        _e('All', 'yiw');
        ?>
</a></li><?php 
        foreach ($cats as $cat) {
            if ($cat->count > 0) {
                ?>
<li class="segment-<?php 
                echo $cat->term_id;
                ?>
"><a href="#" data-value="<?php 
                echo strtolower(preg_replace('/\\s+/', '-', $cat->slug));
Example #30
0
    echo yiw_get_id_contact_field($field);
}
$attrs = array('title' => '', 'data_name' => '', 'description' => '', 'type' => '', 'option' => '', 'option_selected' => '', 'already_checked' => '', 'label_checkbox' => '', 'msg_error' => '', 'required' => '', 'email_validate' => '', 'reply_to' => '', 'class' => '');
switch ($action) {
    case 'new-field':
        $title = __('Add New Field', 'yiw');
        $subtitle = __('Add new field for your contact module.', 'yiw');
        $action_submit = 'save';
        $fields = null;
        $c_field = null;
        break;
    case 'edit-field':
        $title = __('Edit Field', 'yiw');
        $subtitle = __('Edit the attributes of field.', 'yiw');
        $action_submit = 'update-array';
        $fields = stripslashes_deep(maybe_unserialize(yiw_get_option($_GET['id'])));
        $c_field = intval($_GET['c']);
        //echo '<pre>', print_r($fields), '</pre>';
        $attrs = wp_parse_args($fields[$c_field], $attrs);
        // 		foreach( $attrs as $id => $value )
        // 		{
        // 			$attrs[$id] = $fields[$c_field][$id];
        // 		}
        break;
    default:
        $title = '';
        $subtitle = '';
        break;
}
$parent_file = 'themes.php';
?>