<?php
/**
 * Framework options.
 * @package HappenStance
 * @since HappenStance 1.0.0
*/   
$happenstance_fonts = array(
			'default' => 'default',	
			'Abel' => 'Abel',			
			'Aclonica' => 'Aclonica',
			'Actor' => 'Actor',
			'Adamina' => 'Adamina',
			'Aldrich' => 'Aldrich',
			'Alice' => 'Alice',
			'Alike' => 'Alike',
			'Allan' => 'Allan',
			'Allerta' => 'Allerta',
      'Amarante' => 'Amarante',
			'Amaranth' => 'Amaranth',
      'Andika' => 'Andika',
			'Antic' => 'Antic',
			'Arimo' => 'Arimo',	
			'Artifika' => 'Artifika',
			'Arvo' => 'Arvo',
			'Brawler' => 'Brawler',
			'Buda' => 'Buda',	
      'Butcherman' => 'Butcherman',	
			'Cantarell' => 'Cantarell',	
      'Cherry Swash' => 'Cherry Swash',				
			'Chivo' => 'Chivo',			
			'Coda' => 'Coda',	
      'Concert One' => 'Concert One',		
			'Copse' => 'Copse',
			'Corben' => 'Corben',
			'Cousine' => 'Cousine',			
			'Coustard' => 'Coustard',
			'Covered By Your Grace' => 'Covered By Your Grace',
			'Crafty Girls' => 'Crafty Girls',
			'Crimson Text' => 'Crimson Text',
			'Crushed' => 'Crushed',
			'Cuprum' => 'Cuprum',
			'Damion' => 'Damion',
			'Dancing Script' => 'Dancing Script',
			'Dawning of a New Day' => 'Dawning of a New Day',
			'Days One' => 'Days One',
			'Delius' => 'Delius',
			'Delius Swash Caps' => 'Delius Swash Caps',
			'Delius Unicase' => 'Delius Unicase',
			'Didact Gothic' => 'Didact Gothic',
			'Dorsa' => 'Dorsa',
			'Droid Sans' => 'Droid Sans',
			'Droid Sans Mono' => 'Droid Sans Mono',
      'Droid Serif' => 'Droid Serif',
			'EB Garamond' => 'EB Garamond',
			'Expletus Sans' => 'Expletus Sans',
			'Fanwood Text' => 'Fanwood Text',
			'Federo' => 'Federo',
			'Fontdiner Swanky' => 'Fontdiner Swanky',
			'Forum' => 'Forum',
			'Francois One' => 'Francois One',
			'Gentium Basic' => 'Gentium Basic',
			'Gentium Book Basic' => 'Gentium Book Basic',
			'Geo' => 'Geo',
			'Geostar' => 'Geostar',
			'Geostar Fill' => 'Geostar Fill',
      'Gilda Display' => 'Gilda Display',
			'Give You Glory' => 'Give You Glory',
			'Gloria Hallelujah' => 'Gloria Hallelujah',
			'Goblin One' => 'Goblin One',
			'Goudy Bookletter 1911' => 'Goudy Bookletter 1911',
			'Gravitas One' => 'Gravitas One',
			'Gruppo' => 'Gruppo',
			'Hammersmith One' => 'Hammersmith One',
			'Holtwood One SC' => 'Holtwood One SC',
			'Homemade Apple' => 'Homemade Apple',
			'Inconsolata' => 'Inconsolata',
			'Indie Flower' => 'Indie Flower',
      'IM Fell English' => 'IM Fell English',
			'Irish Grover' => 'Irish Grover',
			'Irish Growler' => 'Irish Growler',
			'Istok Web' => 'Istok Web',
			'Judson' => 'Judson',
			'Julee' => 'Julee',
			'Just Another Hand' => 'Just Another Hand',
			'Just Me Again Down Here' => 'Just Me Again Down Here',
			'Kameron' => 'Kameron',
			'Kelly Slab' => 'Kelly Slab',
			'Kenia' => 'Kenia',
			'Kranky' => 'Kranky',
			'Kreon' => 'Kreon',
			'Kristi' => 'Kristi',
			'La Belle Aurore' => 'La Belle Aurore',
      'Lato' => 'Lato',
			'League Script' => 'League Script',
			'Leckerli One' => 'Leckerli One',
			'Lekton' => 'Lekton',
      'Lily Script One' => 'Lily Script One',
			'Limelight' => 'Limelight',
			'Lobster' => 'Lobster',
			'Lobster Two' => 'Lobster Two',
			'Lora' => 'Lora',
			'Love Ya Like A Sister' => 'Love Ya Like A Sister',
			'Loved by the King' => 'Loved by the King',
      'Lovers Quarrel' => 'Lovers Quarrel',
			'Luckiest Guy' => 'Luckiest Guy',
			'Maiden Orange' => 'Maiden Orange',
			'Mako' => 'Mako',
			'Marvel' => 'Marvel',
			'Maven Pro' => 'Maven Pro',
			'Meddon' => 'Meddon',
			'MedievalSharp' => 'MedievalSharp',
      'Medula One' => 'Medula One',
			'Megrim' => 'Megrim',
			'Merienda One' => 'Merienda One',
			'Merriweather' => 'Merriweather',
			'Metrophobic' => 'Metrophobic',
			'Michroma' => 'Michroma',
			'Miltonian Tattoo' => 'Miltonian Tattoo',
			'Miltonian' => 'Miltonian',
			'Modern Antiqua' => 'Modern Antiqua',
			'Molengo' => 'Molengo',
      'Monofett' => 'Monofett',
			'Monoton' => 'Monoton',
      'Montaga' => 'Montaga',
			'Montez' => 'Montez',
      'Montserrat' => 'Montserrat',
			'Mountains of Christmas' => 'Mountains of Christmas',
			'Muli Light' => 'Muli Light',
			'Muli Regular' => 'Muli Regular',
			'Neucha' => 'Neucha',
			'Neuton' => 'Neuton',
			'News Cycle' => 'News Cycle',
			'Nixie One' => 'Nixie One',
			'Nobile' => 'Nobile',
			'Nova Cut' => 'Nova Cut',
			'Nova Flat' => 'Nova Flat',
			'Nova Mono' => 'Nova Mono',
			'Nova Oval' => 'Nova Oval',
			'Nova Round' => 'Nova Round',
			'Nova Script' => 'Nova Script',
			'Nova Slim' => 'Nova Slim',
			'Nova Square' => 'Nova Square',
			'Numans' => 'Numans',
			'Nunito' => 'Nunito',
      'Open Sans' => 'Open Sans',
			'Oswald' => 'Oswald',
			'Over the Rainbow' => 'Over the Rainbow',
			'Ovo' => 'Ovo',
			'Pacifico' => 'Pacifico',
			'Passero One' => 'Passero One',
			'Patrick Hand' => 'Patrick Hand',
			'Paytone One' => 'Paytone One',
			'Permanent Marker' => 'Permanent Marker',
			'Philosopher' => 'Philosopher',
			'Play' => 'Play',
			'Playfair Display' => 'Playfair Display',
			'Podkova' => 'Podkova',
			'Poller One' => 'Poller One',
			'Pompiere' => 'Pompiere',
			'Prata' => 'Prata',
			'Prociono' => 'Prociono',
			'PT Sans' => 'PT Sans',
			'PT Sans Caption' => 'PT Sans Caption',
			'PT Sans Narrow' => 'PT Sans Narrow',
			'PT Serif' => 'PT Serif',
			'PT Serif Caption' => 'PT Serif Caption',
			'Puritan' => 'Puritan',
			'Quattrocento' => 'Quattrocento',
			'Quattrocento Sans' => 'Quattrocento Sans',
			'Questrial' => 'Questrial',
			'Radley' => 'Radley',
			'Raleway' => 'Raleway', 
      'Rationale' => 'Rationale',
			'Redressed' => 'Redressed',
      'Reenie Beanie' => 'Reenie Beanie', 
      'Roboto' => 'Roboto',
      'Roboto Condensed' => 'Roboto Condensed',
			'Rock Salt' => 'Rock Salt',
			'Rochester' => 'Rochester',
			'Rokkitt' => 'Rokkitt',
			'Rosario' => 'Rosario',
			'Ruslan Display' => 'Ruslan Display',
      'Sancreek' => 'Sancreek',
			'Sansita One' => 'Sansita One',
			'Schoolbell' => 'Schoolbell',
			'Shadows Into Light' => 'Shadows Into Light',
			'Shanti' => 'Shanti',
			'Short Stack' => 'Short Stack',
			'Sigmar One' => 'Sigmar One',
			'Six Caps' => 'Six Caps',
			'Slackey' => 'Slackey',
			'Smokum' => 'Smokum',
			'Smythe' => 'Smythe',
			'Sniglet' => 'Sniglet',
			'Snippet' => 'Snippet',
			'Sorts Mill Goudy' => 'Sorts Mill Goudy',
			'Special Elite' => 'Special Elite',
			'Spinnaker' => 'Spinnaker',
			'Stardos Stencil' => 'Stardos Stencil',
			'Sue Ellen Francisco' => 'Sue Ellen Francisco',
			'Sunshiney' => 'Sunshiney',
			'Swanky and Moo Moo' => 'Swanky and Moo Moo',
			'Syncopate' => 'Syncopate',
			'Tangerine' => 'Tangerine',
			'Tenor Sans' => ' Tenor Sans',
			'Terminal Dosis Light' => 'Terminal Dosis Light',
			'Tinos' => 'Tinos',
			'Tulpen One' => 'Tulpen One',
			'Ubuntu' => 'Ubuntu',
			'Ultra' => 'Ultra',
      'UnifrakturCook' => 'UnifrakturCook',
			'UnifrakturMaguntia' => 'UnifrakturMaguntia',
      'Unkempt' => 'Unkempt',
			'Unna' => 'Unna',
			'Varela' => 'Varela',
			'Varela Round' => 'Varela Round',
			'Vibur' => 'Vibur',
			'Vidaloka' => 'Vidaloka',
			'Volkhov' => 'Volkhov',
			'Vollkorn' => 'Vollkorn',
			'Voltaire' => 'Voltaire',
			'VT323' => 'VT323',
			'Waiting for the Sunrise' => 'Waiting for the Sunrise',
			'Wallpoet' => 'Wallpoet',
			'Walter Turncoat' => 'Walter Turncoat',
			'Wire One' => 'Wire One',
			'Yanone Kaffeesatz' => 'Yanone Kaffeesatz',
			'Yellowtail' => 'Yellowtail',
			'Yeseva One' => 'Yeseva One',
			'Zeyada' => 'Zeyada');
      
add_action('admin_init', 'happenstance_options_setup');
function happenstance_options_setup() {
global $happenstance_themename, $happenstance_shortname, $happenstance_fonts;
$happenstance_options = array (

array( "name" => __( 'HappenStance Options' , 'happenstance' ),
	"type" => "title"),

array( "type" => "open"),

// Start Tabs
array( "name" => "Start Tabs",
		"type" => "tabs-open",
		"icon" => "layout"),

	// Home
	array( "name" => __( '<i class="icon_house" aria-hidden="true"></i>Welcome' , 'happenstance' ),
			"id" => "tab_menu_0",
			"type" => "tab",
			"icon" => "layout",
			"class" => " selected first"),
	
	// General Settings
	array( "name" => __( '<i class="icon_key" aria-hidden="true"></i>General Settings' , 'happenstance' ),
			"id" => "tab_menu_1",
			"type" => "tab",
			"icon" => "layout",
			"class" => ""),
      
	// Header Settings
	array( "name" => __( '<i class="icon_cog" aria-hidden="true"></i>Header' , 'happenstance' ),
			"id" => "tab_menu_2",
			"type" => "tab",
			"icon" => "layout",
			"class" => ""),
      
	// Posts/Pages Settings
	array( "name" => __( '<i class="icon_documents" aria-hidden="true"></i>Posts/Pages' , 'happenstance' ),
			"id" => "tab_menu_3",
			"type" => "tab",
			"icon" => "layout",
			"class" => ""),
      
  // Post Entries Settings
	array( "name" => __( '<i class="icon_tags" aria-hidden="true"></i>Post Entries' , 'happenstance' ),
			"id" => "tab_menu_4",
			"type" => "tab",
			"icon" => "layout",
			"class" => ""),
      
	// Fonts
	array( "name" => __( '<i class="icon_pens" aria-hidden="true"></i>Fonts' , 'happenstance' ),
			"id" => "tab_menu_6",
			"type" => "tab",
			"icon" => "layout",
			"class" => ""),
	
	// Other settings Tab
	array( "name" => __( '<i class="icon_tools" aria-hidden="true"></i>Other Settings' , 'happenstance' ),
			"type" => "tab",
			"id" => "tab_menu_8",
			"class" => ""),
      
	// Suggested Plugins Tab
	array( "name" => __( '<i class="icon_folder-add" aria-hidden="true"></i>Suggested Plugins' , 'happenstance' ),
			"type" => "tab",
			"id" => "tab_menu_7",
			"class" => ""),

  // Get Premium
	array( "name" => __( '<i class="icon_cart" aria-hidden="true"></i>GET PREMIUM' , 'happenstance' ),
			"type" => "tab",
			"id" => "tab_menu_9",
			"class" => ""),	
      

// General setting Tab
array( "name" => "Close Tabs",
		"type" => "tabs-close",
		"icon" => "layout"),

array( "name" => "Start Container",
		"type" => "container-open",
		"icon" => "layout"),

// Home Container 0
array( "name" => "tab_content_0",
		"type" => "tabcontent-open",
		"display" => "block",
		"icon" => "layout"),

	// Home
	array( "name" => __( 'Welcome to HappenStance!' , 'happenstance' ),
		"type" => "heading",
		"icon" => "layout"),
	
	array("name" => __( 'First of all, I would like to thank you for choosing HappenStance! I firmly believe that you will be satisfied with this theme. In case of any problems or doubts, you can use the <a href="http://www.tomastoman.cz/support" target="_blank">HappenStance Official Support</a> (in English, German or Czech).' , 'happenstance' ),
		"type" => "infotext"),
	
		array( "name" => __( 'About HappenStance' , 'happenstance' ),
		"type" => "heading",
		"icon" => "layout"),
	
	array("name" => __( 'HappenStance is an easily customizable theme which can be used for your Blog, Magazine, Business, eCommerce or Events website. It is a fully responsive and Retina ready theme that allows for easy viewing on any device.' , 'happenstance' ),
		"type" => "infotext"),

array( "name" => "tab_content_0",
		"type" => "tabcontent-close",
		"icon" => "layout"),
// Close Home

// General setting Tab Container 1
array( "name" => "tab_content_1",
		"type" => "tabcontent-open",
		"display" => "none",
		"icon" => "layout"),

	// General settings
	array( "name" => __( 'General Settings' , 'happenstance' ),
		"type" => "heading",
		"icon" => "layout"),		

	array( "name" => __( 'Color Scheme' , 'happenstance' ),
		"desc" => __( 'Select one of the preconfigured Color Schemes. In Premium version, you can build your custom color scheme.' , 'happenstance' ),
		"id" => $happenstance_shortname."_css",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Blue (default)' => __( 'Blue (default)' , 'happenstance' ),
							'Gray' => __( 'Gray' , 'happenstance' ),
              'Green' => __( 'Green' , 'happenstance' ),
              'Purple' => __( 'Purple' , 'happenstance' ),),
		"type" => "select"),
    
  array( "name" => __( 'Layout Style' , 'happenstance' ),
		"desc" => __( 'Choose the layout style of your website.' , 'happenstance' ),
		"id" => $happenstance_shortname."_layout",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Boxed' => __( 'Boxed' , 'happenstance' ),
							'Wide' => __( 'Wide' , 'happenstance' )),
		"type" => "select"),
    
	array( "name" => __( 'Favicon URL' , 'happenstance' ),
		"desc" => __( 'Upload your own favicon image (16x16px) or directly insert its URL. You can create your own favicon using <a href="http://www.favicon.cc/" target="_blank">Favicon generator</a>.' , 'happenstance' ),
		"id" => $happenstance_shortname."_favicon_url",
		"type" => "upload-favicon",
		"std" => ""),
    
  array( "name" => __( 'Display Breadcrumb Navigation' , 'happenstance' ),
		"desc" => __( 'Set the Breadcrumb Navigation to be visible or not. The Breadcrumb NavXT plugin has to be installed for displaying it.' , 'happenstance' ),
		"id" => $happenstance_shortname."_display_breadcrumb",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'happenstance' ),
							'Hide' => __( 'Hide' , 'happenstance' )),
		"type" => "select"),
    
  array( "name" => __( 'Display Scroll-top Button' , 'happenstance' ),
		"desc" => __( 'Set the scroll-top button to be visible or not.' , 'happenstance' ),
		"id" => $happenstance_shortname."_display_scroll_top",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'happenstance' ),
							'Hide' => __( 'Hide' , 'happenstance' )),
		"type" => "select"),
    
	array( "name" => __( 'Background Settings (for Boxed layout)' , 'happenstance' ),
		"type" => "heading",
		"icon" => "layout"),
    
  array( "name" => __( 'Background Pattern' , 'happenstance' ),
		"desc" => __( 'Set the main background pattern (hatches) to be visible or not. This option works only in the Boxed layout style.' , 'happenstance' ),
		"id" => $happenstance_shortname."_display_background_pattern",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'happenstance' ),
							'Hide' => __( 'Hide' , 'happenstance' )),
		"type" => "select"),
    
	array( "name" => __( 'Background Pattern Opacity' , 'happenstance' ),
		"desc" => __( 'Select transparency of the main background pattern (10 = greatest transparency, 100 = opaque background pattern). This option works only in the Boxed layout style.' , 'happenstance' ),
		"id" => $happenstance_shortname."_background_pattern_opacity",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Default' => __( 'Default' , 'happenstance' ),
							'100' => '100',
							'90' => '90',
							'80' => '80',
              '70' => '70',
              '60' => '60',
              '50' => '50',
              '40' => '40',
              '30' => '30',
              '20' => '20',
              '10' => '10',),
		"type" => "select"),
    
  array( "name" => __( 'Display Shadow' , 'happenstance' ),
		"desc" => __( 'Set the main page container shadow to be visible or not. This option works only in the Boxed layout.' , 'happenstance' ),
		"id" => $happenstance_shortname."_display_main_shadow",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'happenstance' ),
							'Hide' => __( 'Hide' , 'happenstance' )),
		"type" => "select"),
    
	array( "name" => __( 'Sidebar Settings' , 'happenstance' ),
		"type" => "heading",
		"icon" => "layout"),
    
  array( "name" => __( 'Display Sidebar on Posts/Pages' , 'happenstance' ),
		"desc" => __( 'Set the right sidebar to be visible or not on the single posts and pages.' , 'happenstance' ),
		"id" => $happenstance_shortname."_display_sidebar",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'happenstance' ),
							'Hide' => __( 'Hide' , 'happenstance' )),
		"type" => "select"),
    
  array( "name" => __( 'Display Sidebar on Archives' , 'happenstance' ),
		"desc" => __( 'Set the right sidebar to be visible or not on the archive pages (including all archives, homepage and search results).' , 'happenstance' ),
		"id" => $happenstance_shortname."_display_sidebar_archives",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'happenstance' ),
							'Hide' => __( 'Hide' , 'happenstance' )),
		"type" => "select"),	
    
array( "name" => "tab_content_1",
		"type" => "tabcontent-close",
		"icon" => "layout"),
// Close General settings
   	

// Open Header settings
  array( "name" => "tab_content_2",
		"type" => "tabcontent-open",
		"display" => "none",
		"icon" => "layout"),
    
	array( "name" => __( 'Header Settings' , 'happenstance' ),
		"type" => "heading",
		"icon" => "layout"),
    
  array( "name" => __( 'Display Header Image' , 'happenstance' ),
		"desc" => __( 'Set the <a href="themes.php?page=custom-header">Header Image</a> to be visible on all pages or only on the homepage.' , 'happenstance' ),
		"id" => $happenstance_shortname."_display_header_image",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Everywhere' => __( 'Everywhere' , 'happenstance' ),
							'Only on Homepage' => __( 'Only on Homepage' , 'happenstance' )),
		"type" => "select"),
    
	array( "name" => __( 'Logo URL' , 'happenstance' ),
		"desc" => __( 'Upload your own logo in .jpg, .gif or .png format or directly insert its URL. The logo will automatically replace the Site Title.' , 'happenstance' ),
		"id" => $happenstance_shortname."_logo_url",
		"type" => "upload-logo",
		"std" => ""),
    
  array( "name" => __( 'Display Site Description' , 'happenstance' ),
		"desc" => __( 'Set the Site Description to be visible or not in your header.' , 'happenstance' ),
		"id" => $happenstance_shortname."_display_site_description",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'happenstance' ),
							'Hide' => __( 'Hide' , 'happenstance' )),
		"type" => "select"),
    
  array( "name" => __( 'Display Search Form' , 'happenstance' ),
		"desc" => __( 'Set the header Search Form to be visible or not.' , 'happenstance' ),
		"id" => $happenstance_shortname."_display_search_form",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'happenstance' ),
							'Hide' => __( 'Hide' , 'happenstance' )),
		"type" => "select"),
    
  // Contact information  
	array( "name" => __( 'Contact Information' , 'happenstance' ),
		"type" => "heading",
		"icon" => "layout"),
    
  array( "name" => __( 'Postal Address' , 'happenstance' ),
	  "desc" => __( 'Fill here your postal address to be displayed in header.' , 'happenstance' ),
		"id" => $happenstance_shortname."_header_address",
		"type" => "text",
		"std" => ""),
    
  array( "name" => __( 'Email Address' , 'happenstance' ),
	  "desc" => __( 'Fill here your email address to be displayed in header.' , 'happenstance' ),
		"id" => $happenstance_shortname."_header_email",
		"type" => "text",
		"std" => ""),
    
  array( "name" => __( 'Phone Number' , 'happenstance' ),
	  "desc" => __( 'Fill here your phone number to be displayed in header.' , 'happenstance' ),
		"id" => $happenstance_shortname."_header_phone",
		"type" => "text",
		"std" => ""),
    
  array( "name" => __( 'Skype Name' , 'happenstance' ),
	  "desc" => __( 'Fill here your Skype name to be displayed in header.' , 'happenstance' ),
		"id" => $happenstance_shortname."_header_skype",
		"type" => "text",
		"std" => ""),
    
array( "name" => "tab_content_2",
		"type" => "tabcontent-close",
		"icon" => "layout"),
// Close Header settings
 
  
// Open Posts/Pages settings
  array( "name" => "tab_content_3",
		"type" => "tabcontent-open",
		"display" => "none",
		"icon" => "layout"),
    
	array( "name" => __( 'Post Settings' , 'happenstance' ),
		"type" => "heading",
		"icon" => "layout"),
    
  array( "name" => __( 'Display Featured Image on single posts' , 'happenstance' ),
		"desc" => __( 'Set the Featured Image to be visible or not on the single posts.' , 'happenstance' ),
		"id" => $happenstance_shortname."_display_image_post",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'happenstance' ),
							'Hide' => __( 'Hide' , 'happenstance' )),
		"type" => "select"),
    
  array( "name" => __( 'Display Meta Box on single posts' , 'happenstance' ),
		"desc" => __( 'Set the Meta Box (with publish date, author, category and tags) to be visible or not on the single posts.' , 'happenstance' ),
		"id" => $happenstance_shortname."_display_meta_post",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'happenstance' ),
							'Hide' => __( 'Hide' , 'happenstance' )),
		"type" => "select"),
    
	array( "name" => __( 'Next/Previous Post Navigation' , 'happenstance' ),
		"desc" => __( 'This feature gives the possibility to easy navigate between the posts in chronological order.' , 'happenstance' ),
		"id" => $happenstance_shortname."_next_preview_post",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'happenstance' ),
							'Hide' => __( 'Hide' , 'happenstance' )),
		"type" => "select"),

// PAGES
	array( "name" => __( 'Page Settings' , 'happenstance' ),
		"type" => "heading",
		"icon" => "layout"),
    
  array( "name" => __( 'Display Featured Image on pages' , 'happenstance' ),
		"desc" => __( 'Set the Featured Image to be visible or not on pages.' , 'happenstance' ),
		"id" => $happenstance_shortname."_display_image_page",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'happenstance' ),
							'Hide' => __( 'Hide' , 'happenstance' )),
		"type" => "select"),
    
array( "name" => "tab_content_3",
		"type" => "tabcontent-close",
		"icon" => "layout"),
// Close Posts/Pages settings

// Open Post Entries settings
array( "name" => "tab_content_4",
		"type" => "tabcontent-open",
		"display" => "none",
		"icon" => "layout"), 
       
  array( "name" => __( 'Post Entries Settings' , 'happenstance' ),
		"type" => "heading",
		"icon" => "layout"),
    
  array( "name" => __( 'Post Entries Format' , 'happenstance' ),
		"desc" => __( 'Set the way how the post entries to be displayed.' , 'happenstance' ),
		"id" => $happenstance_shortname."_post_entry_format",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'One Column' => __( 'One Column' , 'happenstance' ),
              'Grid - Masonry' => __( 'Grid - Masonry' , 'happenstance' )),
		"type" => "select"),
    
  array( "name" => __( 'Display Meta Box on Post Entries' , 'happenstance' ),
		"desc" => __( 'Set the Meta Box (with publish date, author, comments, category and tags) to be visible or not on the post entries.' , 'happenstance' ),
		"id" => $happenstance_shortname."_display_meta_post_entry",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Display' => __( 'Display' , 'happenstance' ),
							'Hide' => __( 'Hide' , 'happenstance' )),
		"type" => "select"),  
    
  array( "name" => __( 'Content/Excerpt Displaying' , 'happenstance' ),
		"desc" => __( 'Select whether you want to display the full content or the post excerpts on your archive pages (including all archives, homepage and search results).' , 'happenstance' ),
		"id" => $happenstance_shortname."_content_archives",
		"std" => "",
		"class" => "hidden",
		"options" => array(	'Excerpt' => __( 'Excerpt' , 'happenstance' ),
							'Content' => __( 'Content' , 'happenstance' )),
		"type" => "select"),
    
  array( "name" => __( 'Excerpt Length' , 'happenstance' ),
	"desc" => __( 'Set here the number of words you wish to display in the excerpt.' , 'happenstance' ),
		"id" => $happenstance_shortname."_excerpt_length",
		"type" => "text",
		"std" => "40"),
    
  array( "name" => __( 'Blog Page' , 'happenstance' ),
		"type" => "heading",
		"icon" => "layout"),
  
  array( "name" => __( 'Latest Posts section headline' , 'happenstance' ),
	"desc" => __( 'Fill here the headline of the Latest Posts section displayed on your Blog page.' , 'happenstance' ),
		"id" => $happenstance_shortname."_latest_posts_headline",
		"type" => "text",
		"std" => __( 'Latest Posts' , 'happenstance' )),    

array( "name" => "tab_content_4",
		"type" => "tabcontent-close",
		"icon" => "layout"),
// Close Post Entries settings

// Open Fonts
array( "name" => "tab_content_6",
		"type" => "tabcontent-open",
		"display" => "none",
		"icon" => "layout"),

	array( "name" => __( 'Font Settings' , 'happenstance' ),
		"type" => "heading",
		"icon" => "layout"),

	array( "name" => __( 'Body font' , 'happenstance' ),
		"desc" => __( 'Select the main body font.' , 'happenstance' ),
		"id" => $happenstance_shortname."_body_google_fonts",
		"std" => "",
		"class" => "hidden",
		"options" => $happenstance_fonts,
		"type" => "select"),

	array( "name" => __( 'Site Title font' , 'happenstance' ),
		"desc" => __( 'Select a font for your Site Title in header.' , 'happenstance' ),
		"id" => $happenstance_shortname."_headings_google_fonts",
		"std" => "",
		"class" => "hidden",
		"options" => $happenstance_fonts,
		"type" => "select"),

	array( "name" => __( 'Site Description font' , 'happenstance' ),
		"desc" => __( 'Select a font for your Site Description in header.' , 'happenstance' ),
		"id" => $happenstance_shortname."_description_google_fonts",
		"std" => "",
		"class" => "hidden",
		"options" => $happenstance_fonts,
		"type" => "select"),
    
  array( "name" => __( 'Page/Post Headlines font' , 'happenstance' ),
		"desc" => __( 'Select a font for page/post headlines (h1 - h6).' , 'happenstance' ),
		"id" => $happenstance_shortname."_headline_google_fonts",
		"std" => "",
		"class" => "hidden",
		"options" => $happenstance_fonts,
		"type" => "select"),
    
  array( "name" => __( 'Post Entry Headline font' , 'happenstance' ),
		"desc" => __( 'Select a font for Post Entry headlines displayed on index/archive/search pages.' , 'happenstance' ),
		"id" => $happenstance_shortname."_postentry_google_fonts",
		"std" => "",
		"class" => "hidden",
		"options" => $happenstance_fonts,
		"type" => "select"),
    
  array( "name" => __( 'Sidebar/Footer Widget Headlines font' , 'happenstance' ),
		"desc" => __( 'Select a font for Sidebar/Footer Widget headlines.' , 'happenstance' ),
		"id" => $happenstance_shortname."_sidebar_google_fonts",
		"std" => "",
		"class" => "hidden",
		"options" => $happenstance_fonts,
		"type" => "select"),
    
	array( "name" => __( 'Main Header Menu font' , 'happenstance' ),
		"desc" => __( 'Select a font for your Main Header Menu.' , 'happenstance' ),
		"id" => $happenstance_shortname."_menu_google_fonts",
		"std" => "",
		"class" => "hidden",
		"options" => $happenstance_fonts,
		"type" => "select"),

array( "name" => "tab_content_6",
		"type" => "tabcontent-close",
		"icon" => "layout"),
// Close fonts

// Open Other settings
array( "name" => "tab_content_8",
		"type" => "tabcontent-open",
		"display" => "none",
		"icon" => "layout"),

	array( "name" => __( 'Other Settings' , 'happenstance' ),
		"type" => "heading",
		"icon" => "layout"),		

array( "type" => "infotext",
		"name" => __( 'OPTIONS: <a href="widgets.php">Widgets</a> | <a href="nav-menus.php">Menus</a> | <a href="themes.php?page=custom-header">Header Image</a> | <a href="themes.php?page=custom-background">Background Settings</a>' , 'happenstance' )),
    
  array( "name" => __( 'Custom CSS' , 'happenstance' ),
		"desc" => __( 'Fill here your own cascading style sheet information (CSS).<br />Example: #content p {font-size: 15px;} #sidebar p {font-size: 14px;}' , 'happenstance' ),
		"id" => $happenstance_shortname."_own_css",
		"type" => "textarea",
		"std" => ""),

array( "name" => "tab_content_8",
		"type" => "tabcontent-close",
		"icon" => "layout"),
// Close Other settings

// Open Suggested Plugins
array( "name" => "tab_content_7",
		"type" => "tabcontent-open",
		"display" => "none",
		"icon" => "layout"),

	array( "name" => __( 'Suggested Plugins' , 'happenstance' ),
		"type" => "heading",
		"icon" => "layout"),
		
  array( "type" => "infotext",
		"name" => __( 'This theme recommends the following plugins:<br /><br />
    1.) <a href="https://wordpress.org/plugins/breadcrumb-navxt/" target="_blank">Breadcrumb NavXT</a><br />
    2.) <a href="https://wordpress.org/plugins/the-events-calendar/" target="_blank">The Events Calendar</a>' , 'happenstance' )),
    
  array( "name" => "tab_content_7",
		"type" => "tabcontent-close",
		"icon" => "layout"),
    
// Close Suggested Plugins

// Open Get Premium
array( "name" => "tab_content_9",
		"type" => "tabcontent-open",
		"display" => "none",
		"icon" => "layout"),

	array( "name" => __( 'Get HappenStance Premium Version' , 'happenstance' ),
		"type" => "heading",
		"icon" => "layout"),
		
  array( "type" => "infotext",
		"name" => __( 'If you would like to purchase the HappenStance Premium Version, you can do so on <a href="http://www.tomastoman.cz/downloads/happenstance/" target="_blank">Developers Official Website</a>.' , 'happenstance' )),
    
  array( "type" => "infotext",
		"name" => __( '<strong>What the HappenStance Premium Version offers in addition?</strong><br />
    - Support for Drag-and-drop Page Builder with 37 in-built widgets for creating custom page layouts<br />
    - 8 pre-defined color schemes (Blue, Gray, Green, Orange, Pink, Purple, Red and Turquoise)<br />
    - Unlimited ability to create custom Color scheme (unlimited color settings)<br />
    - Ability to set different Header Images for the individual pages/posts/categories<br />
    - Ability to set different Header Slideshows for the individual pages/posts<br />
    - Ability to set different Sidebars/Footers for the individual pages/posts<br />
    - Image Slideshow with 3 different templates<br />
    - Font size settings<br />
    - Related Posts box on the single posts<br />
    - 4 dynamic Hover effects for the Post Thumbnails (Fade, Focus, Shadow and Tilt)<br />
    - 6 Custom widgets for displaying the latest posts from the specific categories (as a Column, Grid, List, Slider, Thumbnails and by Default - One Column)<br />
    - Custom Tab widget (displays popular posts, recent posts, comments and tags in tabbed format)<br />
    - Info-Box Custom widget (displays a text box with an icon)<br />
    - Header Carousel box (slider with your Latest Posts or a Custom Menu)<br />
    - Social Network Profile links in header (69 pre-defined icons)<br />
    - Facebook Like Box Custom widget<br />
    - Twitter Following Custom widget<br />
    - Integrated Facebook/Twitter/Google+1 share buttons on posts/pages/post entries<br />
    - Integrated automatic Sitemap generator with advanced options<br />
    - Custom Shortcodes for adding buttons, images, slideshows, tables and highlighted texts anywhere you like<br />
    - Custom Shortcode for displaying Google maps<br />
    - Custom Shortcode for displaying specific listing of posts anywhere you like<br />
    - 6 Custom Page templates<br />
    - Ability to add custom JavaScript code' , 'happenstance' )),
    
  array( "name" => "tab_content_9",
		"type" => "tabcontent-close",
		"icon" => "layout"),
    
// Close Get Premium

array("name" => "Close Container",
		"type" => "container-close",
		"icon" => "layout"),

array( "type" => "close") 
); return $happenstance_options; } 


add_action('admin_head', 'happenstance_admin_css');

function happenstance_admin_css() { ?>
     
	<script language="JavaScript">
		jQuery.noConflict();
		jQuery(document).ready(function($) {
	
		$(".tabs .tab[id^=tab_menu]").click(function() {
			var curMenu=$(this);
			$(".tabs .tab[id^=tab_menu]").removeClass("selected");
			curMenu.addClass("selected");
	
			var index=curMenu.attr("id").split("tab_menu_")[1];
			$(".curvedContainer .tabcontent").css("display","none");
			$(".curvedContainer #tab_content_"+index).css("display","block");
		});
	});
	</script>

<?php }
function happenstance_add_admin() {
	global $happenstance_themename, $happenstance_shortname;
  $happenstance_options = happenstance_options_setup();
	if ( isset ( $_GET['page'] ) && ( $_GET['page'] == basename(__FILE__) ) ) {
		if ( isset ($_REQUEST['action']) && ( 'save' == $_REQUEST['action'] ) ){
      if ( !empty($_POST) && check_admin_referer('happenstance_save_options','happenstance_save_options_field' ) ) {
			foreach ( $happenstance_options as $value ) {
				if ( array_key_exists('id', $value) ) {
					if ( isset( $_REQUEST[ $value['id'] ] ) ) {
            $happenstance_options_array = array( 'happenstance_css' => sanitize_text_field( $_REQUEST[ 'happenstance_css' ] ),
              'happenstance_layout' => sanitize_text_field( $_REQUEST[ 'happenstance_layout' ] ),
              'happenstance_favicon_url' => esc_url_raw( $_REQUEST[ 'happenstance_favicon_url' ] ),
              'happenstance_display_breadcrumb' => sanitize_text_field( $_REQUEST[ 'happenstance_display_breadcrumb' ] ),
              'happenstance_display_scroll_top' => sanitize_text_field( $_REQUEST[ 'happenstance_display_scroll_top' ] ),
              'happenstance_display_background_pattern' => sanitize_text_field( $_REQUEST[ 'happenstance_display_background_pattern' ] ),
              'happenstance_background_pattern_opacity' => sanitize_text_field( $_REQUEST[ 'happenstance_background_pattern_opacity' ] ),
              'happenstance_display_main_shadow' => sanitize_text_field( $_REQUEST[ 'happenstance_display_main_shadow' ] ),
              'happenstance_display_sidebar' => sanitize_text_field( $_REQUEST[ 'happenstance_display_sidebar' ] ),
              'happenstance_display_sidebar_archives' => sanitize_text_field( $_REQUEST[ 'happenstance_display_sidebar_archives' ] ),
              'happenstance_display_header_image' => sanitize_text_field( $_REQUEST[ 'happenstance_display_header_image' ] ),
              'happenstance_logo_url' => esc_url_raw( $_REQUEST[ 'happenstance_logo_url' ] ),
              'happenstance_display_site_description' => sanitize_text_field( $_REQUEST[ 'happenstance_display_site_description' ] ),
              'happenstance_display_search_form' => sanitize_text_field( $_REQUEST[ 'happenstance_display_search_form' ] ),
              'happenstance_header_address' => sanitize_text_field( $_REQUEST[ 'happenstance_header_address' ] ),
              'happenstance_header_email' => sanitize_text_field( $_REQUEST[ 'happenstance_header_email' ] ),
              'happenstance_header_phone' => sanitize_text_field( $_REQUEST[ 'happenstance_header_phone' ] ),
              'happenstance_header_skype' => sanitize_text_field( $_REQUEST[ 'happenstance_header_skype' ] ),
              'happenstance_display_image_post' => sanitize_text_field( $_REQUEST[ 'happenstance_display_image_post' ] ),
              'happenstance_display_meta_post' => sanitize_text_field( $_REQUEST[ 'happenstance_display_meta_post' ] ),
              'happenstance_next_preview_post' => sanitize_text_field( $_REQUEST[ 'happenstance_next_preview_post' ] ),
              'happenstance_display_image_page' => sanitize_text_field( $_REQUEST[ 'happenstance_display_image_page' ] ),
              'happenstance_post_entry_format' => sanitize_text_field( $_REQUEST[ 'happenstance_post_entry_format' ] ),
              'happenstance_display_meta_post_entry' => sanitize_text_field( $_REQUEST[ 'happenstance_display_meta_post_entry' ] ),
              'happenstance_content_archives' => sanitize_text_field( $_REQUEST[ 'happenstance_content_archives' ] ),
              'happenstance_excerpt_length' => sanitize_text_field( $_REQUEST[ 'happenstance_excerpt_length' ] ),
              'happenstance_latest_posts_headline' => sanitize_text_field( $_REQUEST[ 'happenstance_latest_posts_headline' ] ),
              'happenstance_body_google_fonts' => sanitize_text_field( $_REQUEST[ 'happenstance_body_google_fonts' ] ), 
              'happenstance_headings_google_fonts' => sanitize_text_field( $_REQUEST[ 'happenstance_headings_google_fonts' ] ),
              'happenstance_description_google_fonts' => sanitize_text_field( $_REQUEST[ 'happenstance_description_google_fonts' ] ),
              'happenstance_headline_google_fonts' => sanitize_text_field( $_REQUEST[ 'happenstance_headline_google_fonts' ] ),
              'happenstance_postentry_google_fonts' => sanitize_text_field( $_REQUEST[ 'happenstance_postentry_google_fonts' ] ),
              'happenstance_sidebar_google_fonts' => sanitize_text_field( $_REQUEST[ 'happenstance_sidebar_google_fonts' ] ),
              'happenstance_menu_google_fonts' => sanitize_text_field( $_REQUEST[ 'happenstance_menu_google_fonts' ] ),
              'happenstance_own_css' => sanitize_text_field( $_REQUEST[ 'happenstance_own_css' ] ) );
						update_option( 'happenstance_options', $happenstance_options_array  );
					}
					else {
						delete_option( 'happenstance_options' );
					}
				}
			}
			header("Location: themes.php?page=".basename(__FILE__)."&saved=true");
		}
    }else if ( isset ($_REQUEST['action']) && ( 'reset' == $_REQUEST['action'] ) ) {
			foreach ($happenstance_options as $value) {
				if ( array_key_exists('id', $value) ) {
					delete_option( 'happenstance_options' );
				}
			}
			header("Location: themes.php?page=".basename(__FILE__)."&reset=true");
		}
	}
	add_theme_page($happenstance_themename." Options", __( 'Theme Options' , 'happenstance' ), 'edit_theme_options', 'fw-options.php', 'happenstance_admin', '', '1');
}

$happenstance_options_db = get_option ('happenstance_options');

function happenstance_admin() {
	global $happenstance_themename, $happenstance_shortname, $happenstance_themever, $fwver, $happenstance_manualurl;
  $happenstance_options = happenstance_options_setup(); 
	if (isset($_REQUEST["saved"]) && !empty($_REQUEST["saved"])) echo '<div id="message" class="updated fade"><p><strong>'.$happenstance_themename.' '.__( 'settings saved.', 'happenstance' ).'</strong></p></div>';
	if (isset($_REQUEST["reset"]) && !empty($_REQUEST["reset"])) echo '<div id="message" class="error fade"><p><strong>'.$happenstance_themename.' '.__( 'settings reset.', 'happenstance' ).'</strong></p></div>';
  wp_enqueue_style('happenstance-framework-style', get_template_directory_uri() . '/functions/be/css.css');
  wp_enqueue_style('happenstance-framework-icons', get_template_directory_uri() . '/css/elegantfont.css');
?>

	<div id="wrap_fm"><!-- [ Header ]-->
		<div class="header_fm">
			<div class="logo_fm"><?php _e( 'Theme Options' , 'happenstance' ); ?></div>
			<div class="frame_vers_fm">
				<div class="theme_version_fm"><?php echo $happenstance_themename;?> <strong><?php echo $happenstance_themever;?></strong></div>
				<div class="clear"></div>
			</div>
		</div>

		<!-- [ Top Menu ]-->
		<div class="top_menu_fm">
			<a target="_blank" class="doc_fm" href="<?php echo esc_url($happenstance_manualurl); ?>"><?php _e( 'Documentation' , 'happenstance' ); ?></a><a target="_blank" class="support_fm" href="http://www.tomastoman.cz/support"><?php _e( 'Support' , 'happenstance' ); ?></a><a target="_blank" class="premium_fm" href="http://www.tomastoman.cz/downloads/happenstance/"><?php _e( 'Get Premium Version' , 'happenstance' ); ?></a>
		</div>


	<form method="post">
	<?php 
	foreach ($happenstance_options as $value) {
	switch ( $value['type'] ) {
	case "open":
	?> 
	<?php break; case "title": ?> 

	<!-- [ Body ]-->
	<div id="wrap_body_fm">
	<div class="tabscontainer">


	<?php break; case "close": ?> 

	<!-- start form -->
	<div class="col_100">
		<div class="col_50">
			<input id="submit" class="button-primary" name="save" type="submit" value="<?php _e( 'Save all changes' , 'happenstance' ); ?>" /> <input type="hidden" name="action" value="save" />
      <?php wp_nonce_field( 'happenstance_save_options','happenstance_save_options_field' ); ?>
			</form>
		</div>
	 	<div class="col_50">
		 	<form method="post">
				<input class="reset button-primary" name="reset" type="submit" value="<?php _e( 'Reset all settings' , 'happenstance' ); ?>" />
				<input type="hidden" name="action" value="reset" />
			</form>
		</div>	
		<div class="clear"></div>
	</div>
	<!-- end form -->
</div></div>

<?php break;case 'text': ?>
<?php global $happenstance_options_db; ?>
	<div class="name_fm"><?php echo esc_html($value['name']); ?></div>
	<div class="input_fm"><input name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>" type="<?php echo esc_attr($value['type']); ?>" value="<?php if ( $happenstance_options_db[$value['id']] != "" ) { echo esc_attr($happenstance_options_db[$value['id']]); } else { echo esc_attr($value['std']); } ?>" /></div>
	<div class="desc_fm"><small><?php echo $value['desc']; ?></small></div>
  
<?php break;case 'url': ?>
<?php global $happenstance_options_db; ?>
	<div class="name_fm"><?php echo esc_html($value['name']); ?></div>
	<div class="input_fm"><input name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>" type="text" value="<?php if ( $happenstance_options_db[$value['id']] != "" ) { echo esc_url($happenstance_options_db[$value['id']]); } else { echo esc_url($value['std']); } ?>" /></div>
	<div class="desc_fm"><small><?php echo $value['desc']; ?></small></div>
  
<?php break;case 'upload-favicon': ?>
<?php global $happenstance_options_db; ?>
<?php wp_enqueue_media();
wp_enqueue_script('happenstance_my-admin-js-favicon', get_template_directory_uri() . '/js/custom-uploader-favicon.js', array('jquery')); ?>
	<div class="name_fm"><?php echo esc_html($value['name']); ?></div>
  <input class="upload_image" type="text" name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>" value="<?php if ( $happenstance_options_db[$value['id']] != "") { echo esc_url($happenstance_options_db[$value['id']]); } else { echo esc_url($value['std']); } ?>" /> 
  <input class="upload_image_button button" type="button" value="<?php _e( 'Upload Image' , 'happenstance' ); ?>" />
	<div class="desc_fm"><small><?php echo $value['desc']; ?></small></div>
  
<?php break;case 'upload-logo': ?>
<?php global $happenstance_options_db; ?>
<?php wp_enqueue_script('happenstance_my-admin-js-logo', get_template_directory_uri() . '/js/custom-uploader-logo.js', array('jquery')); ?>
	<div class="name_fm"><?php echo esc_html($value['name']); ?></div>
  <input class="upload_logo" type="text" name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>" value="<?php if ( $happenstance_options_db[$value['id']] != "") { echo esc_url($happenstance_options_db[$value['id']]); } else { echo esc_url($value['std']); } ?>" /> 
  <input class="upload_logo_button button" type="button" value="<?php _e( 'Upload Image' , 'happenstance' ); ?>" />
	<div class="desc_fm"><small><?php echo $value['desc']; ?></small></div>
  
<?php break;case 'color': ?>
	<div class="name_fm"><?php echo esc_html($value['name']); ?></div>
	<div class="input_fm"><input class="color" name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>" type="text" value="<?php if ( get_option( $value['id'] ) != "") { echo esc_attr(get_option( $value['id'] )); } else { echo esc_attr($value['std']); } ?>" disabled readonly /></div>
	<div class="desc_fm"><small><?php echo $value['desc']; ?></small></div>

<?php break; case 'textarea':?>
<?php global $happenstance_options_db; ?>
	<div class="name_fm"><?php echo esc_html($value['name']); ?></div>
	<div class="input_fm"><textarea name="<?php echo esc_attr($value['id']); ?>" style="height: 100px;" type="<?php echo esc_attr($value['type']); ?>" cols="" rows=""><?php if ( $happenstance_options_db[$value['id']] != "") { echo esc_attr($happenstance_options_db[$value['id']]); } else { echo esc_attr($value['std']); } ?></textarea></div>
	<div class="desc_fm"><small><?php echo $value['desc']; ?></small></div>

<?php break; case 'select': ?>
<?php global $happenstance_options_db; ?>
	<div class="name_fm"><?php echo esc_html($value['name']); ?></div>
	<div class="input_fm"><select name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>"><?php foreach ($value['options'] as $key => $option) { ?>
  <option value="<?php echo esc_attr($key); ?>" <?php if ($happenstance_options_db[$value['id']] == $key) { selected( $happenstance_options_db[$value['id']], $key, true ); } elseif ($key == $value['std']) { selected( $happenstance_options_db[$value['id']], $key, true ); } ?>><?php echo esc_html($option); ?></option>
<?php } ?>
	</select></div>
	<div class="desc_fm"><small><?php echo $value['desc']; ?></small></div>
	
	<?php break; case "heading":?>
	<h1><?php echo $value['name']; ?></h1>
	
	<?php break; case "subheader":?>
	<div class="name_fm"><?php echo $value['name']; ?></div>
	
  <?php break; case "infotext":?>
	<div class="infotext"><?php echo $value['name']; ?></div>
	
	<?php break; case "paragraph":?>
	<div class="desc_fm"><small><?php echo $value['name']; ?></small></div>
  	
	<?php break; case "tabs-open":?>	
	<div class="tabs">
	
	<?php break; case "tabs-close":?>	
	</div>	
	
	<?php break; case "tab":?>	
	<div class="tab<?php echo $value['class']; ?>" id="<?php echo $value['id']; ?>">
	<div class="link"><?php echo $value['name']; ?></div>
	<div class="arrow"></div>
	</div>
 	
 	<?php break; case "container-open":?>	
	<div class="curvedContainer">
 	
 	<?php break; case "container-close":?>	
	</div>	
 	
	<?php break; case "tabcontent-open":?>	
	<div class="tabcontent" id="<?php echo $value['name']; ?>" style="display:<?php echo $value['display']; ?>" >
	
	<?php break; case "tabcontent-close":?>	
	</div>
	
 	
<?php break;

}
}
?>

<?php
}

add_action('admin_menu', 'happenstance_add_admin');
?>