<?php
// Call WP Load
$wp_include = "../wp-load.php";$i = 0;
while (!file_exists($wp_include) && $i++ < 10) {$wp_include = "../$wp_include";} require($wp_include);
if ( !is_user_logged_in() || !current_user_can('edit_posts') ) 
	wp_die(__("You are not allowed to be here","cloudfw"));
	
	
$selection = stripslashes($_POST["selection"]);
$section = $_POST["section"];
if ($selection) $selection_only_text = @sanitize_key($selection);

$lastID = get_option("cloud_created_att_page");

if (empty($section)):
?>

<div id="cloudfw_shortcode_tab_div">
	
	<ul id="cloudfw_shortcode_content-tabs">
    
     	<li class="close-tab notab"><a href="#" class="shortcodes_tabs_close"><?php _e('Close','cloudfw'); ?></a></li>
        
	   	<li class="shortcodes-style-tab actived"><a href="#tab_style"><span><?php _e('Style','cloudfw'); ?></span></a></li>
     	<li class="shortcodes-grids-tab"><a href="#tab_grid"><span><?php _e('Columns','cloudfw'); ?></span></a></li>
	   	<li class="shortcodes-buttons-tab"><a href="#tab_button"><span><?php _e('Buttons','cloudfw'); ?></span></a></li>
	   	<li class="shortcodes-tabs-tab"><a href="#tab_tabs"><span><?php _e('Tabs','cloudfw'); ?></span></a></li>
	   	<li class="shortcodes-toggle-tab"><a href="#tab_toggle"><span><?php _e('Toggles','cloudfw'); ?></span></a></li>
	   	<li class="shortcodes-blog-tab"><a href="#tab_blog" rel="tab_blog"><span><?php _e('Blog','cloudfw'); ?></span></a></li>
	   	<li class="shortcodes-portfolio-tab"><a href="#tab_portfolio" rel="tab_portfolio"><span><?php _e('Portfolio','cloudfw'); ?></span></a></li>
	   	<li class="shortcodes-showcase-tab"><a href="#tab_slider" rel="tab_slider"><span><?php _e('Slider','cloudfw'); ?></span></a></li>
	   	<li class="shortcodes-various-tab"><a href="#tab_various"><span><?php _e('Various','cloudfw'); ?></a></span></li>
    
	</ul>

	
    <div id="cloudfw_shortcode_content">
    <div id="codesended"><?php _e('The Code Sent To The Editor','cloudfw'); ?></div>

        <div id="cloudfw_shortcode_content_inside">

             <ul id="cloudfw_shortcode_content-tabs-contents">
             
                  <li id="tab_style" class="currentTab">
                   
                  		
                     <div style="float:left; width: 50%;">
                        <div class="sector module">
                                                
                         <span class="sg-title-sector"><a href="#" class="opento" rel="tog_titles">&Xi; <?php _e('Titles','cloudfw'); ?></a></span>
                         
                         <div id="tog_titles" style="display:none; padding-top: 10px;">                         
                        
                         <div>
                         <a class="small-button small-grey sendeditor" id="sg_default" rel="h1" lang="text"><span><?php _e('h1','cloudfw'); ?></span></a>
                         <a class="small-button small-grey sendeditor" id="sg_default" rel="h2" lang="text"><span><?php _e('h2','cloudfw'); ?></span></a>
                         <a class="small-button small-grey sendeditor" id="sg_default" rel="h3" lang="text"><span><?php _e('h3','cloudfw'); ?></span></a>
                         <a class="small-button small-grey sendeditor" id="sg_default" rel="h4" lang="text"><span><?php _e('h4','cloudfw'); ?></span></a>
                         <a class="small-button small-grey sendeditor" id="sg_default" rel="h5" lang="text"><span><?php _e('h5','cloudfw'); ?></span></a>
                         <a class="small-button small-grey sendeditor" id="sg_default" rel="h6" lang="text"><span><?php _e('h6','cloudfw'); ?></span></a>
                         </div>
                         <a class="small-button small-grey sendeditor" id="sg_default" rel="title1" lang="text"><span><?php _e('Title Style','cloudfw'); ?> 1</span></a>
                         <a class="small-button small-grey sendeditor" id="sg_default" rel="title2" lang="text"><span><?php _e('Title Style','cloudfw'); ?> 2</span></a>
                         <a class="small-button small-grey sendeditor" id="sg_default" rel="title3" lang="text"><span><?php _e('Title Style','cloudfw'); ?> 3</span></a>
                         <a class="small-button small-grey sendeditor" id="sg_default" rel="title4" lang="text"><span><?php _e('Title Style','cloudfw'); ?> 4</span></a>
                         <a class="small-button small-grey sendeditor" id="sg_default" rel="title5" lang="text"><span><?php _e('Title Style','cloudfw'); ?> 5</span></a>
                         <a class="small-button small-grey sendeditor" id="sg_default" rel="title6" lang="text"><span><?php _e('Title Style','cloudfw'); ?> 6</span></a>
                         <a class="small-button small-grey opento" rel="tog_custom_title"><span>Custom Title &Xi;</span></a>


                             <div id="tog_custom_title" style="display:none;  padding-top:10px;">
                                
                          <div class="module" style="float:left; margin: 20px 30px 0 0;">
                            
                            <div class="sg-title"><?php _e('Background Color','cloudfw'); ?>:</div> 
                            	
                                 <?php 
							
								admin_create_color_selection (
									  'sg_custom_title_bg', // id
									  true, // preview
									  '', // value
									  '000000'// default value
									  );
							
									?>
                                        
                            </div>
                            
                           <div class="module" style="float:left; margin: 20px 30px 0 0;">
                            
                            <div class="sg-title"><?php _e('Text Color','cloudfw'); ?>:</div> 
                            	
                                 <?php 
							
								admin_create_color_selection (
									  'sg_custom_title_color', // id
									  true, // preview
									  '', // value
									  'FFFFFF'// default value
									  );
							
									?>
                                        
                            </div>
                            
                            <div class="module" style="float:left; margin-top:35px;">
                            <div class="module">
                            	<a class="small-button small-brown sendeditor" id="sg_custom_title"><span><?php _e('Generate The Title','cloudfw'); ?></span></a>
                            </div>
                            </div>
                            
                            <div class="clear"></div> 
                                        
                             </div>
                       </div>
                       
                        <div class="clear"></div>
                        </div>
                        
                       </div> 
                        
                       <div style="float: left; width: 50%;">
                        
                        	<div class="sector module">                        
                                                   
                             <span class="sg-title-sector"><a href="#" class="opento" rel="tog_icon">&Xi; <?php _e('Icon','cloudfw'); ?></a></span>
                             
                             <div id="tog_icon" style="display:none; padding-top: 10px;">   
                             
                              <div class="module" style="float:left; margin: 0 30px 20px 0;">
                                
                                <div class="sg-title"><?php _e('Icon','cloudfw'); ?>:</div> 
                                <?php
										admin_create_icon_selection(array(
											'id'	=> 'sg_icon_icon',
											'value'	=> ''
										));
                                ?>
                                
                                </div>
 							
                            <div class="clear"></div>
                             
                            <div class="module">
                            <a class="small-button small-brown sendeditor" id="sg_icon"><span><?php _e('Generate The Code','cloudfw'); ?></span></a>
                            </div>

                             </div>
                             
                           
                            <div class="clear"></div>
                       
    
                            </div>
                        
                        </div>
                        
                        <div class="clear"></div>
                       
                        <div class="divider"></div>
                        
                        
                        <div style="float: left; width: 50%;">
                        
                            <div class="sector module">                        
                                                   
                             <span class="sg-title-sector"><a href="#" class="opento" rel="tog_lists">&Xi; <?php _e('Lists','cloudfw'); ?></a></span>
                             
                             <div id="tog_lists" style="display:none; padding-top: 10px;">   
                             
                             <div class="module" style="float:left; margin:0 30px 20px 0;">
                             
                                
                                <div class="sg-title"><?php _e('List Type','cloudfw'); ?>:</div> 
                                <span class="select">
                                <select id="sg_list_type" name="sg_list_type" class="input" style="width:195px;" >
                                    <option value="circle">Circle</option>
                                    <option value="square">Square</option>
                                    <option value="bull">Bullet</option>
                                    <option value="check">Checked</option>
                                    <option value="cancel">Cancelled</option>
                                    <option value="download">Download</option>
                                    <option value="rss">RSS</option>
                                    <option value="doc">Document</option>
                                    <option value="info">Info</option>
                                    <option value="plus">Plus</option>
                                    <option value="negative">Negative</option>
                                    <option value="caution">Caution</option>
                                    <option value="ordered">Ordered</option>
                                    <option value="roman">Roman Numeral</option>
                                </select>
                                </span>
                                            
                                </div>
                            <div class="clear"></div>
    
                          
                            
                            <ul id="sg_list_content">
                        
                            <li>	
                                    <div class="module" style="float:left; margin-right:30px;">
                                    
                                    <div class="sg-title"><?php _e('List Item','cloudfw'); ?>:</div> 
                                    <?php
                                           admin_create_input(
                                                '',//id
                                                $selection,//value
                                                "textarea",
                                                "text",
                                                "input input textarea_400px_2line sg_list_cont"
                                            );
                                           
                                    ?>
                                    
                                    </div>
                                     <div class="module sg_list_content_remove_button" style="float:left; padding-top:20px; margin-right:30px; display:none;">
                                    <a class="small-button small-grey removetabs"><span>&ndash;</span></a>
                                    </div>
                                    
                                    <div class="clear"></div> 
                                    
                            
                            </li>
                      
                        </ul>
                        
                             
                        <div class="module">
                        <a class="small-button small-grey addlist"><span><?php _e('+ Add New List Item','cloudfw'); ?></span></a><a class="small-button small-brown sendeditor" id="sg_list"><span><?php _e('Generate The Code','cloudfw'); ?></span></a>
                        </div>
                             
                                 
                             </div>
                             
                           
                            <div class="clear"></div>
                       
    
                            </div>
                        </div>
                        
                        <div style="float: left; width: 50%;">
                        
                        	<div class="sector module">                        
                                                   
                             <span class="sg-title-sector"><a href="#" class="opento" rel="tog_icon_box">&Xi; <?php _e('Icon Box','cloudfw'); ?></a></span>
                             
                             <div id="tog_icon_box" style="display:none; padding-top: 10px;">   
                             
                              <div class="module" style="float:left; margin: 0 30px 20px 0;">
                                
                                <div class="sg-title"><?php _e('Icon','cloudfw'); ?>:</div> 
                                <?php
										admin_create_icon_selection(array(
											'id'	=> 'sg_icon_box_icon',
											'value'	=> ''
										));
                                ?>
                                
                                </div>
 							<div class="module" style="float:left; margin: 0 30px 20px 0;">
                                
                                <div class="sg-title"><?php _e('Custom Title Color','cloudfw'); ?>:</div> 
                                <?php 
									admin_create_color_selection (
									  'sg_icon_box_color', // id
									  true, // preview
									  '', // value
									  NULL// default value
									);         
								?>
                                
                                </div>
                            <div class="clear"></div>
                             
                             
                             <div class="module" style="float:left; margin: 0 30px 20px 0;">
                                
                                <div class="sg-title"><?php _e('Box Title','cloudfw'); ?>:</div> 
                                <?php
                                       admin_create_input(
                                            'sg_icon_box_title',//id
                                            '',//value
                                            "input",
                                            "text",
                                            "input input_400_bold"
                                        );
                                ?>
                                
                                </div>

                            <div class="clear"></div>
    
                            
                            <div class="module" style="float:left; margin-right:30px;">
                                    
                                <div class="sg-title"><?php _e('Box Content','cloudfw'); ?>:</div> 
								<?php
									   admin_create_input(
											'sg_icon_box_content',//id
											$selection,//value
											"textarea",
											"text",
											"input input textarea_400px_2line"
										);
								?>
                                    
                            </div>
                            
                            <div class="clear"></div>
                             
                            <div class="module">
                            <a class="small-button small-brown sendeditor" id="sg_icon_box"><span><?php _e('Generate The Code','cloudfw'); ?></span></a>
                            </div>

                             
                                 
                             </div>
                             
                           
                            <div class="clear"></div>
                       
    
                            </div>
                        
                        </div>
                        
                        <div class="clear"></div>                        
                        <div class="divider"></div>
                         
                         <div style="float:left; width:50%;">
                        
                        <div class="sector module">
                        
                      	 <span class="sg-title-sector"><a href="#" class="opento" rel="tog_boxes">&Xi; <?php _e('Boxes','cloudfw'); ?></a></span>
                         
                         <div id="tog_boxes" style="display:none; padding-top:10px;">
                         
                                                  
                          <div class="module" style="float:left; margin: 0 30px 20px 0;">
                                
                                <div class="sg-title"><?php _e('Box Title','cloudfw'); ?>:</div> 
                                <?php
                                       admin_create_input(
                                            'sg_box_title',//id
                                            '',//value
                                            "input",
                                            "text",
                                            "input input_400_bold"
                                        );
                                       
                                ?>
                                
                                </div>
                                
                          <div class="clear"></div>
                         
                         <a class="small-button small-grey sendeditor" id="sg_box" rel="info"><span>Info Box</span></a>
                         <a class="small-button small-grey sendeditor" id="sg_box" rel="caution"><span>Caution Box</span></a>
                         <a class="small-button small-grey sendeditor" id="sg_box" rel="warning"><span>Warning Box</span></a>
                         <a class="small-button small-grey sendeditor" id="sg_box" rel="bulb"><span>Bulb Box</span></a>
                         <a class="small-button small-grey sendeditor" id="sg_box" rel="note"><span>Note Box</span></a>
                         <a class="small-button small-grey sendeditor" id="sg_box" rel="success"><span>Success Box</span></a>
                         <a class="small-button small-grey sendeditor" id="sg_box" rel="error"><span>Error Box</span></a>
                         </div>
                        
                        <div class="clear"></div>
                        </div>
                        </div>
                        
                        <div style="float:left; width:50%;">
                        
                        <div class="sector module">
                        
                      	 <span class="sg-title-sector"><a href="#" class="opento" rel="tog_blocks">&Xi; <?php _e('Content Blocks','cloudfw'); ?></a></span>
                         
                         <div id="tog_blocks" style="display:none; padding-top:10px;">
                           
                            <div class="module" style="float:left; margin-right:30px; margin-bottom:20px;">
                          
                          	<div class="sg-title"><?php _e('Float','cloudfw'); ?>:</div> 
                            <span class="select">
                            <select id="sg_blocks_float" name="sg_blocks_float" class="input" style="width:195px;" >
					
								<option value="left"><?php _e('Left','cloudfw'); ?></option>
                                <option value="right"><?php _e('Right','cloudfw'); ?></option>
                                 
                            </select>
                            </span>
                                        
                            </div>
                            
                          <div class="clear"></div>
                        
                            <div class="module" style="float:left; margin-right:30px;">
                            <div class="sg-title"><?php _e('Left Margin','cloudfw'); ?>:</div><?php admin_create_input('sg_blocks_left','',"input","text","input input_75");?> px 
                            </div>
                            
                         	<div class="module" style="float:left; margin-right:30px;">
                            <div class="sg-title"><?php _e('Top Margin','cloudfw'); ?>:</div><?php admin_create_input('sg_blocks_top','',"input","text","input input_75");?> px 
                            </div>
                            
                            <div class="module" style="float:left; margin-right:30px;">
                            <div class="sg-title"><?php _e('Right Margin','cloudfw'); ?>:</div><?php admin_create_input('sg_blocks_right','',"input","text","input input_75");?> px 
                            </div>
                            
                            <div class="module" style="float:left; margin-right:30px;">
                            <div class="sg-title"><?php _e('Bottom Margin','cloudfw'); ?>:</div><?php admin_create_input('sg_blocks_bottom','',"input","text","input input_75");?> px 
                            </div>
                            
                            
                           
                        <div class="clear"></div>
                            <div class="module" style="float:left; margin: 20px 30px 0 0;">
                                
                            <div class="sg-title"><?php _e('CSS Style Attribute','cloudfw'); ?>:</div> 
                            <?php
                                   admin_create_input(
                                        'sg_blocks_style',//id
                                        '',//value
                                        "textarea",
                                        "text",
                                        "input input textarea_400px_2line"
                                    );
                                   
                            ?>
                            
                            </div>  
                            
                            <div class="clear"></div>
                            <div class="module" style="float:left; margin-top:17px;">
                            <div class="module">
                            	<a class="small-button small-brown sendeditor" id="sg_blocks"><span><?php _e('Generate The Block','cloudfw'); ?></span></a>
                            </div>
                            </div>
                        
                        <div class="clear"></div>
                        
                        </div>
                     </div>
                     </div>
                        <div class="clear"></div>
                    <div class="divider"></div>
                    
                    <div style="float:left; width:50%;">
                    <div class="sector module">
                                            
                     <span class="sg-title-sector"><a href="#" class="opento" rel="tog_highlights">&Xi; <?php _e('Highlights','cloudfw'); ?></a></span>
                     
                     <div id="tog_highlights" style="display:none; padding-top: 10px;">                         
                    
                    <a class="small-button small-grey sendeditor" id="sg_default" rel="highlight1"><span><?php _e('Highlight Style 1','cloudfw'); ?></span></a>
                    <a class="small-button small-grey sendeditor" id="sg_default" rel="highlight2"><span><?php _e('Highlight Style 2','cloudfw'); ?></span></a>
                    <a class="small-button small-grey sendeditor" id="sg_default" rel="highlight3"><span><?php _e('Highlight Style 3','cloudfw'); ?></span></a>
                     
                         
                  	 </div>
                   
                    <div class="clear"></div>
                    </div>
                    </div>
                    
                     <div style="float:left; width:50%;">
                    <div class="sector module">
                                            
                     <span class="sg-title-sector"><a href="#" class="opento" rel="tog_quotes">&Xi; <?php _e('Quotes','cloudfw'); ?></a></span>
                     
                     <div id="tog_quotes" style="display:none; padding-top: 10px;">                         
                    
                    <a class="small-button small-grey sendeditor" id="sg_default" rel="blockquote"><span><?php _e('Blockquote','cloudfw'); ?></span></a>
                    <a class="small-button small-grey sendeditor" id="sg_default" rel="pullquote_left"><span><?php _e('Pullquote Aligned Left','cloudfw'); ?></span></a>
                    <a class="small-button small-grey sendeditor" id="sg_default" rel="pullquote_right"><span><?php _e('Pullquote Aligned Right','cloudfw'); ?></span></a>
                     
                         
                  	 </div>
                   
                    <div class="clear"></div>
                    </div>
                    </div>
                    
                    <div class="clear"></div>
                    
                    <div class="divider"></div>
                    
                    <div style="float:left; width:50%;">

                    <div class="sector module">
                                            
                     <span class="sg-title-sector"><a href="#" class="opento" rel="tog_dcap">&Xi; <?php _e('Drop Cap','cloudfw'); ?></a></span>
                     
                     <div id="tog_dcap" style="display:none; padding-top: 10px;">                         
                    
                    <a class="small-button small-grey sendeditor" id="sg_default" rel="dropcap"><span><?php _e('Drop Cap','cloudfw'); ?></span></a>
                         
                     </div>
                   
                    <div class="clear"></div>
                    </div>
                    
                    </div>
                    
                    <div style="float:left; width:50%;">
                    
                    <div class="sector module">
                    
                     <span class="sg-title-sector"><a href="#" class="opento" rel="sg_divider">&Xi; <?php _e('Dividers','cloudfw'); ?></a></span>
                    
                    <div id="sg_divider" style="display:none; padding-top:10px;">
                    <a class="small-button small-grey sendeditor" id="sg_default" rel="slicer" lang="direct"><span><?php _e('Slicer','cloudfw'); ?></span></a>
                    <a class="small-button small-grey sendeditor" id="sg_default" rel="divider" lang="direct"><span><?php _e('Divider','cloudfw'); ?></span></a>
                    </div>
                    
                    </div>                    
                    </div>
                        
                    <div class="clear"></div>
                    
                   
                   </li>
                   
                   
                  <li id="tab_grid" class="hidden">
                        
                       <div class="sector"> 
                       
                       <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_1_1">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">&nbsp;1&nbsp;</span></div>                     
                        	<div class="grid" style="width:92%;"></div>
                            <div class="clear"></div></a>
                        
                        <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_1_2">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">1/2</span></div>                     
                        	<div class="grid oneof2"></div>
                            <div class="grid oneof2 last"></div>
                            <div class="clear"></div></a>
                        
                         <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_1_3">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">1/3</span></div>                     
                        	<div class="grid oneof3"></div>
                        	<div class="grid oneof3"></div>
                            <div class="grid oneof3 last"></div>
                            <div class="clear"></div></a>
                         <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_1_4">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">1/4</span></div>                     
                        	<div class="grid oneof4"></div>
                        	<div class="grid oneof4"></div>
                        	<div class="grid oneof4"></div>
                            <div class="grid oneof4 last"></div>
                            <div class="clear"></div></a>  
                         <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_1_5">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">1/5</span></div>                     
                        	<div class="grid oneof5"></div>
                        	<div class="grid oneof5"></div>
                        	<div class="grid oneof5"></div>
                        	<div class="grid oneof5"></div>
                            <div class="grid oneof5 last"></div>
                            <div class="clear"></div></a>                     	
                         <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_1_6">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">1/6</span></div>                     
                        	<div class="grid oneof6"></div>
                        	<div class="grid oneof6"></div>
                        	<div class="grid oneof6"></div>
                        	<div class="grid oneof6"></div>
                        	<div class="grid oneof6"></div>
                            <div class="grid oneof6 last"></div>
                            <div class="clear"></div></a>                            
                            
                            
                            <div class="clear"></div>
                            
                            </div> 
                            
                            <div class="divider"></div>
                            
                            <div class="sector">
                            
                            <span class="sg-title-sector"><a href="#" class="opento" rel="tog_layouts">&Xi; <?php _e('Other Column Variations','cloudfw'); ?></a></span>
                            
                            <div id="tog_layouts" style="padding-top:10px; display:none;">
                            
                            
                            <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_1_3-2_3">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">1/3 - 2/3</span></div>                     
                        	<div class="grid oneof3"></div>
                            <div class="grid twoof3 last"></div>
                            <div class="clear"></div></a>
                            
                            <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_2_3-1_3">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">2/3 - 1/3</span></div>                     
                            <div class="grid twoof3"></div>
                        	<div class="grid oneof3 last"></div>
                            <div class="clear"></div></a>
                            
                            	<div class="clear"></div>
                                
                            <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_1_4-3_4">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">1/4 - 3/4</span></div>                     
                        	<div class="grid oneof4"></div>
                            <div class="grid threeof4 last"></div>
                            <div class="clear"></div></a>
                            <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_3_4-1_4">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">3/4 - 1/4</span></div>                     
                            <div class="grid threeof4"></div>
                        	<div class="grid oneof4 last"></div>
                            <div class="clear"></div></a>
                            
                            <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_1_4-2_4-1_4">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">1/4 - 2/4 - 1/4</span></div>                     
                        	<div class="grid oneof4"></div>
                            <div class="grid twoof4"></div>
                        	<div class="grid oneof4 last"></div>
                            <div class="clear"></div></a>   
                                                      
                            <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_1_4-1_4-2_4">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">1/4 - 1/4 - 2/4</span></div>                     
                        	<div class="grid oneof4"></div>
                            <div class="grid oneof4"></div>
                        	<div class="grid twoof4 last"></div>
                            <div class="clear"></div></a> 
                            
                            <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_2_4-1_4-1_4">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">2/4 - 1/4 - 1/4</span></div>                     
                        	<div class="grid twoof4"></div>
                            <div class="grid oneof4"></div>
                        	<div class="grid oneof4 last"></div>
                            <div class="clear"></div></a> 
                            
                            	<div class="clear"></div>
                                
                            <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_1_5-4_5">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">1/5 - 4/5</span></div>                     
                        	<div class="grid oneof5"></div>
                            <div class="grid fourof5 last"></div>
                            <div class="clear"></div></a>   

                            <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_4_5-1_5">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">4/5 - 1/5</span></div>                     
                        	<div class="grid fourof5"></div>
                            <div class="grid oneof5 last"></div>
                            <div class="clear"></div></a>   
                                                                                 
                            <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_2_5-3_5">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">2/5 - 3/5</span></div>                     
                        	<div class="grid twoof5"></div>
                            <div class="grid threeof5 last"></div>
                            <div class="clear"></div></a>

                            <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_3_5-2_5">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">3/5 - 2/5</span></div>                     
                        	<div class="grid threeof5"></div>
                            <div class="grid twoof5 last"></div>
                            <div class="clear"></div></a>                            

                            <a href="#" class="sendeditor grid sg-layouts" id="sg_grids_2_5-1_5-2_5">
  							<div class="sg-layouts-label"><span class="sg-layouts-label-inside">2/5 - 1/5 - 2/5</span></div>                     
                        	<div class="grid twoof5"></div>
                        	<div class="grid oneof5"></div>
                            <div class="grid twoof5 last"></div>
                            <div class="clear"></div></a>
                                                       
                            <div class="clear"></div>
                            
                            </div>
                            
                            </div>
                       
                       
                  
                  </li>

                  
                  <li id="tab_button" class="hidden">
                  
                  		<div class="sector module">
                        
                           
                            <div class="module" style="float:left; margin-right:30px;">
                            
                            <div class="sg-title"><?php _e('Button Size','cloudfw'); ?>:</div> 
                            <span class="select">
                            <select id="sg_buttons_size" name="sg_buttons_size" class="input" style="width:195px;" >
					
								<option value="small"><?php _e('Small','cloudfw'); ?></option>
								<option value="normal" selected="selected"><?php _e('Default','cloudfw'); ?></option>
                                <option value="big"><?php _e('Big','cloudfw'); ?></option>
                                 
                            </select>
                            </span>
                                        
                            </div>
                            
                            <div class="module" style="float:left;  margin-right:30px;"">
                            
                            <div class="sg-title"><?php _e('Button Color','cloudfw'); ?>:</div> 
                            <span class="select">
                            <select id="sg_buttons_color" name="sg_buttons_color" class="input" style="width:200px;" >
					
								<?php 
                                $cloudfw_button_colors = cloudfw_button_array();
            
                                foreach ($cloudfw_button_colors as $button_id => $buttons){
                                
                                    $option = '<option value="'.$button_id.'">';
                                    $option .=  $buttons["text"];
                                    $option .= '</option>';
                                    echo $option;
                                    
                                };
                                 
                                 ?>
                                 
                            </select>
                            </span>
                                        
                            </div>
                            
                           <div class="module" style="float:left; margin-right:30px;">
                            
                            <div class="sg-title"><?php _e('Link Target','cloudfw'); ?>:</div> 
                            <span class="select">
                            <select id="sg_buttons_target" name="sg_buttons_target" class="input" style="width:100px;" >
					
								<option></option>
                                <option><?php _e('_blank','cloudfw'); ?></option>
                                 
                            </select>
                            </span>
                                        
                            </div>
                                                    
                            <div class="clear"></div> 
                           
                           </div>
                           <div class="divider"></div>
                           <div class="sector module">
                           
                           
                            <div class="module" style="float:left; margin-right:30px;">
                            
                            <div class="sg-title"><?php _e('Button Title','cloudfw'); ?>:</div> 
                            <?php
                                   admin_create_input(
                                        'sg_buttons_title',//id
                                        $selection_only_text,//value
                                        "input",
                                        "text",
                                        "input input_200_bold"
                                    );
                                   
                            ?>
                            
                            </div>
                           <div class="module" style="float:left; margin-right:30px;">
                            
                            <div class="sg-title"><?php _e('Button Link','cloudfw'); ?>:</div> 
                            <?php 
                            
								admin_create_select_page_button( 
									 'both',
									 'sg_buttons_link', //rel
									 '', //preview
									 TRUE,
									 'salturl',	//cases @ url or id
									 FALSE, //hidden
									 TRUE,	// hide parent: true or false
									 'Select A Page', //text
									 NULL, // post, page or NULL
									 'input_400_bold',  // external class for text:input
									 NULL // external class for button
								);
								?>
                            
                            </div>
                            
                          <div class="module" style="float:left; margin-top:20px;">
                             
                          <div class="module">
                          <a class="small-button small-brown sendeditor" id="sg_button"><span><?php _e('Generate The Button','cloudfw'); ?></span></a>
                          </div>
                             
                          </div>
                            
                                                      
                            
                           <div class="clear"></div> 
                          
                       
                       </div>
                  
                  </li>
                  <!-- // Buttons  -->
                                  
                  <li id="tab_tabs" class="hidden">
                 
                  <div class="sector module">
                  
                   <div class="sg-title"><?php _e('Tab Style','cloudfw'); ?>:</div> 
                            <span class="select">
                            <select id="sg_tab_style" name="sg_tab_style" class="input" style="width:195px;" >
					
								<option value="tabs">Framed Tabs</option>
                                <option value="tabs_simple">Simple Tabs</option>
                                 
                            </select>
                            </span>
                            <div class="clear"></div> 
                  
                  </div>
                  
                  <div class="divider"></div>
				
               	 	<div class="sector module">
                  
                  	<ul id="sg_tabs_content">
                    
                    	<li>	
                        
                                <div class="module" style="float:left; margin: 0 30px 20px 0;">
                                
                                <div class="sg-title"><?php _e('Tab Title','cloudfw'); ?>:</div> 
                                <?php
                                       admin_create_input(
                                            '',//id
                                            '',//value
                                            "input",
                                            "text",
                                            "input input_200_bold sg_tab_title"
                                        );
                                       
                                ?>
                                
                                </div>
                                <div class="module" style="float:left; margin-right:30px;">
                                
                                <div class="sg-title"><?php _e('Tab Content','cloudfw'); ?>:</div> 
                                <?php
                                       admin_create_input(
                                            '',//id
                                            $selection,//value
                                            "textarea",
                                            "text",
                                            "input input textarea_500px_3line sg_tab_content"
                                        );
                                       
                                ?>
                                
                                </div>
                                 <div class="module sg_tabs_content_remove_button" style="float:left; padding-top:20px; margin-right:30px; display:none;">
                                <a class="small-button small-grey removetabs"><span>&ndash;</span></a>
                                </div>
                                
                                <div class="clear"></div> 
                            	
                        
                        </li>
                  
                  	</ul>
                    
                    </div>
                    
                   <div class="divider"></div>
				
                <div class="sector module">
                  
                  
                  <div class="module">
                  	<a class="small-button small-grey addtabs"><span><?php _e('+ Add New Tab','cloudfw'); ?></span></a><a class="small-button small-brown sendeditor" id="sg_tabs"><span><?php _e('Generate The Code','cloudfw'); ?></span></a>
                  </div>
                             
               
                  
                  <div class="clear"></div> 
                  </div>
                  
                  
                  </li>
                   <!-- // Tabs  -->  
                   
                  <li id="tab_toggle" class="hidden">
                  
                   <div class="sector module">
                   
                   <div class="module" style="float:left; margin:0 30px 20px 0;">
                                
                    <div class="sg-title"><?php _e('Toggle Title','cloudfw'); ?>:</div> 
                    <?php
                           admin_create_input(
                                'sg_toggle_title',//id
                                '',//value
                                "input",
                                "text",
                                "input input_200_bold"
                            );
                           
                    ?>
                    
                    </div>
                    
                   <div class="module" style="float:left; margin:0 30px 20px 0;">
                  
                   <div class="sg-title"><?php _e('Toggle State','cloudfw'); ?>:</div> 
                            <span class="select">
                            <select id="sg_toggle_state" name="sg_toggle_state" class="input" style="width:120px;" >
					
								<option value="">Opened</option>
                                <option value="1">Closed</option>
                                 
                            </select>
                            </span>
                            <div class="clear"></div> 
                  
                  </div>
                  
                  <div class="module" style="float:left; margin:0 30px 20px 0;">
                  
                   <div class="sg-title"><?php _e('Toggle Group','cloudfw'); ?>:</div> 
                  
                   <?php
                           admin_create_input(
                                'sg_toggle_group',//id
                                '',//value
                                "input",
                                "text",
                                "input input_100"
                            );
                          ?>
                  </div>
                    
                    
                   <div class="clear"></div> 
                   
                   <div class="module" style="float:left; margin:0 30px 20px 0;">
                                
                                <div class="sg-title"><?php _e('Toggle Content','cloudfw'); ?>:</div> 
                                <?php
                                       admin_create_input(
                                            'sg_toggle_content',//id
                                            $selection,//value
                                            "textarea",
                                            "text",
                                            "input input textarea_500px_8line"
                                        );
                                       
                                ?>
                                
                   </div>
                   
                   <div class="clear"></div> 
                   
                    <div class="module">
                  	<a class="small-button small-brown sendeditor" id="sg_toggle"><span><?php _e('Generate The Code','cloudfw'); ?></span></a>
                  </div>
                   
                   		
                   <div class="clear"></div> 
                   </div>
                  
				  </li>
                   <!-- // Toggle  -->  
                   
                   
                  <li id="tab_blog" class="hidden"></li>
                   <!-- // Blog  -->
                   
                  <li id="tab_portfolio" class="hidden"></li>
                   <!-- // Portfolio  -->
                   
                  <li id="tab_slider" class="hidden"></li>
                   <!-- // Showcase  -->
                   
                 <li id="tab_various" class="hidden">
                  
                  	
                  <div class="sector module">
                                            
                     <span class="sg-title-sector"><a href="#" class="opento" rel="sg_twitter">&Xi; <?php _e('Twitter Codes','cloudfw'); ?></a></span>
                    
                    <div id="sg_twitter" style="display:none; padding-top:10px;">

                    
                    <div class="module" style="float:left; margin:0 30px 20px 0;">
                                
                    <div class="sg-title"><?php _e('Twitter Username Or Search Key','cloudfw'); ?>:</div> 
                    <?php
				   admin_create_input(
						'sg_twitter_key',//id
						'',//value
						"input",
						"text",
						"input input_300_bold"
					);
                           
                    ?>
                    </div>
                    
                    <div class="module" style="float:left; margin:0 30px 20px 0;">
                            
                    <div class="sg-title"><?php _e('Source Of The Tweets','cloudfw'); ?>:</div> 
                    <span class="select">
                    <select id="sg_twitter_source" name="sg_twitter_source" class="input" style="width:230px;" >
            
                     	<option value="user">An User Tweets</option>
                      	<option value="search">Results Of The Search On Twitter</option>
                        
                    </select>
                    </span>
                   
                    
                    </div>
                    
                    
                    <div class="module" style="float:left; margin:0 30px 20px 0;">
                            
                    <div class="sg-title"><?php _e('Columns','cloudfw'); ?>:</div> 
                    <span class="select">
                    <select id="sg_twitter_columns" name="sg_twitter_columns" class="input" style="width:75px;" >
            
                     <?php for ( $counter = 1; $counter <= 4; $counter++) { echo '<option',($counter == 3)? ' selected="selected"':NULL,'>'.$counter.'</option>'; }?>  
                         
                    </select>
                    </span>
                   
                    
                    </div>
                    
                    <div class="module" style="float:left; margin:0 30px 20px 0;">
                  <div class="sg-title"><?php _e('Number Of Tweets','cloudfw'); ?>: <span class="description">max: 999</span></div> 
                    <?php
				   admin_create_input(
						'sg_twitter_count',//id
						'3',//value
						"input",
						"text",
						"input input_50"
					);
                           
                    ?>
                    </div>
                    
                   <div class="clear"></div> 
                   
                    <div class="module">
                  	<a class="small-button small-brown sendeditor" id="sg_twitter"><span><?php _e('Generate The Code','cloudfw'); ?></span></a>
                  </div>
                    
                    

                    </div>
                    
                    
                    </div>     
                    
   <div class="divider"></div>
                    
                    <div class="sector module">
                    
      				<span class="sg-title-sector"><a href="#" class="opento" rel="tog_lbx">&Xi; <?php _e('Lightbox','cloudfw'); ?></a></span>
                    
                     <div id="tog_lbx" style="display:none; padding-top: 10px;">
                     
                     <div class="sector module">
                          
                          <div class="module" style="float:left; margin:0 30px 20px 0;">
                          <div class="sg-title"><?php _e('Description','cloudfw'); ?>:</div> 
                            <?php
                           admin_create_input(
                                'sg_lbx_desc',//id
                                '',//value
                                "input",
                                "text",
                                "input input_400"
                            );
                                   
                            ?>
                            </div>
                   	         
                  			 <div class="clear"></div> 
                     
                            <div class="module" style="float:left; margin:0 30px 20px 0;">
                   
                            <div class="sg-title"><?php _e('Image or Iframe URL' ,'cloudfw'); ?>:</div> 
                            <?php 
                                admin_create_upload_button(  
                                'sg_lbx_url', // id of input:text
                                '', // value
                                FALSE, //preview
                                '', // thumbnail creator url
                                'Upload', // upload button test,
                                $lastID, // refference Post ID of Uploading Images
                                '', // description
                                NULL, // delete button text
                                'input_400_bold' // external classes for the text input
                                );
                            ?>   
                            
                            </div>                
                            <div class="module" style="float:left; margin:0 30px 20px 0;">
                          
                           <div class="sg-title"><?php _e('Lightbox Group','cloudfw'); ?>:</div> 
                          
                           <?php
                                   admin_create_input(
                                        'sg_lbx_group',//id
                                        '',//value
                                        "input",
                                        "text",
                                        "input input_100"
                                    );
                                  ?>
                          </div>       
                            <div class="clear"></div> 
                                                       
                          <div class="module" style="float:left; margin-top:20px;">
                             
                          <div class="module">
                          <a class="small-button small-brown sendeditor" id="sg_lbx"><span><?php _e('Generate The Code','cloudfw'); ?></span></a>
                          </div>
                             
                          </div>
                            
                                                      
                            
                           <div class="clear"></div> 
                          
                       
                       </div>
                     
                     
                     </div>
                    
                    </div>
                    
	 <div class="divider"></div>
                    
                    <div class="sector module">
                    
      				<span class="sg-title-sector"><a href="#" class="opento" rel="tog_action">&Xi; <?php _e('Action Container','cloudfw'); ?></a></span>
                    
                     <div id="tog_action" style="display:none; padding-top: 10px;">
                     
                     <div class="sector module">
                        

                            <div class="module" style="float:left;  margin-right:30px;"">
                            
                            <div class="sg-title"><?php _e('Button Color','cloudfw'); ?>:</div> 
                            <span class="select">
                            <select id="sg_act_color" name="sg_act_color" class="input" style="width:200px;" >
					
								<?php 
                                $cloudfw_button_colors = cloudfw_button_array();
            
                                foreach ($cloudfw_button_colors as $button_id => $buttons){
                                
                                    $option = '<option value="'.$button_id.'">';
                                    $option .=  $buttons["text"];
                                    $option .= '</option>';
                                    echo $option;
                                    
                                };
                                 
                                 ?>
                                 
                            </select>
                            </span>
                                        
                            </div>                       
                            
                            <div class="module" style="float:left; margin-right:30px;">
                            
                            <div class="sg-title"><?php _e('Button Title','cloudfw'); ?>:</div> 
                            <?php
                                   admin_create_input(
                                        'sg_act_title',//id
                                        '',//value
                                        "input",
                                        "text",
                                        "input input_200_bold"
                                    );
                                   
                            ?>
                            
                            </div>
                            
                            <div class="clear"></div> 
                           <div class="module" style="float:left; margin-right:30px;">
                            
                            <div class="sg-title"><?php _e('Button Link','cloudfw'); ?>:</div> 
                            <?php 
                            
								admin_create_select_page_button( 
									 'both',
									 'sg_act_link', //rel
									 '', //preview
									 TRUE,
									 'salturl',	//cases @ url or id
									 FALSE, //hidden
									 TRUE,	// hide parent: true or false
									 'Select A Page', //text
									 NULL, // post, page or NULL
									 'input_400_bold',  // external class for text:input
									 NULL // external class for button
								);
								?>
                            
                            </div>
                            
                           <div class="clear"></div>
                            <div class="module" style="float:left; margin: 20px 30px 0 0;">
                                
                            <div class="sg-title"><?php _e('Text','cloudfw'); ?>:</div> 
                            <?php
                                   admin_create_input(
                                        'sg_act_text',//id
                                       	 $selection_only_text,//value
                                        "textarea",
                                        "text",
                                        "input input textarea_400px_2line"
                                    );
                                   
                            ?>
                            
                            </div>  
                            
                          <div class="clear"></div> 
                            
                          <div class="module" style="float:left; margin-top:20px;">
                             
                          <div class="module">
                          <a class="small-button small-brown sendeditor" id="sg_action"><span><?php _e('Generate The Code','cloudfw'); ?></span></a>
                          </div>
                             
                          </div>
                            
                                                      
                            
                           <div class="clear"></div> 
                          
                       
                       </div>
                     
                     
                     </div>
                    
                    </div>
                    
   <div class="divider"></div>
     
      			<div class="sector module">
     
      				<span class="sg-title-sector"><a href="#" class="opento" rel="tog_frames">&Xi; <?php _e('Framed Image','cloudfw'); ?></a></span>
     
                     <div id="tog_frames" style="display:none; padding-top: 10px;">       
                                                     
                    <div class="module" style="float:left; margin:0 30px 20px 0;">
                                
                    <div class="sg-title"><?php _e('Image Alignment','cloudfw'); ?>:</div> 
                    <span class="select">
                            <select id="sg_frames_align" name="sg_frames_align" class="input" style="width:195px;" >
					
								<option value="frame_left"><?php _e('Left','cloudfw'); ?></option>
                                <option value="frame_right"><?php _e('Right','cloudfw'); ?></option>
                                 
                            </select>
                            </span>
                    </div>
                    
                     <div class="module" style="float:left; margin:0 30px 20px 0;">
                                
                    <div class="sg-title"><?php _e('Image Caption','cloudfw'); ?>:</div> 
                    <?php
				   admin_create_input(
						'sg_frames_caption',//id
						'',//value
						"input",
						"text",
						"input input_400"
					);
                           
                    ?>
                    
                    </div>
                  
                    
                    <div class="clear"></div>
                    
                     <div class="module" style="float:left; margin:0 30px 0 0;">
                   
                    <div class="sg-title"><?php _e('Image URL' ,'cloudfw'); ?>:</div> 
                    <?php admin_create_upload_button(  
					 	'sg_frames_image', // id of input:text
						'', // value
						FALSE, //preview
						'', // thumbnail creator url
						'Upload', // upload button test,
						$lastID, // refference Post ID of Uploading Images
						'', // description
						NULL, // delete button text
						'input_300_bold' // external classes for the text input
						);
					?>   
                    
                    </div> 
                     
                         
                    <div class="module" style="float:left; margin:0 30px 0 0;">
                   
                    <div class="sg-title"><?php _e('Image URL For Lightbox (optional)' ,'cloudfw'); ?>:</div> 
                    <?php admin_create_upload_button(  
					 	'sg_frames_image_lb', // id of input:text
						'', // value
						FALSE, //preview
						'', // thumbnail creator url
						'Upload', // upload button test,
						$lastID, // refference Post ID of Uploading Images
						'', // description
						NULL, // delete button text
						'input_300_bold' // external classes for the text input
						);
					?>   
                    
                    </div>
                     <div class="clear"></div>
                   
                    <div class="module" style="float:left; margin-top:20px;">
                    <div class="module">
                    <a class="small-button small-brown sendeditor" id="sg_framed_image"><span><?php _e('Generate The Code','cloudfw'); ?></span></a>
                    </div>
                    </div> 

                  	 </div>
                     
                   
                    <div class="clear"></div>
                    
                    </div>

     <div class="divider"></div>
                    
                    <div class="sector module">
                    
                     <span class="sg-title-sector"><a href="#" class="opento" rel="sg_contact">&Xi; <?php _e('Contact The Form','cloudfw'); ?></a></span>
                    
                    <div id="sg_contact" style="display:none; padding-top:10px;">
                    <a class="small-button small-grey sendeditor" id="sg_default" rel="contact" lang="direct"><span><?php _e('Call The Contact Form','cloudfw'); ?></span></a>
                    </div>
                    
                    </div>
                                                          
                   
    <div class="divider"></div>
                    
                    <div class="sector module">
                    
                     <span class="sg-title-sector"><a href="#" class="opento" rel="sg_others">&Xi; <?php _e('Others','cloudfw'); ?></a></span>
                    
                    <div id="sg_others" style="display:none; padding-top:10px;">
                    <a class="small-button small-grey sendeditor" id="sg_default" rel="pre"><span><?php _e('Pre Tag','cloudfw'); ?></span></a>
                    <a class="small-button small-grey sendeditor" id="sg_default" rel="clear" lang="direct"><span><?php _e('CSS Fix Clear','cloudfw'); ?></span></a>
                    <a class="small-button small-grey sendeditor" id="sg_default" rel="facebook_like" lang="direct"><span><?php _e('Facebook Like Button','cloudfw'); ?></span></a>
                    <a class="small-button small-grey sendeditor" id="sg_default" rel="tweet_button" lang="direct"><span><?php _e('Tweet This Button','cloudfw'); ?></span></a>
                   </div>
                    
                    </div>
                  
                  </li>
                   <!-- // Various  -->
                  
            </ul>
          
        </div>
            
    </div>

</div>

<?php elseif($section == 'tab_blog'):?>
 <div class="sector module">

    <div class="module" style="float:left; margin:0 30px 20px 0;">
                            
        <div class="sg-title"><?php _e('Blog Style','cloudfw'); ?>:</div> 
        <span class="select">
        <select id="sg_blog_style" name="sg_blog_style" class="input change_options" style="width:300px;" hidethis="blog_hide" pfix="blogg_">
    
           <option value="1"><?php _e('Only Title & Thumbnail','cloudfw'); ?></option>
           <option value="2"><?php _e('Title, Thumbnail & Excerpt','cloudfw'); ?></option>
             
        </select>
        </span>
        
    </div>
    
 	<div class="clear"></div>
     
  <div class="module" style="float:left; margin:0 30px 20px 0;">
                            
        <div class="sg-title"><?php _e('Container Title (optional)','cloudfw'); ?>:</div> 
        <?php
               admin_create_input(
                    'sg_blog_title',//id
                    '',//value
                    "input",
                    "text",
                    "input input_400_bold"
                );
               
        ?>
        
   </div>
   
     <div class="module" style="float:left; margin:0 30px 20px 0;">
                            
        <div class="sg-title"><?php _e('Container Title (optional)','cloudfw'); ?>:</div> 
        <?php
               admin_create_input(
                    'sg_blog_title',//id
                    '',//value
                    "input",
                    "text",
                    "input input_400_bold"
                );
               
        ?>
        
   </div>    
    
  </div>

        
	<div class="clear"></div>

<div class="divider"></div>
 
 
 <div class="sector module">
 		
   <div class="module" style="float:left; margin:0 30px 20px 0;">
        
        <div class="module" style="float:left; margin:0 30px 20px 0;">
                            
        <div class="sg-title"><?php _e('Columns','cloudfw'); ?>:</div> 
        <span class="select">
        <select id="sg_blog_columns" name="sg_blog_columns" class="input" style="width:195px;" >

         <?php for ( $counter = 1; $counter <= 3; $counter++) { echo '<option',($counter == 3)? ' selected="selected"':NULL,'>'.$counter.'</option>'; }?>  
             
        </select>
        </span>
        <div class="clear"></div>
        
        </div> 
        
        <div class="module" style="float:left; margin:0 30px 20px 0;">
                            
        <div class="sg-title"><?php _e('Limit','cloudfw'); ?>:</div> 
        <span class="select">
        <select id="sg_blog_limit" name="sg_blog_limit" class="input" style="width:195px;" >
         
         <option value="">Default</option>
         <?php for ( $counter = 1; $counter <= 15; $counter++) { echo '<option>'.$counter.'</option>'; }?>  
             
        </select>
        </span>
        <div class="clear"></div>
        
        </div>
        
       
    </div> 
    <div class="clear"></div>
        
    <div class="module" style="float:left; margin-right:30px;">
        
        <div class="sg-title"><?php _e('Call Blog Container From Selected Categories','cloudfw'); ?>:</div> 
        <span class="select">
       
		<?php 	
        $_blog_categories  = wp_dropdown_categories('hierarchical=1&echo=0&hide_empty=0&name=sg_blog_cats&class=input%20input_400');
        $_blog_categories  = str_replace("id='sg_blog_cats'", "id='sg_blog_cats' multiple='multiple' autocomplete='off' style='height:150px; width:400px;'", $_blog_categories);
        $_blog_categories  = str_replace("class='input input_400' >", "class='input input_400' > <option value='' selected='selected'>Show All Categories</option>", $_blog_categories);
        echo $_blog_categories;
        ?>

        </span>
        
       
                    
        </div>
 		 <div class="clear"></div> 
        
        
 </div>

<div class="blogg_2 blog_hide" style="display:none;" >
 <div class="divider"></div>

 <div class="sector module">

	    <div class="module" style="float:left; margin-bottom:20px; margin-right:30px;">
        <div class="sg-title"><?php _e('Thumbnail Height','cloudfw'); ?>:</div><?php admin_create_input('sg_blog_thumb_height','',"input","text","input input_150");?> px 
        </div>
        
        <div class="module" style="float:left; margin: 0 30px 0 0;">
            
        <div class="sg-title"><?php _e('Show Excerpt?','cloudfw'); ?>:</div> 
         <?php admin_create_onoff('sg_blog_excerpt','',TRUE,'1');?>
        
        </div>
    
 </div>
 <div class="clear"></div>
</div>
<div class="divider"></div>

<div class="sector module">
      
        <div class="module" style="float:left; margin-top:0;">
        <a class="small-button small-brown sendeditor" id="sg_blog"><span><?php _e('Generate The Code','cloudfw'); ?></span></a>
        </div>
      
		<div class="clear"></div>
 
 </div>

        
<?php elseif($section == 'tab_portfolio'):?>

 <div class="sector module">
        
        <div class="module" style="float:left; margin:0 30px 20px 0;">
                            
        <div class="sg-title"><?php _e('Container Title','cloudfw'); ?>:</div> 
        <?php
               admin_create_input(
                    'sg_port_title',//id
                    '',//value
                    "input",
                    "text",
                    "input input_400_bold"
                );
               
        ?>
        
        </div>
         
       
       <div class="module" style="float:left;   margin: 0 30px 20px 0;">
        
        <div class="sg-title"><?php _e('Container Sub-Title','cloudfw'); ?>:</div> 
        <?php
               admin_create_input(
                    'sg_port_subtitle',//id
                    '',//value
                    "textarea",
                    "text",
                    "input input textarea_400px_2line sg_tab_content"
                );
               
        ?>
                                
      </div>
      
      <div class="clear"></div>
      
      <div class="module" style="float:left;  margin: 0 30px 20px 0;">
        <div class="sg-title"><?php _e('Columns','cloudfw'); ?>:</div>
            <span class="select">
            <select id="sg_port_columns" name="sg_port_columns" class="input" style="width:150px;" >
            <?php for ( $counter = 1; $counter <= 4; $counter++) { echo '<option',($counter == 3)? ' selected="selected"':NULL,'>'.$counter.'</option>'; }?>
            </select>
            </span>
        </div>
        
       <div class="module" style="float:left;  margin: 0 30px 20px 0;">
        <div class="sg-title"><?php _e('Post Limit','cloudfw'); ?>:</div>
            <span class="select">
            <select id="sg_port_limit" name="sg_port_limit" class="input" style="width:150px;" >
            <option value="-1"><?php _e('No Limit','cloudfw'); ?></option>
            <?php for ( $counter = 1; $counter <= 20; $counter++) { echo '<option>'.$counter.'</option>'; }?>
            </select>
            </span>
        </div>
        
        <div class="module" style="float:left; margin: 0 30px 20px 0;">
        <div class="sg-title"><?php _e('Height Of Thumbnails','cloudfw'); ?>:</div><?php admin_create_input('sg_port_height','',"input","text","input input_150");?> px 
        </div>
        
        <div class="module" style="float:left; margin: 0 30px 0 0;">
        <div class="sg-title"><?php _e('Show Portfolio Items In Carousel?','cloudfw'); ?>:</div> 
         <?php admin_create_onoff('sg_port_show_carousel','',FALSE,'1');?>
        </div> 
        
        <div class="clear"></div> 
        
 </div>
 
 <div class="divider"></div> 
 
 <div class="sector module">
 
 <div class="module" style="float:left; margin:0 30px 0 0;">
                
    <div class="sg-title"><?php _e('Please Select A Portfolio Source','cloudfw'); ?>:</div> 
    <span class="select">
            <select id="sg_pr_source" name="sg_pr_source" class="input change_options" style="width:195px;" pfix="sg_pr_" hidethis="sg_pr_hide" >
    
               <option value=""></option>
               <option value="1"><?php _e('From A Category','cloudfw'); ?></option>
               <option value="2"><?php _e('From A Post Gallery','cloudfw'); ?></option>
               <option value="3"><?php _e('From Selected Posts','cloudfw'); ?></option>
                 
            </select>
            </span>
    </div>
         <div class="clear"></div> 

 </div>
 
 
 <div class="sg_pr_1 sg_pr_hide" style="display:none;">
 
 <div class="divider"></div> 
 
 <div class="sector module">

     <?php
     
	 $categories = get_terms('cat-portfolio', 'orderby=name&hide_empty=1');
	 foreach ($categories as $cat):
			
				$out .= '<option value="'.$cat->term_id.'">'.$cat->name.'</option>';
				
	endforeach;
	 
	 ?>
        
    <div class="module" style="float:left; margin:0 30px 20px 0;">
                            
        <div class="sg-title"><?php _e('Portfolio Categories','cloudfw'); ?>:</div> 
         <span class="select">
       	<select class="input input_400" autocomplete="off" id="sg_port_cats" name="sg_port_cats"> 
       	<option selected="selected" value=""><?php _e('Select A Category','cloudfw'); ?></option>
       	<?php echo $out;?>
    	</select>
        </span>
      </div> 
   <div class="clear"></div> 
        
        <div class="clear"></div>
        <div class="module" style="float:left; margin-top:17px;">
        <div class="module">
            <a class="small-button small-brown sendeditor" id="sg_portfolio"><span><?php _e('Generate The Portfolio Code','cloudfw'); ?></span></a>
        </div>
        </div>
    
    <div class="clear"></div>
                        
                      
      
   
   </div>
   
   </div> <!-- / a category -->
   

 
 <div class="sg_pr_2 sg_pr_hide" style="display:none;">
 
 <div class="divider"></div> 
 
 <div class="sector module">
			
			<?php
        
                            
            $args = array(
            'post_type'	 		=>	array('portfolio'),
            'post_status'		=>	'publish',
            'posts_per_page'	=> -1,
            'orderby'    		=> 'menu_order ID',
            'order'      		=> 'DESC',
            );
    
        
            $posts = new WP_Query( $args );
    
            if( $posts->have_posts()) : while( $posts->have_posts() ) : $posts->the_post();
                
                $out .= '<option value="'.get_the_ID().'">'.__translate( get_the_title() ).'</option>';
                
            endwhile; endif;
         

         
         ?>
            
        <div class="module" style="float:left; margin:0 30px 20px 0;">
                                
            <div class="sg-title"><?php _e('Portfolio Posts','cloudfw'); ?>:</div> 
             <span class="select">
            <select class="input input_400" autocomplete="off" id="sg_port_posts" name="sg_port_posts"> 
            <option selected="selected" value=""><?php _e('Select A Portfolio Post','cloudfw'); ?></option>
            <?php echo $out;?>
            </select>
            </span>
          </div> 
       <div class="clear"></div> 
        
        <div class="clear"></div>
        <div class="module" style="float:left; margin-top:17px;">
        <div class="module">
            <a class="small-button small-brown sendeditor" id="sg_portfolio"><span><?php _e('Generate The Portfolio Code','cloudfw'); ?></span></a>
        </div>
        </div>
    
    <div class="clear"></div>
   
   </div>
   
   </div> <!-- / a post -->
   
   
   
   
 <div class="sg_pr_3 sg_pr_hide" style="display:none;">
 
 <div class="divider"></div> 
 
 <div class="sector module">
			
			<?php
			
			$other_attrs = $out = NULL;
    
            if( $posts->have_posts()) : while( $posts->have_posts() ) : $posts->the_post();
			
				$thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()),'thumbnail');
                
                $out .= '<option value="'.get_the_ID().'">'.__translate( get_the_title() ).'</option>';
				$other_attrs .= '
					<input type="hidden" id="sel-port-title-'.get_the_ID().'" value="'.esc_attr(__translate( get_the_title() )).'" />		
					<input type="hidden" id="sel-port-thumbnail-'.get_the_ID().'" value="'.esc_attr($thumbnail[0]).'" />		
					';

                
            endwhile; endif;
         
         ?>

        <div class="module" style="float:left; margin:0 30px 20px 0;">
                                
            <div class="sg-title"><?php _e('Portfolio Posts','cloudfw'); ?>:</div> 
             <span class="select">
            <select class="input input_400" autocomplete="off" id="sg_port_sel_posts" name="sg_port_sel_posts" multiple='multiple' > 
            <?php echo $out;?>
            </select>
            <?php echo $other_attrs;?>
            </span>
          </div> 
       <div class="clear"></div>
         
        <a class="small-button small-grey" id="sg_add_portfolio"><span><?php _e('Add Selected Posts','cloudfw'); ?></span></a>
       
	</div>
    
     
    <ul id="selected_portfolio_items" class="sortable_sliders ui-sortable"></ul>

    
	<div class="sector module">
        
        <div class="clear"></div>
        <div class="module" style="float:left; margin-top:17px;">
        <div class="module">
            <a class="small-button small-brown sendeditor" id="sg_portfolio"><span><?php _e('Generate The Portfolio Code','cloudfw'); ?></span></a>
        </div>
        </div>
    
    <div class="clear"></div>
   
   </div>
   
   </div> <!-- / selected posts -->
   
   
 <div class="clear"></div> 
        
 
      
<?php elseif($section == 'tab_slider'):?>

 
 <div class="sector module">
	
 </div>

<div class="divider"></div> 
 
 <div class="sector module">
  
	<div class="module" style="float:left;  margin-right:30px;"">
                        
    <div class="sg-title"><?php _e('Sliders','cloudfw'); ?>:</div> 
    <span class="select">
    <select id="sg_slider_ids" name="sg_slider_ids" class="input" style="width:400px;" >

        <?php 
		unset($option);
		
		echo '<option value=""></option>';
		
		$sliders = get_option(PFIX.'_slider_ids');
		
		
		if (is_array($sliders)): foreach ((array) $sliders as $slider_id_ => $slider){
			
			if ($slider["type"] == 'default_slider') continue;
			
			$option = '<option value="'.$slider_id_.'">';
            $option .=  esc_attr($slider["title"]);
            $option .= '</option>';
            ${'echo_'.$slider["type"]} .=  $option;
			
		} endif;
		
		
		$theme_sliders = cloudfw_sliders();
		
		foreach ($theme_sliders as $slider_id => $slider_item) {
				
			if (${'echo_'.$slider_id})
			echo '
			<optgroup label="'.$slider_item["name"].'">	'.${'echo_'.$slider_id}.'</optgroup>
			';
							
		}		

         
         ?>
         
    </select>
    </span>
                
    </div>
    <div class="clear"></div> 
</div>

   <div class="divider"></div> 
 
 <div class="sector module">
       
    <div class="module">
  		<a class="small-button small-brown sendeditor" id="sg_slider"><span><?php _e('Generate The Code','cloudfw'); ?></span></a>
    </div>
            
            
        </div>
    
    </div>

<?php endif;?>