public function options_box_content($post)
    {
        ?>
        	<div id='bshLogo'></div>
        	<div id='optionsContainer'>
        		<div id='menuBackground'></div>

	        	<ul id='bshMenu'>
	        		<li class='active'><?php 
        _e('Register Page Options', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Form Fields', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Slideshow Options', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Help', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Shortcode Guide', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Get Support', THEMENAME);
        ?>
</l1>
	        	</ul>
	        	<div id='bshOptions'>
		        	<input id='bshSaveTop' name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="Update">

	        		<section class='active'>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the title of the registration successful page.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_register_success_title', true);
        $value = empty($value) ? 'Registration Successful' : $value;
        ?>
	        				<label for='_est_register_success_title' class='sectionTitle'><?php 
        _e('Registration Success Title', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_register_success_title' name='_est_register_success_title' value='<?php 
        echo esc_attr($value);
        ?>
'>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text shown one the user submits the registration form. The user will need to activate his/her account using his email account so you should say something about this here..', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_register_success_text', true);
        $value = empty($value) ? '<p>Your registration was successful, all that\'s left is activating your account. We\'ve sent an activation link to your email address.</p><p>Click on the activation link, or paste it into the URL bar of your browser to activate your account</p>' : $value;
        ?>
	        				<label for='_est_register_success_text' class='sectionTitle'><?php 
        _e('Registration Success Text', THEMENAME);
        ?>
</label>
		        			<textarea class='widefat redactor' style='height:120px;' id='_est_register_success_text' name='_est_register_success_text'><?php 
        echo $value;
        ?>
</textarea>
	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the subject of the account activation email.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_register_activate_subject', true);
        $value = empty($value) ? get_bloginfo() . ' - Activate Your Account' : $value;
        ?>
	        				<label for='_est_register_activate_subject' class='sectionTitle'><?php 
        _e('Activation Email Subject', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_register_activate_subject' name='_est_register_activate_subject' value='<?php 
        echo esc_attr($value);
        ?>
'>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text you would like to use in the account activation email.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_register_activate_message', true);
        $value = empty($value) ? '<p>Thanks for creating an account at ' . get_bloginfo() . '. The last step is to activate your account by clicking on the link below. ' : $value;
        ?>
	        				<label for='_est_register_activate_message' class='sectionTitle'><?php 
        _e('Activation Email Message', THEMENAME);
        ?>
</label>
		        			<textarea class='widefat redactor' style='height:120px;' id='_est_register_activate_message' name='_est_register_activate_message'><?php 
        echo $value;
        ?>
</textarea>
	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the title for the page shown when an incorrect activation link is used.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_invalid_key_title', true);
        $value = empty($value) ? 'Unable To Activate Account' : $value;
        ?>
	        				<label for='_est_invalid_key_title' class='sectionTitle'><?php 
        _e('Activation Failed Title', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_invalid_key_title' name='_est_invalid_key_title' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text to show on the page if the account activation fails due to an invalid security key.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_invalid_key_title', true);
        $value = empty($value) ? '<p>Your security key seems to be invalid so we can not activate your account. This usually happens if you copy paste the link and leave an extra character in it.</p>' : $value;
        ?>
	        				<label for='_est_invalid_key_message' class='sectionTitle'><?php 
        _e('Activation Failed Text', THEMENAME);
        ?>
</label>
		        			<textarea class='widefat redactor' style='height:120px;' id='_est_invalid_key_message' name='_est_invalid_key_message'><?php 
        echo $value;
        ?>
</textarea>
	        			</div>




	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the title for the page shown when an activation has been completed.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_account_active_success_title', true);
        $value = empty($value) ? 'Your Account Is Now Active' : $value;
        ?>
	        				<label for='_est_account_active_success_title' class='sectionTitle'><?php 
        _e('Activation Success Title', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_account_active_success_title' name='_est_account_active_success_title' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text to show on the page if the account activation was successful.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_account_active_success_message', true);
        $value = empty($value) ? '<p>Your account is now active and you can now log in at any time.</p>' : $value;
        ?>
	        				<label for='_est_account_active_success_message' class='sectionTitle'><?php 
        _e('Activation Success Text', THEMENAME);
        ?>
</label>
		        			<textarea class='widefat redactor' style='height:120px;' id='_est_account_active_success_message' name='_est_account_active_success_message'><?php 
        echo $value;
        ?>
</textarea>
	        			</div>



	        		</section>

					<section>
	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo _e('Select the profile fields you would like to use during registration', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_customdatas' class='sectionTitle'><?php 
        _e('Profile Fields To Show', THEMENAME);
        ?>
</label>

	        				<?php 
        $details = get_option('est_profilefields');
        $selection = get_post_meta($post->ID, '_est_profilefields', true);
        ?>

			        				<span class='checkAll'><?php 
        _e('select all', THEMENAME);
        ?>
</span>
			        				<span class='checkNone'><?php 
        _e('select none', THEMENAME);
        ?>
</span>

		        				<table class='choices'>
		        					<thead>
		        					<tr>
		        						<th></th>
		        						<th class='text-left'><?php 
        _e('Profile Field', THEMENAME);
        ?>
</th>
		        						<th><?php 
        _e('Order', THEMENAME);
        ?>
</th>
		        						<th><?php 
        _e('Required', THEMENAME);
        ?>
</th>
		        					</tr>
		        					</thead>
		        					<tbody>

			        				<?php 
        foreach ($details as $key => $datail) {
            if (empty($selection)) {
                $checked = '';
            } else {
                $checked = (!empty($selection[$key]['show']) and $selection[$key]['show'] == 'yes') ? 'checked="checked"' : '';
            }
            ?>
			        				<tr>
				        				<td class='checkbox'>
					        				<input <?php 
            echo $checked;
            ?>
 type='checkbox' id='_est_profilefields-<?php 
            echo $i;
            ?>
' name='_est_profilefields[<?php 
            echo $key;
            ?>
][show]' value='yes'>
				        				</td>
				        				<td>
					        				<label for='_est_profilefields-<?php 
            echo $i;
            ?>
'><?php 
            echo $datail['name'];
            ?>
</label>
				        				</td>
				        				<td class='order'>
				        					<?php 
            $order = !empty($selection[$key]['order']) ? $selection[$key]['order'] : '';
            ?>
				        					<input type='text' name='_est_profilefields[<?php 
            echo $key;
            ?>
][order]' value='<?php 
            echo $order;
            ?>
'>
				        				</td>
				        				<td class='checkbox'>
				        					<?php 
            $required = !empty($selection[$key]['required']) ? 'checked="checked"' : '';
            ?>
					        				<input <?php 
            echo $required;
            ?>
 type='checkbox' id='_est_profilefields_required-<?php 
            echo $i;
            ?>
' name='_est_profilefields[<?php 
            echo $key;
            ?>
][required]' value='yes'>
				        				</td>

			        				</tr>
				        			<input type='hidden' name='_est_profilefields[<?php 
            echo $key;
            ?>
][type]' value='profilefields'>
		        				<?php 
            $i++;
        }
        ?>
			        				</tbody>
		        				</table>
	        				<div class='clear'></div>

	        			</div>
					</section>


	        		<section>
	        			<div class='option'>

		        		<?php 
        _e('
		        			<p>
		        			If you upload <strong>one image</strong> to this page that image will be used as the background for the search page. If you upload <strong>multiple images</strong> to this page you can set up a slideshow, or a different image to show up on each page load. The following options all apply to situations where you have uploaded more than one image.
		        			</p>
		        			', THEMENAME);
        ?>
		        		</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you have uploaded multiple images to the page you can choose to display them all using a fading transition effect or load a new one on each page load.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_search_background_type' class='sectionTitle'><?php 
        _e('Background Type', THEMENAME);
        ?>
</label>

	        				<?php 
        $choices = array('Slideshow' => 'slideshow', 'New image on each page load' => 'pageload');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_search_background_type', true);
        $current = empty($current) ? 'slideshow' : $current;
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'default') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_search_background_type-<?php 
            echo $i;
            ?>
' name='_est_search_background_type' value='<?php 
            echo $value;
            ?>
'><label for='_est_search_background_type-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>


	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you\'ve selected the slideshow option above you can set the time each image is displayed for here.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_slideshow_speed', true);
        $value = empty($value) ? '12' : $value;
        ?>
	        				<label for='_est_button_text' class='sectionTitle'><?php 
        _e('Slideshow Speed (in seconds)', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_slideshow_speed' name='_est_slideshow_speed' value='<?php 
        echo $value;
        ?>
'>
	        			</div>



		        	</section>




	        		<section class='helpSection'>
	        			<?php 
        _e('

							<p>The search page template allows you to crearte a beautiful full screen search page to capture users. It is extremely customizable allowing you to specify how users can search and what parameters they can use.</p>
<p>To create the full size backgrounds for the search page all you need to do is upload one or more large image in the add media section. These will be used as the basis for the rotation of images.</p>
<p>Search pages allow you to modify the following settings:</p>
<ul>
	<li>Text Options
<ul>
	<li><strong>Search Placeholder</strong>: Specify the text shown inside the search box by default</li>
	<li><strong>Button Text</strong>: Specify the button text</li>
	<li><strong>Advanced Options Open Text</strong>: Specify the text in the advanced search tab when it is closed</li>
	<li><strong>Advanced Options Closed Text</strong>: Specify the text in the advanced search tab when it is open</li>
</ul>
</li>
	<li>Slideshow Options
<ul>
	<li><strong>Background Type</strong>: Select how you want to show your images. You can cycle through them or show a different one on each reload.</li>
	<li><strong>Slideshow Speed</strong>: Select how long each image is shown</li>
</ul>
</li>
	<li>Advanced Search
<ul>
	<li><strong>Enable Advanced Search</strong>: If enabled, users will be able to use the parameters you specify to narrow their search.</li>
	<li><strong>Built In Details To Show</strong>: This large table allows you to select which built in details you want to allow the user to use. You can select each detail and then select the control type it should use. In addition you can type a numeric order into the box to make them show up in the order you\'d like.</li>
	<li><strong>Custom In Details To Show</strong>: This large table allows you to select which custom details you want to allow the user to use. You can select each detail and then select the control type it should use. In addition you can type a numeric order into the box to make them show up in the order you\'d like</li>
</ul>
</li>
	<li>Structure
<ul>
	<li><strong>Search Height</strong>: This option allows you to choose between a full-page search or a search with a specific height. If a specific height is selected you will be able to add content into the editor, just like on other pages. This is great for creating some beautiful <a href="http://airbnb.com">airbnb</a> style pages.</li>
	<li><strong>Layout</strong>: The layout option applies to this page if a specific search height is selected. In this case you can choose a layout.</li>
	<li><strong>Sidebar</strong>: If a search height is specifically chosen and a layout with a sidebar is used you can select which sidebar should show up here.</li>
</ul>
</li>
</ul>

	        			', THEMENAME);
        ?>
	        		</section>

	        		<section class='helpSection'>
	        			<?php 
        echo bsh_docs_shortcodes();
        ?>
		        	</section>
		        	<section class='helpSection'>
			        	<?php 
        echo bsh_docs_get_support();
        ?>
			   		</section>

	        	</div>
	        	<div class='clear'></div>
	        </div>

        <?php 
    }
    public function options_box_content($post)
    {
        ?>
        	<div id='bshLogo'></div>
        	<div id='optionsContainer'>
        		<div id='menuBackground'></div>

	        	<ul id='bshMenu'>
	        		<li class='active'><?php 
        _e('Booking Options', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Structure', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Payment Options', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Text Options', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Email Settings', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Help', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Shortcode Guide', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Get Support', THEMENAME);
        ?>
</l1>
	        	</ul>
	        	<div id='bshOptions'>
		        	<input id='bshSaveTop' name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="Update">

	        		<section class='active'>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select how you want the bookings to be performed', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_booking_type' class='sectionTitle'><?php 
        _e('Booking Type', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Booking Only' => 'booking', 'Booking &amp; Payment' => 'payment');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_booking_type', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = (!empty($current) and $current == $value or empty($current) and $value == 'booking') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_booking_type-<?php 
            echo $i;
            ?>
' name='_est_booking_type' value='<?php 
            echo $value;
            ?>
'><label for='_est_booking_type-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>



					</section>
					<section>
						        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the slider (if any) to use on the page', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $slider = get_post_meta($post->ID, '_est_slider', true);
        $slider_shortcode = get_post_meta($post->ID, '_est_slider_shortcode', true);
        $checked_default = (empty($slider) or $slider == 'default') ? 'checked="checked"' : '';
        $checked_specify = (!empty($slider) and $slider == 'specify') ? 'checked="checked"' : '';
        ?>
	        				<label for='_est_slider' class='sectionTitle'><?php 
        _e('Slider To Use', THEMENAME);
        ?>
</label>

	        				<p>
	        				<input id='_est_slider_0' <?php 
        echo $checked_default;
        ?>
 type='radio' name='_est_slider' value='default'> <label for='_est_slider_0'><?php 
        _e('Use Default Slider', THEMENAME);
        ?>
</label><br>
	        				<input id='_est_slider_1' <?php 
        echo $checked_specify;
        ?>
 type='radio' name='_est_slider' value='specify'> <label for='_est_slider_1'><?php 
        _e('Specify Slider:', THEMENAME);
        ?>
</label><br>
	        				</p>
		        			<input type='text' class='widefat' id='_est_slider_shortcode' name='_est_slider_shortcode' value='<?php 
        echo $slider_shortcode;
        ?>
'></p>
	        			</div>

					</section>

	        		<section>

	       				<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Enter your PayPal email or merchant ID here.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_paypal_id', true);
        ?>
	        				<label for='_est_paypal_id' class='sectionTitle'><?php 
        _e('PayPal Email or Merchant ID', THEMENAME);
        ?>
</label>
		        			<input class='widefat' type='text' id='_est_paypal_id' name='_est_paypal_id' value='<?php 
        echo $value;
        ?>
'>
	        			</div>


	       				<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Enter the three-letter currency code to use for payments here.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_currency_code', true);
        $value = empty($value) ? 'USD' : $value;
        ?>
	        				<label for='_est_currency_code' class='sectionTitle'><?php 
        _e('Currency Code', THEMENAME);
        ?>
</label>
		        			<input class='widefat' type='text' id='_est_currency_code' name='_est_currency_code' value='<?php 
        echo $value;
        ?>
'>
	        			</div>



					</section>


					<section>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify some text for the review your booking section. This is the text which appears just before the submit button in the booking form.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_review_text', true);
        ?>
	        				<label for='_est_review_text' class='sectionTitle'><?php 
        _e('Review Your Booking Text', THEMENAME);
        ?>
</label>
		        			<textarea class='widefat redactor' style='height:120px;' id='_est_review_text' name='_est_review_text'><?php 
        echo $value;
        ?>
</textarea>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The text on the final review button. This is the first submit button for the booking form', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_review_button', true);
        $value = empty($value) ? 'Final Review' : $value;
        ?>
	        				<label for='_est_review_button' class='sectionTitle'><?php 
        _e('Final Review Button Text', THEMENAME);
        ?>
</label>
		        			<input class='widefat' type='text' id='_est_review_button' name='_est_review_button' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify some additional details which will be shown at the end of the booking process, before the user finalizes the booking. This is great for some quick terms and services text.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_additional_details', true);
        ?>
	        				<label for='_est_additional_details' class='sectionTitle'><?php 
        _e('Additional Details', THEMENAME);
        ?>
</label>
		        			<textarea class='widefat redactor' style='height:120px;' id='_est_additional_details' name='_est_additional_details'><?php 
        echo $value;
        ?>
</textarea>
	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify some text for the Complete your booking section. This is the text which appears just before the last submit button on the booking overview.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_complete_text', true);
        ?>
	        				<label for='_est_complete_text' class='sectionTitle'><?php 
        _e('Complete Your Booking Text', THEMENAME);
        ?>
</label>
		        			<textarea class='widefat redactor' style='height:120px;' id='_est_complete_text' name='_est_complete_text'><?php 
        echo $value;
        ?>
</textarea>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The text on the complete your booking button. This is the last submit button on the booking overview', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_complete_button', true);
        $value = empty($value) ? 'Complete Booking' : $value;
        ?>
	        				<label for='_est_complete_button' class='sectionTitle'><?php 
        _e('Complete Booking Button Text', THEMENAME);
        ?>
</label>
		        			<input class='widefat' type='text' id='_est_complete_button' name='_est_complete_button' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>







	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The text shown in the flag on the top left of the thank you page', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_thankyou_flag', true);
        $value = empty($value) ? 'Thank You' : $value;
        ?>
	        				<label for='_est_thankyou_flag' class='sectionTitle'><?php 
        _e('Thank You Page Flag Text', THEMENAME);
        ?>
</label>
		        			<input class='widefat' type='text' id='_est_thankyou_flag' name='_est_thankyou_flag' value='<?php 
        echo $value;
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The title shown next to the thank you flag', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_thankyou_title', true);
        $value = empty($value) ? 'Your Booking Is Complete' : $value;
        ?>
	        				<label for='_est_thankyou_title' class='sectionTitle'><?php 
        _e('Thank You Page Title', THEMENAME);
        ?>
</label>
		        			<input class='widefat' type='text' id='_est_thankyou_title' name='_est_thankyou_title' value='<?php 
        echo $value;
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Post-booking thank you text', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_thankyou_text', true);
        ?>
	        				<label for='_est_thankyou_text' class='sectionTitle'><?php 
        _e('Thank You Text', THEMENAME);
        ?>
</label>
		        			<textarea class='redactor widefat' style='height:120px;' id='_est_thankyou_text' name='_est_thankyou_text'><?php 
        echo $value;
        ?>
</textarea>
	        			</div>



	        		</section>

	        		<section>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select which email addresses should receive the confirmation email', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_recipients' class='sectionTitle'><?php 
        _e('Booking Confirmation Email Recipients', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Site Admin' => 'admin', 'Property Agents' => 'agents', 'Booker' => 'booker');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_recipients', true);
        $current = empty($current) ? array() : $current;
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = (in_array($value, $current) or empty($current)) ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='checkbox' id='_est_recipients-<?php 
            echo $i;
            ?>
' name='_est_recipients[]' value='<?php 
            echo $value;
            ?>
'><label for='_est_recipients-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>


					</section>


	        		<section class='helpSection'>
	        			<?php 
        _e('

							<p>The map search page template allows you to crearte a beautiful full screen map search page. The page supports searching nearby the users location with a customizable distance</p>
<p>To create a map page first go to the Page section and add a new page. On the right, select “Map Page” from the template selector. You should see that specific options for this page type are loaded. Once done, you can add a title, some content, and choose your options.</p>
<p>Map pages allow you to modify the following settings:</p>
<ul>
<li>Text Options
<ul>
<li><strong>Search Placeholder</strong>: Specify the text shown inside the search box by default</li>
<li><strong>Button Text</strong>: Specify the button text</li>
<li><strong>Advanced Options Open Text</strong>: Specify the text in the advanced search tab when it is closed</li>
<li><strong>Advanced Options Closed Text</strong>:&nbsp;Specify the text in the advanced search tab when it is open</li>
<li><strong>No Results Message</strong>: Specify the message shown to users when no properties are found near the area they searched for.</li>
</ul>
</li>
<li>Map Options
<ul>
<li><strong>Map Type</strong>: Allows you to specify the map type.</li>
<li><strong>Initial Map Location</strong>: Specify the area the map should show when it loads. A search for nearby properties is performed when the page loads. You can also specify the user’s current location to be the initial position.</li>
<li><strong> Error Behavior</strong>: Select how the map should behave if there are no search results near the user’s location or search</li>
<li><strong>Map Marker Image</strong>: This setting allows you to select a different map marker image.</li>
</ul>
</li>
<li>Advanced Search
<ul>
<li><strong>Enable Advanced Search</strong>: If enabled, users will be able to use the parameters you specify to narrow their search.</li>
<li><strong>Built In Details To Show</strong>: This large table allows you to select which built in details you want to allow the user to use. You can select each detail and then select the control type it should use. In addition you can type a numeric order into the box to make them show up in the order you’d like.</li>
<li><strong>Custom In Details To Show</strong>: This large table allows you to select which custom details you want to allow the user to use. You can select each detail and then select the control type it should use. In addition you can type a numeric order into the box to make them show up in the order you’d like</li>
</ul>
</li>
<li>Structure
<ul>
<li><strong>Map Height</strong>: This option allows you to choose between a full-page map or a map with a specific height. If a specific height is selected you will be able to add content into the editor, just like on other pages. This is great for creating some beautiful <a href="http://airbnb.com">airbnb</a> style pages.</li>
<li><strong>Layout</strong>: The layout option applies to this page if a specific map height is selected. In this case you can choose a layout.</li>
<li><strong>Sidebar</strong>: If a map height is specifically chosen and a layout with a sidebar is used you can select which sidebar should show up here.</li>
</ul>
</li>
</ul>
<p>Don’t forget that help is available inline inside the options box. You can read the text of this article there, as well as reading inline help for each specific option next to the option itself. Simply hover over the help link.</p>

							        			', THEMENAME);
        ?>
	        		</section>

	        		<section class='helpSection'>
	        			<?php 
        echo bsh_docs_shortcodes();
        ?>
		        	</section>
		        	<section class='helpSection'>
			        	<?php 
        echo bsh_docs_get_support();
        ?>
			   		</section>

	        	</div>
	        	<div class='clear'></div>
	        </div>

        <?php 
    }
    public function options_box_content($post)
    {
        global $wpdb;
        ?>
        	<div id='bshLogo'></div>
        	<div id='optionsContainer'>
        		<div id='menuBackground'></div>

	        	<ul id='bshMenu'>
	        		<li class='active'><?php 
        _e('Structure', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Listing Properties', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Advanced Search', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Property Details', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Help', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Shortcode Guide', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Get Support', THEMENAME);
        ?>
</l1>
	        	</ul>
	        	<div id='bshOptions'>
		        	<input id='bshSaveTop' name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="Update">

	        		<section class='active'>
	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('By default the layout of this page is inherited from the default layout which can be changed in the <a href="%s">Theme Customizer</a>. If you need a different layout on this page, you can override the default setting.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='_est_layout' class='sectionTitle'><?php 
        _e('Layout', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Global Setting' => 'default', '2 Columns - Sidebar on the Right' => '2col_right', '2 Columns - Sidebar on the Left' => '2col_left', '1 Column' => '1col');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_layout', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'default') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_layout-<?php 
            echo $i;
            ?>
' name='_est_layout' value='<?php 
            echo $value;
            ?>
'><label for='_est_layout-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('By default the title of this page is shown under the header. If you would like to hide this title, check the radio button next to  "Hide"', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_title' class='sectionTitle'><?php 
        _e('Page Title', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Show' => 'show', 'Hide' => 'hide');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_title', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'show') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_title-<?php 
            echo $i;
            ?>
' name='_est_title' value='<?php 
            echo $value;
            ?>
'><label for='_est_title-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('If you are using a layout with a sidebar the default sidebar will be shown. You can set the default sidebar in the <a href="%s">Theme Customizer</a>. If you would like to use a different sidebar on this page, choose one here.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='_est_sidebar' class='sectionTitle'><?php 
        _e('Sidebar', THEMENAME);
        ?>
</label>

	        				<?php 
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        $choices = explode(',', get_theme_mod('sidebars'));
        $sidebars['default'] = 'Default';
        $sidebars['Sidebar'] = 'Sidebar';
        foreach ($choices as $choice) {
            $choice = trim($choice);
            if (!empty($choice)) {
                $sidebars[$choice] = $choice;
            }
        }
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        ?>
	        				<select id='_est_sidebar' name='_est_sidebar'>
		        				<?php 
        foreach ($sidebars as $value => $name) {
            $selected = ($current == $value or empty($current) and $value == 'default') ? 'selected="selected"' : '';
            ?>
		        				<option value='<?php 
            echo $value;
            ?>
' <?php 
            echo $selected;
            ?>
>
		        				<?php 
            echo $name;
            ?>
		        				</option>
		        				<?php 
        }
        ?>
	        				</select>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the slider (if any) to use on the page', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $slider = get_post_meta($post->ID, '_est_slider', true);
        $slider_shortcode = get_post_meta($post->ID, '_est_slider_shortcode', true);
        $checked_default = (empty($slider) or $slider == 'default') ? 'checked="checked"' : '';
        $checked_specify = (!empty($slider) and $slider == 'specify') ? 'checked="checked"' : '';
        ?>
	        				<label for='_est_slider' class='sectionTitle'><?php 
        _e('Slider To Use', THEMENAME);
        ?>
</label>

	        				<p>
	        				<input id='_est_slider_0' <?php 
        echo $checked_default;
        ?>
 type='radio' name='_est_slider' value='default'> <label for='_est_slider_0'><?php 
        _e('Use Default Slider', THEMENAME);
        ?>
</label><br>
	        				<input id='_est_slider_1' <?php 
        echo $checked_specify;
        ?>
 type='radio' name='_est_slider' value='specify'> <label for='_est_slider_1'><?php 
        _e('Specify Slider:', THEMENAME);
        ?>
</label><br>
	        				</p>
		        			<input type='text' class='widefat' id='_est_slider_shortcode' name='_est_slider_shortcode' value='<?php 
        echo $slider_shortcode;
        ?>
'></p>
	        			</div>


	        		</section>

	        		<section>

	        			 <div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the number of properties that should be shown on each page', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_count', true);
        $value = empty($value) ? get_option('posts_per_page') : $value;
        ?>
	        				<label for='_est_count' class='sectionTitle'><?php 
        _e('Properties Per Page', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_count' name='_est_count' value='<?php 
        echo $value;
        ?>
'>

	        			</div>

	        			 <div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify a user to show properties from', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_author', true);
        ?>
	        				<label for='_est_author' class='sectionTitle'><?php 
        _e('From A Specific User', THEMENAME);
        ?>
</label>
		        			<select name='_est_author' id='_est_author'>
		        				<option value=''><?php 
        _e('All Users', 'estatement');
        ?>
</option>
		        				<?php 
        $users = $wpdb->get_col("SELECT DISTINCT(post_author) FROM {$wpdb->posts} WHERE post_type ='property' AND post_status = 'publish' ");
        $user_array = array();
        foreach ($users as $user_id) {
            $user = get_userdata($user_id);
            $selected = $value == $user_id ? 'selected="selected"' : '';
            ?>
		        					<option <?php 
            echo $selected;
            ?>
 value='<?php 
            echo $user_id;
            ?>
'><?php 
            echo $user->display_name;
            ?>
</option>
									<?php 
        }
        ?>
		        			</select>

	        			</div>


	        			 <div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify how the properties should be ordered', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $customdata = get_option('est_customdata');
        $value = get_post_meta($post->ID, '_est_orderby', true);
        $value = empty($value) ? 'post_date' : $value;
        $customdata['post_date'] = array('name' => __('Published Date', THEMENAME));
        $customdata['post_title'] = array('name' => __('Title', THEMENAME));
        $customdata['rand'] = array('name' => __('Random', THEMENAME));
        ?>
	        				<label for='_est_orderby' class='sectionTitle'><?php 
        _e('Order Properties By', THEMENAME);
        ?>
</label>
		        			<select name='_est_orderby' id='_est_orderby'>
		        				<?php 
        foreach ($customdata as $key => $details) {
            ?>
		        				<?php 
            $selected = $value == $key ? 'selected="selected"' : '';
            ?>
		        					<option <?php 
            echo $selected;
            ?>
 value='<?php 
            echo $key;
            ?>
'><?php 
            echo $details['name'];
            ?>
</option>
		        				<?php 
        }
        ?>
		        			</select>


        					<?php 
        $value = get_post_meta($post->ID, '_est_order', true);
        $value = empty($value) ? 'DESC' : $value;
        $orders = array('DESC' => 'Descending', 'ASC' => 'Ascending');
        ?>

		        			<select name='_est_order' id='_est_order'>
		        				<?php 
        foreach ($orders as $key => $name) {
            ?>
		        				<?php 
            $selected = $value == $key ? 'selected="selected"' : '';
            ?>
		        					<option <?php 
            echo $selected;
            ?>
 value='<?php 
            echo $key;
            ?>
'><?php 
            echo $name;
            ?>
</option>
		        				<?php 
        }
        ?>
		        			</select>


        					<?php 
        $value = get_post_meta($post->ID, '_est_sort_type', true);
        $value = empty($value) ? 'meta_value' : $value;
        $orders = array('meta_value' => 'Values are text', 'meta_value_num' => 'Values are numbers');
        ?>

		        			<select name='_est_sort_type' id='_est_sort_type'>
		        				<?php 
        foreach ($orders as $key => $name) {
            ?>
		        				<?php 
            $selected = $value == $key ? 'selected="selected"' : '';
            ?>
		        					<option <?php 
            echo $selected;
            ?>
 value='<?php 
            echo $key;
            ?>
'><?php 
            echo $name;
            ?>
</option>
		        				<?php 
        }
        ?>
		        			</select>




	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Set the layout you would like to use to display properties in.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_propery_layout' class='sectionTitle'><?php 
        _e('Layout Template', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('List' => 'list', 'Card' => 'card');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_propery_layout', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'list') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_propery_layout-<?php 
            echo $i;
            ?>
' name='_est_propery_layout' value='<?php 
            echo $value;
            ?>
'><label for='_est_propery_layout-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>




	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you are using the card layout, set how many columns you would like.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_card_columns' class='sectionTitle'><?php 
        _e('Columns For Card Layout', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('1' => '1', '2' => '2', '3' => '3', '4' => '4');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_card_columns', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == '3') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_card_columns-<?php 
            echo $i;
            ?>
' name='_est_card_columns' value='<?php 
            echo $value;
            ?>
'><label for='_est_card_columns-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label> &nbsp; &nbsp;
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>







						<?php 
        $taxonomies = get_option('est_taxonomies');
        foreach ($taxonomies as $taxonomy) {
            ?>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
            _e('help', THEMENAME);
            ?>
</span>
        						<div class='content'>
        						<?php 
            echo sprintf(__('By Selecting a number of %s you can narrow the properties shown to only the selected types. If no types are selected all properties will be shown.', THEMENAME), $taxonomy['labels']['name']);
            ?>
        						</div>
        					</div>

	        				<label for='_est_taxonomy_<?php 
            echo $taxonomy['slug'];
            ?>
' class='sectionTitle'><?php 
            echo $taxonomy['labels']['name'];
            ?>
</label>

	        				<?php 
            $terms = get_terms($taxonomy['slug']);
            if (empty($terms)) {
                echo sprintf(__('You haven\'t created any %s yet. You can do so by clicking on any property item (or creating one) and adding one on the fly using the taxonomy box on the right.', THEMENAME), $taxonomy['labels']['name']);
            } else {
                ?>

			        				<span class='checkAll'>select all</span>
			        				<span class='checkNone'>select none</span>

			        				<div class='clear'></div>


	        					<?php 
                $terms_1 = array_slice($terms, 0, ceil(count($terms) / 2));
                $terms_2 = array_slice($terms, ceil(count($terms) / 2));
                ?>
		        				<ul class='choices half-left'>
			        				<?php 
                $current = get_post_meta($post->ID, '_est_taxonomy_' . $taxonomy['slug'], true);
                $i = 1;
                foreach ($terms_1 as $term) {
                    $checked = (is_array($current) and in_array($term->term_id, $current)) ? 'checked="checked"' : '';
                    ?>
			        				<li>
			        				<input <?php 
                    echo $checked;
                    ?>
 type='checkbox' id='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
-<?php 
                    echo $i;
                    ?>
' name='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
[]' value='<?php 
                    echo $term->term_id;
                    ?>
'><label for='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
-<?php 
                    echo $i;
                    ?>
'><?php 
                    echo $term->name;
                    ?>
</label><br>
			        				</li>
			        				<?php 
                    $i++;
                }
                ?>
		        				</ul>
		        				<ul class='choices half-right'>
			        				<?php 
                foreach ($terms_2 as $term) {
                    $checked = (is_array($current) and in_array($term->term_id, $current)) ? 'checked="checked"' : '';
                    ?>
			        				<li>
			        				<input <?php 
                    echo $checked;
                    ?>
 type='checkbox' id='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
-<?php 
                    echo $i;
                    ?>
' name='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
[]' value='<?php 
                    echo $term->term_id;
                    ?>
'><label for='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
-<?php 
                    echo $i;
                    ?>
'><?php 
                    echo $term->name;
                    ?>
</label><br>
			        				</li>
			        				<?php 
                    $i++;
                }
                ?>
		        				</ul>
		        			<?php 
            }
            ?>

		        			<input type='hidden' id='_est_taxonomy_<?php 
            echo $taxonomy['slug'];
            ?>
-<?php 
            echo $i;
            ?>
' name='_est_taxonomy_<?php 
            echo $taxonomy['slug'];
            ?>
[]' value='none'>
	        				<div class='clear'></div>

	        			</div>



						<?php 
        }
        ?>





	        		</section>

	        		<section>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify when the search options should be shown.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_show_search' class='sectionTitle'><?php 
        _e('Show Search Options?', THEMENAME);
        ?>
</label>

	        				<?php 
        $choices = array('Always Show Search' => 'yes', 'Only When User Has Searched' => 'search', 'Never Show' => 'no');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_show_search', true);
        $current = empty($current) ? 'no' : $current;
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'default') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_show_search-<?php 
            echo $i;
            ?>
' name='_est_show_search' value='<?php 
            echo $value;
            ?>
'><label for='_est_show_search-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>


	        			</div>

	        			 <div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the title of the search box. If left blank the title will be hidden', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_search_title', true);
        ?>
	        				<label for='_est_search_title' class='sectionTitle'><?php 
        _e('Search Page Title', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_search_title' name='_est_search_title' value='<?php 
        echo $value;
        ?>
'>

	        			</div>

	        			 <div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text of the search button', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_search_button_text', true);
        ?>
	        				<label for='_est_search_button_text' class='sectionTitle'><?php 
        _e('Search Button Text', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_search_button_text' name='_est_search_button_text' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        			 <div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the label of the general search terms field', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_search_terms_label', true);
        ?>
	        				<label for='_est_search_terms_label' class='sectionTitle'><?php 
        _e('Search Terms Label', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_search_terms_label' name='_est_search_terms_label' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo _e('Select the taxonomies you would like to add to this search page', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_details' class='sectionTitle'><?php 
        _e('Built In Taxonomies To Show', THEMENAME);
        ?>
</label>

	        				<?php 
        $args = array('public' => true, '_builtin' => false);
        $output = 'names';
        // or objects
        $operator = 'and';
        // 'and' or 'or'
        $taxonomies = get_option('est_taxonomies');
        $selection = get_post_meta($post->ID, '_est_taxonomies', true);
        ?>

			        				<span class='checkAll'><?php 
        _e('select all', THEMENAME);
        ?>
</span>
			        				<span class='checkNone'><?php 
        _e('select none', THEMENAME);
        ?>
</span>

		        				<table class='choices'>
		        					<thead>
		        					<tr>
		        						<th></th>
		        						<th class='text-left'><?php 
        _e('Taxonomy', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Control Type', THEMENAME);
        ?>
</th>
		        						<th><?php 
        _e('Order', THEMENAME);
        ?>
</th>
		        					</tr>
		        					</thead>
		        					<tbody>

			        				<?php 
        foreach ($taxonomies as $taxonomy => $data) {
            if (empty($selection)) {
                $checked = '';
            } else {
                $checked = (!empty($selection[$taxonomy]['show']) and $selection[$taxonomy]['show'] == 'yes') ? 'checked="checked"' : '';
            }
            ?>
			        				<tr>
				        				<td class='checkbox'>
					        				<input <?php 
            echo $checked;
            ?>
 type='checkbox' id='_est_taxonomies-<?php 
            echo $i;
            ?>
' name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][show]' value='yes'>
				        				</td>
				        				<td>
					        				<label for='_est_taxonomies-<?php 
            echo $i;
            ?>
'><?php 
            echo $data['labels']['name'];
            ?>
</label>
				        				</td>
							        	<td>
											<select name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][field]'>
				        				<?php 
            $fields = array('select' => 'Dropdown Box', 'slider' => 'Range Slider', 'checkbox' => 'Checkboxes', 'radio' => 'Radio Buttons', 'text' => 'Text Field');
            foreach ($fields as $field => $name) {
                if (empty($selection)) {
                    $selected = '';
                } else {
                    $selected = $selection[$taxonomy]['field'] == $field ? 'selected="selected"' : '';
                }
                echo '<option ' . $selected . ' value="' . $field . '">' . $name . '</option>';
            }
            ?>
				        				</td>
				        				<td class='order'>
				        					<?php 
            $order = !empty($selection[$taxonomy]['order']) ? $selection[$taxonomy]['order'] : '';
            ?>
				        					<input type='text' name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][order]' value='<?php 
            echo $order;
            ?>
'>
				        				</td>

			        				</tr>
			        				<input type='hidden' name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][type]' value='taxonomy'>

			        				<?php 
            $i++;
        }
        ?>
			        				</tbody>
		        				</table>
	        				<div class='clear'></div>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo _e('Select the default in details you would like to add to this search page', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_customdatas' class='sectionTitle'><?php 
        _e('Built In Details To Show', THEMENAME);
        ?>
</label>

	        				<?php 
        $details = get_option('est_customdata');
        $selection = get_post_meta($post->ID, '_est_customdatas', true);
        ?>

			        				<span class='checkAll'><?php 
        _e('select all', THEMENAME);
        ?>
</span>
			        				<span class='checkNone'><?php 
        _e('select none', THEMENAME);
        ?>
</span>

		        				<table class='choices'>
		        					<thead>
		        					<tr>
		        						<th></th>
		        						<th class='text-left'><?php 
        _e('Custom Field', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Control Type', THEMENAME);
        ?>
</th>
		        						<th><?php 
        _e('Order', THEMENAME);
        ?>
</th>
		        					</tr>
		        					</thead>
		        					<tbody>

			        				<?php 
        foreach ($details as $key => $datail) {
            $checked = (!empty($selection[$key]['show']) and $selection[$key]['show'] == 'yes') ? 'checked="checked"' : '';
            ?>
			        				<tr>
				        				<td class='checkbox'>
					        				<input <?php 
            echo $checked;
            ?>
 type='checkbox' id='_est_customdatas-<?php 
            echo $i;
            ?>
' name='_est_customdatas[<?php 
            echo $key;
            ?>
][show]' value='yes'>
				        				</td>
				        				<td>
					        				<label for='_est_customdatas-<?php 
            echo $i;
            ?>
'><?php 
            echo $datail['name'];
            ?>
</label>
				        				</td>
							        	<td>
											<select name='_est_customdatas[<?php 
            echo $key;
            ?>
][field]'>
				        				<?php 
            $fields = array('select' => 'Dropdown Box', 'slider' => 'Range Slider', 'checkbox' => 'Checkboxes', 'radio' => 'Radio Buttons', 'text' => 'Text Field');
            foreach ($fields as $field => $name) {
                if (empty($selection)) {
                    $selected = '';
                } else {
                    $selected = $selection[$key]['field'] == $field ? 'selected="selected"' : '';
                }
                echo '<option ' . $selected . ' value="' . $field . '">' . $name . '</option>';
            }
            ?>
				        				</td>
				        				<td class='order'>
				        					<?php 
            $order = !empty($selection[$key]['order']) ? $selection[$key]['order'] : '';
            ?>
				        					<input type='text' name='_est_customdatas[<?php 
            echo $key;
            ?>
][order]' value='<?php 
            echo $order;
            ?>
'>
				        				</td>

			        				</tr>
				        			<input type='hidden' name='_est_customdatas[<?php 
            echo $key;
            ?>
][type]' value='customdata'>
		        				<?php 
            $i++;
        }
        ?>
			        				</tbody>
		        				</table>
	        				<div class='clear'></div>

	        			</div>

		        	</section>


	        		<section>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Set wether to show or hide the property excerpt for properties in the listing', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_excerpt' class='sectionTitle'><?php 
        _e('Show Excerpt?', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Show' => 'show', 'Hide' => 'hide');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_excerpt', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'hide') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_excerpt-<?php 
            echo $i;
            ?>
' name='_est_excerpt' value='<?php 
            echo $value;
            ?>
'><label for='_est_excerpt-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>


	        			<div class='option'>
	    					<div class='help'>
	    						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
	    						<div class='content'>
	    						<?php 
        echo _e('Select the taxonomies you would like to display.', THEMENAME);
        ?>
	    						</div>
	    					</div>

	        				<label for='_est_custom_taxonomies' class='sectionTitle'><?php 
        _e('Select Taxonomies', THEMENAME);
        ?>
</label>


						        <table style='width:100%'>
						        	<tr>
						        		<td></td>
						        		<td><strong><?php 
        _e('Custom Taxonomy', THEMENAME);
        ?>
</strong></td>
						        		<td><strong><?php 
        _e('Order', THEMENAME);
        ?>
</strong></td>
						        	</tr>
						        <?php 
        $taxonomies = get_option('est_taxonomies');
        $value = get_post_meta($post->ID, '_est_custom_taxonomies', true);
        foreach ($taxonomies as $taxonomy) {
            $checked = (!empty($value[$taxonomy['slug']]) and $value[$taxonomy['slug']]['show'] == 'yes') ? 'checked="checked"' : '';
            $order = !empty($value[$taxonomy['slug']]['order']) ? $value[$taxonomy['slug']]['order'] : '';
            ?>
						        	<tr>
						       			<td>
						       				<input id='_est_custom_taxonomies_<?php 
            echo $taxonomy['slug'];
            ?>
' <?php 
            echo $checked;
            ?>
 type='checkbox' name='_est_custom_taxonomies[<?php 
            echo $taxonomy['slug'];
            ?>
][show]' value='yes'>
						       			</td>
						       			<td style='width:60%;'>
							       			<label for='_est_custom_taxonomies_<?php 
            echo $taxonomy['slug'];
            ?>
'><?php 
            echo $taxonomy['labels']['name'];
            ?>
</label>
							       		</td>
							       		<td>
							       			<input value='<?php 
            echo $order;
            ?>
' type='text' style='width:40px;' name='_est_custom_taxonomies[<?php 
            echo $taxonomy['slug'];
            ?>
][order]'>
							       		</td>
						        	</tr>
						        <?php 
        }
        ?>
						        </table>

        				</div>


	        			<div class='option'>
	    					<div class='help'>
	    						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
	    						<div class='content'>
	    						<?php 
        echo _e('The following section allows you to set up which custom fields are shown. To create your own order make sure to select "custom" from the dropdown selector as well as setting up the order below.', THEMENAME);
        ?>
	    						</div>
	    					</div>

	        				<label for='_est_customdata' class='sectionTitle'><?php 
        _e('Select Custom Fields', THEMENAME);
        ?>
</label>


						        <table style='width:100%'>
						        	<tr>
						        		<td></td>
						        		<td><strong><?php 
        _e('Custom Field', THEMENAME);
        ?>
</strong></td>
						        		<td><strong><?php 
        _e('Order', THEMENAME);
        ?>
</strong></td>
						        	</tr>
						        <?php 
        $value = get_post_meta($post->ID, '_est_customdata', true);
        $customdata = get_option('est_customdata');
        foreach ($customdata as $field) {
            $checked = (!empty($value[$field['key']]) and $value[$field['key']]['show'] == 'yes') ? 'checked="checked"' : '';
            $order = !empty($value[$field['key']]['order']) ? $value[$field['key']]['order'] : '';
            ?>
						        	<tr>
						       			<td>
						       				<input id='est_customfields_<?php 
            echo $field['key'];
            ?>
' <?php 
            echo $checked;
            ?>
 type='checkbox' name='_est_customdata[<?php 
            echo $field['key'];
            ?>
][show]' value='yes'>
						       			</td>
						       			<td style='width:60%;'>
							       			<label for='est_customfields_<?php 
            echo $field['key'];
            ?>
'><?php 
            echo $field['name'];
            ?>
</label>
							       		</td>
							       		<td>
							       			<input value='<?php 
            echo $order;
            ?>
' type='text' style='width:40px;' name='_est_customdata[<?php 
            echo $field['key'];
            ?>
][order]'>
							       		</td>
						        	</tr>
						        <?php 
        }
        ?>
						        </table>

        				</div>

	        			<div class='option'>
	    					<div class='help'>
	    						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
	    						<div class='content'>
	    						<?php 
        echo _e('If you select to show the location as a single field, all the location data will be condensed into one row. If you choose to show only selected fields only the location fields selected will be added to this single row.', THEMENAME);
        ?>
	    						</div>
	    					</div>


	        				<label for='__est_single_field_address' class='sectionTitle'><?php 
        _e('Condense Location', THEMENAME);
        ?>
</label>

	        				<?php 
        $value = get_post_meta($post->ID, '_est_single_field_address', true);
        $checked = $value == 'yes' ? 'checked="checked"' : '';
        ?>

						    <table style='width:100%'>
						        	<tr>
						        		<td></td>
						        		<td><strong><?php 
        _e('Custom Field', THEMENAME);
        ?>
</strong></td>
						        		<td><strong><?php 
        _e('Order', THEMENAME);
        ?>
</strong></td>
						        	</tr>

						    	<tr>
						    		<td>
							    		<input <?php 
        echo $checked;
        ?>
 type='checkbox' id='_est_single_field_address' name='_est_single_field_address' value='yes'>
							    	</td>
							    	<td style='width:60%'>
								    	<label for='_est_single_field_address'><?php 
        _e('Show Location as single field', THEMENAME);
        ?>
</label>
								    </td>
								    <td>
								    	<?php 
        $value = get_post_meta($post->ID, '_est_single_field_address_order', true);
        ?>
							       		<input type='text' style='width:40px;' name='_est_single_field_address_order' value='<?php 
        echo $value;
        ?>
'>
								    </td>
								</tr>
							</table>

	        				<?php 
        $value = get_post_meta($post->ID, '_est_single_field_address_name', true);
        $value = empty($value) ? __('Location: ', THEMENAME) : $value;
        ?>
							<label><?php 
        _e('Condensed Location Title:', THEMENAME);
        ?>
 </label>
							<input type='text' name='_est_single_field_address_name' value='<?php 
        echo $value;
        ?>
'>

		        		</div>


	        		</section>


	        		<section class='helpSection'>
	        			<?php 
        _e('
							<p>The property listing template allows you to create a list of properties. Using the page options you can narrow this list down to a subset of your properties which is great for creating separate lists for different property types.</p>
<ul>
<li>Structure
<ul>
<li><strong>Layout</strong>: Determines the type of layout you would like for this specific page</li>
<li><strong>Page Title</strong>: Allows you to show or hide the page title</li>
<li><strong>Sidebar</strong>: Allows you ro show a specific sidebar for this page</li>
</ul>
</li>
<li>Listing Contents
<ul>
<li><strong>Properties Per Page</strong>: Determines the number of properties shown on one page</li>
<li><strong>Property Types</strong>: Select the property types to show in this listing</li>
<li><strong>Property Categories</strong>: Select the property categories to show in this listing</li>
</ul>
</li>
</ul>
								        			', THEMENAME);
        ?>
	        		</section>
	        		<section class='helpSection'>
	        			<?php 
        echo bsh_docs_shortcodes();
        ?>
		        	</section>
		        	<section class='helpSection'>
			        	<?php 
        echo bsh_docs_get_support();
        ?>
			   		</section>

	        	</div>
	        	<div class='clear'></div>
	        </div>

        <?php 
    }
    public function options_box_content($post)
    {
        ?>
        	<div id='bshLogo'></div>
        	<div id='optionsContainer'>
        		<div id='menuBackground'></div>

	        	<ul id='bshMenu'>
	        		<li class='active'><?php 
        _e('Structure', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Help', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Shortcode Guide', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Get Support', THEMENAME);
        ?>
</l1>
	        	</ul>
	        	<div id='bshOptions'>
		        	<input id='bshSaveTop' name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="Update">

	        		<section class='active'>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Use a slider shortcode to output a slider at the top of the page');
        ?>
        						</div>
        					</div>

	        				<label for='_est_slider' class='sectionTitle'><?php 
        _e('Slider Shortcode', THEMENAME);
        ?>
</label>
							<?php 
        $value = get_post_meta($post->ID, '_est_slider', true);
        ?>
							<textarea class='widefat' rows='8' name='_est_slider' id='_est_slider'><?php 
        echo $value;
        ?>
</textarea>

	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('By default the layout of this page is inherited from the default layout which can be changed in the <a href="%s">Theme Customizer</a>. If you need a different layout on this page, you can override the default setting.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='_est_layout' class='sectionTitle'><?php 
        _e('Layout', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Global Setting' => 'default', '2 Columns - Sidebar on the Right' => '2col_right', '2 Columns - Sidebar on the Left' => '2col_left', '1 Column' => '1col');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_layout', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'default') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_layout-<?php 
            echo $i;
            ?>
' name='_est_layout' value='<?php 
            echo $value;
            ?>
'><label for='_est_layout-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('By default the title of this page is shown under the header. If you would like to hide this title, check the radio button next to  "Hide"', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_title' class='sectionTitle'><?php 
        _e('Page Title', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Show' => 'show', 'Hide' => 'hide');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_title', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'show') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_title-<?php 
            echo $i;
            ?>
' name='_est_title' value='<?php 
            echo $value;
            ?>
'><label for='_est_title-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('If you are using a layout with a sidebar the default sidebar will be shown. You can set the default sidebar in the <a href="%s">Theme Customizer</a>. If you would like to use a different sidebar on this page, choose one here.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='_est_sidebar' class='sectionTitle'><?php 
        _e('Sidebar', THEMENAME);
        ?>
</label>

	        				<?php 
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        $choices = explode(',', get_theme_mod('sidebars'));
        $sidebars['default'] = 'Default';
        $sidebars['Sidebar'] = 'Sidebar';
        foreach ($choices as $choice) {
            $choice = trim($choice);
            if (!empty($choice)) {
                $sidebars[$choice] = $choice;
            }
        }
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        ?>
	        				<select id='_est_sidebar' name='_est_sidebar'>
		        				<?php 
        foreach ($sidebars as $value => $name) {
            $selected = ($current == $value or empty($current) and $value == 'default') ? 'selected="selected"' : '';
            ?>
		        				<option value='<?php 
            echo $value;
            ?>
' <?php 
            echo $selected;
            ?>
>
		        				<?php 
            echo $name;
            ?>
		        				</option>
		        				<?php 
        }
        ?>
	        				</select>
	        			</div>

	        		</section>
	        		<section class='helpSection'>
	        			<?php 
        _e('
	        				<p>Pages are a way to add static content to your website. They are perfect for about pages, staff pages and so on. Apart from the numerous shortcodes we offer for customizing the content in a post there are also some settings for this page specifically: </p>

							<ul>
							<li>Structure
							<ul>
							<li><span style="line-height: 13px;"><strong>Layout</strong>: Determines the type of layout you would like for this specific page</span></li>
							<li><strong>Page Title</strong>: Allows you to show or hide the page title</li>
							<li><strong>Sidebar</strong>: Allows you to show a specific sidebar for this page</li>
							</ul>
							</li>
	        			</ul>

	        			', THEMENAME);
        ?>
	        		</section>
	        		<section class='helpSection'>
	        			<?php 
        echo bsh_docs_shortcodes();
        ?>
		        	</section>
		        	<section class='helpSection'>
			        	<?php 
        echo bsh_docs_get_support();
        ?>
			   		</section>

	        	</div>
	        	<div class='clear'></div>
	        </div>

        <?php 
    }
    public function options_box_content($post)
    {
        ?>
        	<div id='bshLogo'></div>
        	<div id='optionsContainer'>
        		<div id='menuBackground'></div>

	        	<ul id='bshMenu'>
	        		<li class='active'><?php 
        _e('Booking Details', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Contact Details', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Payment Details', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Help', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Shortcode Guide', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Get Support', THEMENAME);
        ?>
</l1>
	        	</ul>
	        	<div id='bshOptions'>
		        	<input id='bshSaveTop' name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="Update">

	        		<section class='active'>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the number of people staying in your property for this booking', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_guests' class='sectionTitle'><?php 
        _e('Guests', THEMENAME);
        ?>
</label>
	        				<?php 
        $value = get_post_meta($post->ID, '_est_guests', true);
        ?>
		        				<input class='widefat' type='text' id='_est_guests' name='_est_guests' value='<?php 
        echo $value;
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the date of arrival for this booking', THEMENAME);
        ?>
        						</div>
        					</div>


	        				<label for='_est_start' class='sectionTitle'><?php 
        _e('Arrival Date', THEMENAME);
        ?>
</label>
	        				<?php 
        $value = get_post_meta($post->ID, '_est_start', true);
        ?>
		        				<input class='widefat' type='text' id='_est_start' name='_est_start' value='<?php 
        echo $value;
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the date of departure for this booking', THEMENAME);
        ?>
        						</div>
        					</div>


	        				<label for='_est_end' class='sectionTitle'><?php 
        _e('Departure Date', THEMENAME);
        ?>
</label>
	        				<?php 
        $value = get_post_meta($post->ID, '_est_end', true);
        ?>
		        				<input class='widefat' type='text' id='_est_end' name='_est_end' value='<?php 
        echo $value;
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the property to book', THEMENAME);
        ?>
        						</div>
        					</div>


	        				<label for='_est_end' class='sectionTitle'><?php 
        _e('Property', THEMENAME);
        ?>
</label>
	        				<?php 
        $current = get_post_meta($post->ID, '_est_property_id', true);
        $properties = get_property_dropdown_options();
        ?>
		        				<select class='widefat' id='_est_property_id' name='_est_property_id'>
		        					<option value=''>-- Select a Property --</option>
		        					<?php 
        if (!empty($properties)) {
            foreach ($properties as $value => $name) {
                $selected = $value == $current ? 'selected="selected"' : '';
                ?>
										<option <?php 
                echo $selected;
                ?>
 value='<?php 
                echo $value;
                ?>
'><?php 
                echo $name;
                ?>
</option>
		        					<?php 
            }
        }
        ?>
		        				</select>
	        			</div>


	        		</section>

	        		<section>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the name of the booking party', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_name' class='sectionTitle'><?php 
        _e('Full Name', THEMENAME);
        ?>
</label>
	        				<?php 
        $value = get_post_meta($post->ID, '_est_name', true);
        ?>
		        				<input class='widefat' type='text' id='_est_name' name='_est_name' value='<?php 
        echo $value;
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the email address of the booking party', THEMENAME);
        ?>
        						</div>
        					</div>


	        				<label for='_est_email' class='sectionTitle'><?php 
        _e('Email', THEMENAME);
        ?>
</label>
	        				<?php 
        $value = get_post_meta($post->ID, '_est_email', true);
        ?>
		        				<input class='widefat' type='text' id='_est_email' name='_est_email' value='<?php 
        echo $value;
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the phone number of the booking party', THEMENAME);
        ?>
        						</div>
        					</div>


	        				<label for='_est_phone' class='sectionTitle'><?php 
        _e('Phone', THEMENAME);
        ?>
</label>
	        				<?php 
        $value = get_post_meta($post->ID, '_est_phone', true);
        ?>
		        				<input class='widefat' type='text' id='_est_phone' name='_est_phone' value='<?php 
        echo $value;
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify any additional notes about this booking', THEMENAME);
        ?>
        						</div>
        					</div>


	        				<label for='_est_notes' class='sectionTitle'><?php 
        _e('Additional Notes', THEMENAME);
        ?>
</label>
	        				<?php 
        $value = get_post_meta($post->ID, '_est_notes', true);
        ?>
		        				<textarea class='widefat' style='height:120px;' id='_est_notes' name='_est_notes'><?php 
        echo $value;
        ?>
</textarea>
	        			</div>


	        		</section>


					<section>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select weather or not you have received the payment', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_paid' class='sectionTitle'><?php 
        _e('Payment Received?', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Yes' => 'yes', 'No' => 'no');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_paid', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = (!empty($current) and $current == $value or empty($current) and $value == 'no') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_paid-<?php 
            echo $i;
            ?>
' name='_est_paid' value='<?php 
            echo $value;
            ?>
'><label for='_est_paid-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Add the payment ID if you have one', THEMENAME);
        ?>
        						</div>
        					</div>


	        				<label for='_payment_id' class='sectionTitle'><?php 
        _e('Payment ID', THEMENAME);
        ?>
</label>
	        				<?php 
        $value = get_post_meta($post->ID, '_payment_id', true);
        ?>
		        				<input class='widefat' type='text' id='_payment_id' name='_payment_id' value='<?php 
        echo $value;
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Add the payment ID if you have one', THEMENAME);
        ?>
        						</div>
        					</div>


	        				<label for='_est_paid_amount' class='sectionTitle'><?php 
        _e('Received Payment', THEMENAME);
        ?>
</label>
	        				<?php 
        $value = get_post_meta($post->ID, '_est_paid_amount', true);
        ?>
		        				<input class='widefat' type='text' id='_est_paid_amount' name='_est_paid_amount' value='<?php 
        echo $value;
        ?>
'>
	        			</div>



	        		</section>




	        		<section class='helpSection'>
	        			<?php 
        _e('
	        				<p>
	        					Posts allow you to create simple blog-like content. They are shown on the main page by default and can be categorized and tagged for better organization. Musico offers a few special options for posts in addition to the numerous shortcodes which will help you format your content.
	        				</p>

							<ul>
								<li>
								Structure
							<ul>
								<li><strong>Layout</strong>: By default the layout of this post is inherited from the default layout which can be changed in the Theme Customizer. If you need a different layout for this post, you can override the default setting.
								</li>
								<li><strong>Post Metadata</strong>: By default posts show meta information like author, tag, categories and so on. If you would not like to show this information for this post, you can enable it with this setting.</li>
								<li><strong>Sidebar</strong>: If you are using a layout with a sidebar the default sidebar will be shown. You can set the default sidebar in the Theme Customizer. If you would like to use a different sidebar on this post, choose one here.
								</li>

							</ul>
							</li>
							</ul>


	        			', THEMENAME);
        ?>
	        		</section>

	        		<section class='helpSection'>
	        			<?php 
        echo bsh_docs_shortcodes();
        ?>
		        	</section>
		        	<section class='helpSection'>
			        	<?php 
        echo bsh_docs_get_support();
        ?>
			   		</section>

	        	</div>
	        	<div class='clear'></div>
	        </div>

        <?php 
    }
    public function options_box_content($post)
    {
        ?>
        	<div id='bshLogo'></div>
        	<div id='optionsContainer'>
        		<div id='menuBackground'></div>

	        	<ul id='bshMenu'>
	        		<li class='active'><?php 
        _e('Structure', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Help', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Shortcode Guide', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Get Support', THEMENAME);
        ?>
</l1>
	        	</ul>
	        	<div id='bshOptions'>
		        	<input id='bshSaveTop' name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="Update">

	        		<section class='active'>
	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('By default the layout of this post is inherited from the default layout which can be changed in the <a href="%s">Theme Customizer</a>. If you need a different layout for this post, you can override the default setting.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='bsh_layout' class='sectionTitle'><?php 
        _e('Layout', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Global Setting' => 'default', '2 Columns - Sidebar on the Right' => '2col_right', '2 Columns - Sidebar on the Left' => '2col_left', '1 Column' => '1col');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_layout', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'default') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_layout-<?php 
            echo $i;
            ?>
' name='_est_layout' value='<?php 
            echo $value;
            ?>
'><label for='_est_layout-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('By default the metadata (post date, comment count, etc.) is shown on posts. If you don\'t need it, you can turn it off for this post here.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_metadata' class='sectionTitle'><?php 
        _e('Post Metadata', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Show' => 'show', 'Hide' => 'hide');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_metadata', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'show') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_metadata-<?php 
            echo $i;
            ?>
' name='_est_metadata' value='<?php 
            echo $value;
            ?>
'><label for='_est_metadata-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('If you are using a layout with a sidebar the default sidebar will be shown. You can set the default sidebar in the <a href="%s">Theme Customizer</a>. If you would like to use a different sidebar on this post, choose one here.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='_est_sidebar' class='sectionTitle'><?php 
        _e('Sidebar', THEMENAME);
        ?>
</label>

	        				<?php 
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        $choices = explode(',', get_theme_mod('sidebars'));
        $sidebars['default'] = 'Default';
        $sidebars['Sidebar'] = 'Sidebar';
        foreach ($choices as $choice) {
            $choice = trim($choice);
            if (!empty($choice)) {
                $sidebars[$choice] = $choice;
            }
        }
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        ?>
	        				<select id='_est_sidebar' name='_est_sidebar'>
		        				<?php 
        foreach ($sidebars as $value => $name) {
            $selected = ($current == $value or empty($current) and $value == 'default') ? 'selected="selected"' : '';
            ?>
		        				<option value='<?php 
            echo $value;
            ?>
' <?php 
            echo $selected;
            ?>
>
		        				<?php 
            echo $name;
            ?>
		        				</option>
		        				<?php 
        }
        ?>
	        				</select>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the slider (if any) to use on the page', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $slider = get_post_meta($post->ID, '_est_slider', true);
        $slider_shortcode = get_post_meta($post->ID, '_est_slider_shortcode', true);
        $checked_default = (empty($slider) or $slider == 'default') ? 'checked="checked"' : '';
        $checked_specify = (!empty($slider) and $slider == 'specify') ? 'checked="checked"' : '';
        ?>
	        				<label for='_est_slider' class='sectionTitle'><?php 
        _e('Slider To Use', THEMENAME);
        ?>
</label>

	        				<p>
	        				<input id='_est_slider_0' <?php 
        echo $checked_default;
        ?>
 type='radio' name='_est_slider' value='default'> <label for='_est_slider_0'><?php 
        _e('Use Default Slider', THEMENAME);
        ?>
</label><br>
	        				<input id='_est_slider_1' <?php 
        echo $checked_specify;
        ?>
 type='radio' name='_est_slider' value='specify'> <label for='_est_slider_1'><?php 
        _e('Specify Slider:', THEMENAME);
        ?>
</label><br>
	        				</p>
		        			<input type='text' class='widefat' id='_est_slider_shortcode' name='_est_slider_shortcode' value='<?php 
        echo $slider_shortcode;
        ?>
'></p>
	        			</div>

	        		</section>
	        		<section class='helpSection'>
	        			<?php 
        _e('
	        				<p>
	        					Posts allow you to create simple blog-like content. They are shown on the main page by default and can be categorized and tagged for better organization. Musico offers a few special options for posts in addition to the numerous shortcodes which will help you format your content.
	        				</p>

							<ul>
								<li>
								Structure
							<ul>
								<li><strong>Layout</strong>: By default the layout of this post is inherited from the default layout which can be changed in the Theme Customizer. If you need a different layout for this post, you can override the default setting.
								</li>
								<li><strong>Post Metadata</strong>: By default posts show meta information like author, tag, categories and so on. If you would not like to show this information for this post, you can enable it with this setting.</li>
								<li><strong>Sidebar</strong>: If you are using a layout with a sidebar the default sidebar will be shown. You can set the default sidebar in the Theme Customizer. If you would like to use a different sidebar on this post, choose one here.
								</li>

							</ul>
							</li>
							</ul>


	        			', THEMENAME);
        ?>
	        		</section>

	        		<section class='helpSection'>
	        			<?php 
        echo bsh_docs_shortcodes();
        ?>
		        	</section>
		        	<section class='helpSection'>
			        	<?php 
        echo bsh_docs_get_support();
        ?>
			   		</section>

	        	</div>
	        	<div class='clear'></div>
	        </div>

        <?php 
    }
    public function options_box_content($post)
    {
        ?>
        	<div id='bshLogo'></div>
        	<div id='optionsContainer'>
        		<div id='menuBackground'></div>

	        	<ul id='bshMenu'>
	        		<li class='active'><?php 
        _e('Structure', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Agent List Options', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Help', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Shortcode Guide', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Get Support', THEMENAME);
        ?>
</l1>
	        	</ul>
	        	<div id='bshOptions'>
		        	<input id='bshSaveTop' name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="Update">

	        		<section class='active'>
	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('By default the layout of this page is inherited from the default layout which can be changed in the <a href="%s">Theme Customizer</a>. If you need a different layout on this page, you can override the default setting.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='_est_layout' class='sectionTitle'><?php 
        _e('Layout', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Global Setting' => 'default', '2 Columns - Sidebar on the Right' => '2col_right', '2 Columns - Sidebar on the Left' => '2col_left', '1 Column' => '1col');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_layout', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'default') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_layout-<?php 
            echo $i;
            ?>
' name='_est_layout' value='<?php 
            echo $value;
            ?>
'><label for='_est_layout-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('By default the title of this page is shown under the header. If you would like to hide this title, check the radio button next to  "Hide"', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_title' class='sectionTitle'><?php 
        _e('Page Title', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Show' => 'show', 'Hide' => 'hide');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_title', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'show') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_title-<?php 
            echo $i;
            ?>
' name='_est_title' value='<?php 
            echo $value;
            ?>
'><label for='_est_title-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('If you are using a layout with a sidebar the default sidebar will be shown. You can set the default sidebar in the <a href="%s">Theme Customizer</a>. If you would like to use a different sidebar on this page, choose one here.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='_est_sidebar' class='sectionTitle'><?php 
        _e('Sidebar', THEMENAME);
        ?>
</label>

	        				<?php 
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        $choices = explode(',', get_theme_mod('sidebars'));
        $sidebars['default'] = 'Default';
        $sidebars['Sidebar'] = 'Sidebar';
        foreach ($choices as $choice) {
            $choice = trim($choice);
            if (!empty($choice)) {
                $sidebars[$choice] = $choice;
            }
        }
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        ?>
	        				<select id='_est_sidebar' name='_est_sidebar'>
		        				<?php 
        foreach ($sidebars as $value => $name) {
            $selected = ($current == $value or empty($current) and $value == 'default') ? 'selected="selected"' : '';
            ?>
		        				<option value='<?php 
            echo $value;
            ?>
' <?php 
            echo $selected;
            ?>
>
		        				<?php 
            echo $name;
            ?>
		        				</option>
		        				<?php 
        }
        ?>
	        				</select>
	        			</div>

	        		</section>
	        		<section>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select if you want to show agents even if they don\'t have properties assigned to them.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_show_agents_without_properties' class='sectionTitle'><?php 
        _e('Show Agents Without Properties?', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Show' => 'show', 'Hide' => 'hide');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_show_agents_without_properties', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'hide') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_show_agents_without_properties-<?php 
            echo $i;
            ?>
' name='_est_show_agents_without_properties' value='<?php 
            echo $value;
            ?>
'><label for='_est_show_agents_without_properties-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('By default a list of properties is shown next to each agent. Select "no" to disable this', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_show_properties' class='sectionTitle'><?php 
        _e('Show Agents\' Properties', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Show' => 'show', 'Hide' => 'hide');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_show_properties', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'show') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_show_properties-<?php 
            echo $i;
            ?>
' name='_est_show_properties' value='<?php 
            echo $value;
            ?>
'><label for='_est_show_properties-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you don\'t want users to be able to click through to the single agent page from the list, make sure to set this to yes', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_agent_links' class='sectionTitle'><?php 
        _e('Link to Agent Pages', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Yes' => 'yes', 'No' => 'no');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_agent_links', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'yes') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_agent_links-<?php 
            echo $i;
            ?>
' name='_est_agent_links' value='<?php 
            echo $value;
            ?>
'><label for='_est_agent_links-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Show or hide the agent\'s phone number', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_show_agent_phone' class='sectionTitle'><?php 
        _e('Show agent phone', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Yes' => 'yes', 'No' => 'no');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_show_agent_phone', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'yes') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_show_agent_phone-<?php 
            echo $i;
            ?>
' name='_est_show_agent_phone' value='<?php 
            echo $value;
            ?>
'><label for='_est_show_agent_phone-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Show or hide the agent\'s email address', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_show_agent_email' class='sectionTitle'><?php 
        _e('Show agent email', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Yes' => 'yes', 'No' => 'no');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_show_agent_email', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'yes') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_show_agent_email-<?php 
            echo $i;
            ?>
' name='_est_show_agent_email' value='<?php 
            echo $value;
            ?>
'><label for='_est_show_agent_email-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('You can make sure admins are not shown as agents by setting this option to hide', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_show_admins' class='sectionTitle'><?php 
        _e('Show Admins', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Show' => 'show', 'Hide' => 'hide');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_show_admins', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'show') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_show_admins-<?php 
            echo $i;
            ?>
' name='_est_show_admins' value='<?php 
            echo $value;
            ?>
'><label for='_est_show_admins-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

						<?php 
        $value = get_post_meta($post->ID, '_est_include_users', true);
        ?>
	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Using this text field you can specify the users you would like to show by adding their IDs separated with commas.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_include_users' class='sectionTitle'><?php 
        _e('Users To Show', THEMENAME);
        ?>
</label>
		        				<input type='text' id='_est_include_users' name='_est_include_users' value='<?php 
        echo $value;
        ?>
'>
	        			</div>




	        		</section>

	        		<section class='helpSection'>
	        			<?php 
        _e('

							<p>The agent list template allows you to create a list of agents with their contact info and apartments shown. </p>
	        			', THEMENAME);
        ?>
	        		</section>
	        		<section class='helpSection'>
	        			<?php 
        echo bsh_docs_shortcodes();
        ?>
		        	</section>
		        	<section class='helpSection'>
			        	<?php 
        echo bsh_docs_get_support();
        ?>
			   		</section>

	        	</div>
	        	<div class='clear'></div>
	        </div>

        <?php 
    }
    public function options_box_content($post)
    {
        ?>
        	<div id='bshLogo'></div>
        	<div id='optionsContainer'>
        		<div id='menuBackground'></div>

	        	<ul id='bshMenu'>
	        		<li class='active'><?php 
        _e('Structure', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Location', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Details', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Contact Options', THEMENAME);
        ?>
</li>
					<li><?php 
        _e('Booking Options', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Help', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Shortcode Guide', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Get Support', THEMENAME);
        ?>
</l1>
	        	</ul>
	        	<div id='bshOptions'>
		        	<input id='bshSaveTop' name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="Update">

	        		<section class='active'>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('By default the title of this page is shown under the header. If you would like to hide this title, check the radio button next to  "Hide"', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_title' class='sectionTitle'><?php 
        _e('Page Title', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Show' => 'show', 'Hide' => 'hide');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_title', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'show') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_title-<?php 
            echo $i;
            ?>
' name='_est_title' value='<?php 
            echo $value;
            ?>
'><label for='_est_title-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('If you are using a layout with a sidebar the default sidebar will be shown. You can set the default sidebar in the <a href="%s">Theme Customizer</a>. If you would like to use a different sidebar on this post, choose one here.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='bsh_sidebar' class='sectionTitle'><?php 
        _e('Sidebar', THEMENAME);
        ?>
</label>

	        				<?php 
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        $choices = explode(',', get_theme_mod('sidebars'));
        $sidebars['default'] = 'Default';
        $sidebars['Sidebar'] = 'Sidebar';
        $sidebars['Property Page Sidebar'] = 'Property Page Sidebar';
        foreach ($choices as $choice) {
            $choice = trim($choice);
            if (!empty($choice)) {
                $sidebars[$choice] = $choice;
            }
        }
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        ?>
	        				<select id='_est_sidebar' name='_est_sidebar'>
		        				<?php 
        foreach ($sidebars as $value => $name) {
            $selected = ($current == $value or empty($current) and $value == 'default') ? 'selected="selected"' : '';
            ?>
		        				<option value='<?php 
            echo $value;
            ?>
' <?php 
            echo $selected;
            ?>
>
		        				<?php 
            echo $name;
            ?>
		        				</option>
		        				<?php 
        }
        ?>
	        				</select>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select what you would like to use at the top of the single apartment page', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_top_element' class='sectionTitle'><?php 
        _e('Element At The Top Of The Page', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Image Slider' => 'slider', 'Featured Image' => 'thumbnail', 'Nothing' => 'none');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_top_element', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'slider') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_top_element-<?php 
            echo $i;
            ?>
' name='_est_top_element' value='<?php 
            echo $value;
            ?>
'><label for='_est_top_element-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If "image slider" is chosen for the element at the top of the page you can choose specific image IDs to make sure not all images are shown.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_slider_image_ids', true);
        ?>
	        				<label for='_est_slider_image_ids' class='sectionTitle'><?php 
        _e('Slider Image IDs (comma separated, empty for all)', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_slider_image_ids' name='_est_slider_image_ids' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Set the id of the picasa album for this property here', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_picasa_album', true);
        ?>
	        				<label for='_est_picasa_album' class='sectionTitle'><?php 
        _e('Picasa Album ID', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_picasa_album' name='_est_picasa_album' value='<?php 
        echo $value;
        ?>
'>

	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('The default data to put in the ribbon can be set in the <a href="%s">theme customizer</a>. If you want to override it for this property, simply select a different field.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='_est_ribbon_field' class='sectionTitle'><?php 
        _e('Ribbon Custom Field', THEMENAME);
        ?>
</label>

	        				<?php 
        $current = get_post_meta($post->ID, '_est_ribbon_field', true);
        $choices = array();
        $choices['default'] = '-- Use The Default --';
        $choices = array_merge($choices, get_custom_detail_array());
        ?>
	        				<select id='_est_ribbon_field' name='_est_ribbon_field'>
		        				<?php 
        foreach ($choices as $value => $name) {
            $selected = ($current == $value or empty($current) and $value == 'default') ? 'selected="selected"' : '';
            ?>
		        				<option value='<?php 
            echo $value;
            ?>
' <?php 
            echo $selected;
            ?>
>
		        				<?php 
            echo $name;
            ?>
		        				</option>
		        				<?php 
        }
        ?>
	        				</select>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the slider (if any) to use on the page', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $slider = get_post_meta($post->ID, '_est_slider', true);
        $slider_shortcode = get_post_meta($post->ID, '_est_slider_shortcode', true);
        $checked_default = (empty($slider) or $slider == 'default') ? 'checked="checked"' : '';
        $checked_specify = (!empty($slider) and $slider == 'specify') ? 'checked="checked"' : '';
        ?>
	        				<label for='_est_slider' class='sectionTitle'><?php 
        _e('Slider To Use', THEMENAME);
        ?>
</label>

	        				<p>
	        				<input id='_est_slider_0' <?php 
        echo $checked_default;
        ?>
 type='radio' name='_est_slider' value='default'> <label for='_est_slider_0'><?php 
        _e('Use Default Slider', THEMENAME);
        ?>
</label><br>
	        				<input id='_est_slider_1' <?php 
        echo $checked_specify;
        ?>
 type='radio' name='_est_slider' value='specify'> <label for='_est_slider_1'><?php 
        _e('Specify Slider:', THEMENAME);
        ?>
</label><br>
	        				</p>
		        			<input type='text' class='widefat' id='_est_slider_shortcode' name='_est_slider_shortcode' value='<?php 
        echo $slider_shortcode;
        ?>
'></p>
	        			</div>


	        		</section>


	        		<section>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you would like this property to remain in the system but be hidden from the map, you can set this option to hide', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_show_on_map' class='sectionTitle'><?php 
        _e('Geolocation', THEMENAME);
        ?>
</label>
							<?php 
        $geolocation = get_post_meta($post->ID, '_est_geocode', true);
        if (empty($geolocation)) {
            _e('The coordinates of this property are not set. Please fill out the location details below, or the latitude and longitude fields at the bottom. If you have filled out the location fields but you do not get coordinates here you will need to ask your web host to enable curl or file_get_contents()', THEMENAME);
        } else {
            $lat = get_post_meta($post->ID, '_est_meta_latitude', true);
            $lng = get_post_meta($post->ID, '_est_meta_longitude', true);
            if (empty($lat) or empty($lng)) {
                echo sprintf(__('The coordinates of this property have been geocoded by Google using the location fields. The coordinates are the following: <br> %s', THEMENAME), $geolocation);
            } else {
                echo sprintf(__('The coordinates of this property have been entered manually in the latitude and longitude field. They are the following: <br> %s', THEMENAME), $geolocation);
            }
        }
        ?>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you would like this property to remain in the system but be hidden from the map, you can set this option to hide', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_show_on_map' class='sectionTitle'><?php 
        _e('Show On Map?', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Show' => 'show', 'Hide' => 'hide');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_show_on_map', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'show') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_show_on_map-<?php 
            echo $i;
            ?>
' name='_est_show_on_map' value='<?php 
            echo $value;
            ?>
'><label for='_est_show_on_map-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('By specifying a new image you can change the way the markers look on the map', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_marker', true);
        $value = empty($value) ? get_template_directory_uri() . '/images/marker.png' : $value;
        ?>
	        				<label for='_est_marker' class='sectionTitle'><?php 
        _e('Map Marker Image', THEMENAME);
        ?>
</label>
		        			<img src='<?php 
        echo $value;
        ?>
' data-id='_est_marker'><br><br>
		        			<span class='button primary bshUpload' data-id='_est_marker'>Select an Image</span>
		        			<input type='hidden' name='_est_marker' id='_est_marker' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select the country the property is located in.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_meta_country', true);
        ?>
	        				<label for='_est_meta_country' class='sectionTitle'><?php 
        _e('Country', THEMENAME);
        ?>
</label>
	        				<select id='_est_meta_country' name='_est_meta_country'>
	        					<?php 
        echo bsh_get_country_dropdown_options($value);
        ?>
	        				</select>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the state this property is located in', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_meta_state', true);
        ?>
	        				<label for='_est_meta_state' class='sectionTitle'><?php 
        _e('State', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_meta_state' name='_est_meta_state' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the city this property is located in', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_meta_city', true);
        ?>
	        				<label for='_est_meta_city' class='sectionTitle'><?php 
        _e('City', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_meta_city' name='_est_meta_city' value='<?php 
        echo $value;
        ?>
'>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the street level address', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_meta_address', true);
        ?>
	        				<label for='_est_meta_address' class='sectionTitle'><?php 
        _e('Street Address', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_meta_address' name='_est_meta_address' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the zip/postal code', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_meta_zipcode', true);
        ?>
	        				<label for='_est_meta_zipcode' class='sectionTitle'><?php 
        _e('Zip/Postal Code', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_meta_zipcode' name='_est_meta_zipcode' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        			<div class='option'>
        					<?php 
        _e('The following fields can be used to add the latitude and longitude manually. This can be useful if you have some properties in remote locations. Beware as this overwrites andy previous locations settings on Google Maps.', THEMENAME);
        ?>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the latitude of this location manually', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_meta_latitude', true);
        ?>
	        				<label for='_est_meta_latitude' class='sectionTitle'><?php 
        _e('Latitude', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_meta_latitude' name='_est_meta_latitude' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the longitude of this location manually', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_meta_longitude', true);
        ?>
	        				<label for='_est_meta_longitude' class='sectionTitle'><?php 
        _e('Longitude', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_meta_longitude' name='_est_meta_longitude' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        		</section>

	        		<section>

		        		<?php 
        $fields = get_option('est_customdata');
        foreach ($fields as $field) {
            if (in_array($field['key'], est_get_builtins())) {
                continue;
            }
            ?>
			        		<div class='option'>
<!--
	        					<div class='help'>
	        						<span class='title'><?php 
            _e('help', THEMENAME);
            ?>
</span>
	        						<div class='content'>
	        						<?php 
            _e('Specify the price of this property here.', THEMENAME);
            ?>
	        						</div>
	        					</div>
-->

		        				<label for='_est_price' class='sectionTitle'><?php 
            echo $field['name'];
            ?>
</label>

		        				<?php 
            show_customdata_field($post, $field);
            ?>

		        				<?php 
            $info = array();
            if (!empty($field['prefix'])) {
                $info[] = sprintf(__('Prefix: %s', THEMENAME), $field['prefix']);
            }
            if (!empty($field['suffix'])) {
                $info[] = sprintf(__('Suffix: %s', THEMENAME), $field['suffix']);
            }
            if (!empty($info)) {
                ?>
				        			<p class='description'>
				        				<?php 
                echo implode(', ', $info);
                ?>
				        			</p>
		        				<?php 
            }
            ?>
		        			</div>


		        		<?php 
        }
        ?>





	        		</section>

	        		<section>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the agent this property belongs to', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label class='sectionTitle'><?php 
        _e('Agents', THEMENAME);
        ?>
</label>

							<div id='est_agents'>
        					<?php 
        $users['administrator'] = @get_users(array('role' => 'administrator'));
        $users['agent'] = @get_users(array('role' => 'agent'));
        $users['agent'] = @get_users(array('role' => 'agent'));
        $users = array_merge($users['administrator'], $users['agent']);
        $values = get_post_meta($post->ID, '_est_agent');
        if (empty($values)) {
            $values[0] = $post->post_author;
        }
        ?>

			        			<?php 
        $i = 0;
        foreach ($values as $user_id) {
            ?>
								<div class='est_agent'>
								<label><?php 
            _e('Agent', THEMENAME);
            ?>
 <span class='agent_count'><?php 
            echo $i + 1;
            ?>
</span></label>
			        			<select class='widefat' id='_est_agent_<?php 
            echo $i;
            ?>
' name='_est_agent[<?php 
            echo $i;
            ?>
]'>
		        					<option value='0'><?php 
            _e('-- Select an Agent --', THEMENAME);
            ?>
</option>
			        				<?php 
            foreach ($users as $user) {
                $selected = $user->data->ID == $user_id ? 'selected="selected"' : '';
                ?>
			        					<option <?php 
                echo $selected;
                ?>
 value='<?php 
                echo $user->data->ID;
                ?>
'><?php 
                echo $user->data->display_name;
                ?>
</option>
			        				<?php 
            }
            ?>
			        			</select>
								<br><br>

			        			</div>
			        			<?php 
            $i++;
        }
        ?>


							</div>

		        			<a href='#' class='primary button' id='add-agent'><?php 
        _e('+ add another agent', THEMENAME);
        ?>
</a>



	        			</div>


	        			<div class='option'>
		        			<?php 
        echo sprintf(__('
		        				<p>
		        				The following fields let you customize the automatic reply messages that get sent to users sending contact messages. You only need to fill this out if you would like something different than the global settings defined in the <a href="%s">Theme Customizer</a>.
		        				</p>
								<p>
									For the subject and message fields below you can use a couple of placeholders which signify the title and the link for the property. If you use <strong>!url</strong> it will be replaced by the url of the property. If you use <strong>!title</strong> it will be replaced with the title of the property.
								</p>

		        				', THEMENAME), admin_url() . '/customize.php');
        ?>
		        		</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the subject of the auto-reply email', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_contact_reply_subject', true);
        ?>
	        				<label for='_est_contact_reply_subject' class='sectionTitle'><?php 
        _e('Contact Auto-Reply Subject', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_contact_reply_subject' name='_est_contact_reply_subject' value='<?php 
        echo $value;
        ?>
'>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the message of the auto-reply email', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_contact_reply_message', true);
        ?>
	        				<label for='_est_contact_reply_message' class='sectionTitle'><?php 
        _e('Contact Auto-Reply Message', THEMENAME);
        ?>
</label>
		        			<textarea rows='12' class='widefat' id='_est_contact_reply_message' name='_est_contact_reply_message'><?php 
        echo $value;
        ?>
</textarea>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the email address the contact email is sent to', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_contact_email', true);
        ?>
	        				<label for='_est_contact_email' class='sectionTitle'><?php 
        _e('Send The Contact Email To This Address', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_contact_email' name='_est_contact_email' value='<?php 
        echo $value;
        ?>
'>

	        			</div>

	        		</section>


					<section>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If this property is rentable users will be able to book online and view availiblitiy and so on.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_bookable' class='sectionTitle'><?php 
        _e('Is This Property Bookable?', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Yes, booking is allowed' => 'yes', 'No, no bookings can be made' => 'no');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_bookable', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'no') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_bookable-<?php 
            echo $i;
            ?>
' name='_est_bookable' value='<?php 
            echo $value;
            ?>
'><label for='_est_bookable-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you would like to have a separate PayPal email/ID associated with this property, add it here. A PayPal ID can also be added to book now pages. That serves as the default, you only need to add it here if you want it to be different from the default.', THEMENAME);
        ?>
        						</div>
        					</div>
	        					<?php 
        $value = get_post_meta($post->ID, '_est_property_paypal', true);
        ?>
	        				<label for='_est_property_paypal' class='sectionTitle'><?php 
        _e('PayPal email/ID', THEMENAME);
        ?>
</label>
			        			<input type='text' class='widefat' id='_est_property_paypal' name='_est_property_paypal' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('Enter your PayPal email or ID here', THEMENAME);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Type the currency you want to use for rental prices', THEMENAME);
        ?>
        						</div>
        					</div>
	        					<?php 
        $value = get_post_meta($post->ID, '_est_rent_currency', true);
        $value = empty($value) ? '$' : $value;
        ?>
	        				<label for='_est_rent_currency' class='sectionTitle'><?php 
        _e('Rental Price Currency', THEMENAME);
        ?>
</label>
			        			<input type='text' class='widefat' id='_est_rent_currency' name='_est_rent_currency' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('Rental Currency', THEMENAME);
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select the position of the rental currency symbol.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_rent_currency_position' class='sectionTitle'><?php 
        _e('Currency Symbol Position?', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Before' => 'before', 'After' => 'after');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_rent_currency_position', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'before') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_rent_currency_position-<?php 
            echo $i;
            ?>
' name='_est_rent_currency_position' value='<?php 
            echo $value;
            ?>
'><label for='_est_rent_currency_position-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the minimum and maximum amount of people allowed to book this property', THEMENAME);
        ?>
        						</div>
        					</div>

							<div class='half-left'>
	        					<?php 
        $value = get_post_meta($post->ID, '_est_min_guests', true);
        ?>
		        				<label for='_est_min_guests' class='sectionTitle'><?php 
        _e('Minimum Guests', THEMENAME);
        ?>
</label>
			        			<input type='text' class='widefat' id='_est_min_guests' name='_est_min_guests' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('Minimum number of guests', THEMENAME);
        ?>
'>
		        			</div>

							<div class='half-right'>
	        					<?php 
        $value = get_post_meta($post->ID, '_est_max_guests', true);
        ?>
		        				<label for='_est_max_guests' class='sectionTitle'><?php 
        _e('Maximum Guests', THEMENAME);
        ?>
</label>
			        			<input type='text' class='widefat' id='_est_max_guests' name='_est_max_guests' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('Maximum number of guests', THEMENAME);
        ?>
'>
		        			</div>


	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the minimum and maximum length of time booking is allowed', THEMENAME);
        ?>
        						</div>
        					</div>

							<div class='half-left'>
	        					<?php 
        $value = get_post_meta($post->ID, '_est_min_nights', true);
        ?>
		        				<label for='_est_min_nights' class='sectionTitle'><?php 
        _e('Minimum Stay', THEMENAME);
        ?>
</label>
			        			<input type='text' class='widefat' id='_est_min_nights' name='_est_min_nights' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('Minimum stay in days', THEMENAME);
        ?>
'>
		        			</div>

							<div class='half-right'>
	        					<?php 
        $value = get_post_meta($post->ID, '_est_max_nights', true);
        ?>
		        				<label for='_est_max_nights' class='sectionTitle'><?php 
        _e('Maximum Stay', THEMENAME);
        ?>
</label>
			        			<input type='text' class='widefat' id='_est_max_nights' name='_est_max_nights' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('Maximum stay in days', THEMENAME);
        ?>
'>
		        			</div>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the booking interval to allow. If days are selected users can choose their stay in days. If weeks is selected, users may only book weekly stays', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_booking_interval' class='sectionTitle'><?php 
        _e('Booking Intervals', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Daily bookings' => 'day', 'Only weekly stays allowed' => 'week');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_booking_interval', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'day') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_booking_interval-<?php 
            echo $i;
            ?>
' name='_est_booking_interval' value='<?php 
            echo $value;
            ?>
'><label for='_est_booking_interval-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify weather the price is calculated per room/property or per person', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_price_type' class='sectionTitle'><?php 
        _e('Price Type', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Per Night' => 'night', 'Per Person Per Night' => 'person');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_price_type', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'night') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_price_type-<?php 
            echo $i;
            ?>
' name='_est_price_type' value='<?php 
            echo $value;
            ?>
'><label for='_est_price_type-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The daily price of renting the property', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_rent_daily_price', true);
        ?>
	        				<label for='_est_rent_daily_price' class='sectionTitle'><?php 
        _e('Daily Price', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_rent_daily_price' name='_est_rent_daily_price' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('The daily price', THEMENAME);
        ?>
'>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The weekly price of renting the property. If not specified, the daily price will be used to calculate the total cost.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_rent_weekly_price', true);
        ?>
	        				<label for='_est_rent_weekly_price' class='sectionTitle'><?php 
        _e('Weekly Price', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_rent_weekly_price' name='_est_rent_weekly_price' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('The weekly price', THEMENAME);
        ?>
'>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The monthly price of renting the property. If not specified, the daily price and weekly price (if specified) will be used to calculate the total cost.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_rent_monthly_price', true);
        ?>
	        				<label for='_est_rent_monthly_price' class='sectionTitle'><?php 
        _e('Monthly Price', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_rent_monthly_price' name='_est_rent_monthly_price' value='<?php 
        echo $value;
        ?>
' placeholder='<?php 
        _e('The monthly price', THEMENAME);
        ?>
'>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The following controls allow you to specify date based discounts or increased prices.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_rent_seasonal_price', true);
        if (empty($value)) {
            $value = array(array('start' => '', 'end' => '', 'price' => array('daily' => '', 'weekly' => '', 'monthly' => '')));
        }
        ?>

	        				<label for='_est_rent_seasonal_price' class='sectionTitle'><?php 
        _e('Seasonal Prices', THEMENAME);
        ?>
</label>

		        				<table class='choices'>
		        					<thead>
		        					<tr>
		        						<th class='text-left'><?php 
        _e('Name', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Start Date', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('End Date', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Price', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Remove', THEMENAME);
        ?>
</th>
		        					</tr>
		        					</thead>
		        					<tbody>

			        				<?php 
        $i = 0;
        foreach ($value as $season) {
            ?>
			        				<tr class='est-seasonal-price'>
				        				<td>
				        				<?php 
            _e('Season Name', THEMENAME);
            ?>
<br> <input class='name' style='width:100px' name='_est_rent_seasonal_price[<?php 
            echo $i;
            ?>
][name]' value='<?php 
            echo $season['name'];
            ?>
' type='text' placeholder='name'>
				        				</td>
				        				<td>
				        				<?php 
            _e('From', THEMENAME);
            ?>
<br> <input class='from small monthdaypicker' name='_est_rent_seasonal_price[<?php 
            echo $i;
            ?>
][start]' value='<?php 
            echo $season['start'];
            ?>
' type='text' placeholder='Start Date'>
				        				</td>
				        				<td>
				        				<?php 
            _e('Until', THEMENAME);
            ?>
<br> <input class='until monthdaypicker small' name='_est_rent_seasonal_price[<?php 
            echo $i;
            ?>
][end]' value='<?php 
            echo $season['end'];
            ?>
' type='text' placeholder='End Date'>
				        				</td>
				        				<td>
				        				<?php 
            _e('The new prices are', THEMENAME);
            ?>
<br>
				        				<input class='daily small' name='_est_rent_seasonal_price[<?php 
            echo $i;
            ?>
][price][daily]' value='<?php 
            echo $season['price']['daily'];
            ?>
' type='text' placeholder='Daily'>
				        				<input name='_est_rent_seasonal_price[<?php 
            echo $i;
            ?>
][price][weekly]' class='weekly small' value='<?php 
            echo $season['price']['weekly'];
            ?>
' type='text' placeholder='Weekly'>
				        				<input name='_est_rent_seasonal_price[<?php 
            echo $i;
            ?>
][price][monthly]' class='monthly small' value='<?php 
            echo $season['price']['monthly'];
            ?>
' type='text' placeholder='Monthly'>
				        				</td>

				        				<td><br><a href='#' class='remove-seasonal-price'><?php 
            _e('remove', THEMENAME);
            ?>
</a></td>
									</tr>
									<?php 
            $i++;
        }
        ?>
								</table>
								<br>
								<a href='#' id='add-seasonal-price'><?php 
        _e('+ add another', THEMENAME);
        ?>
</a>

						</div>



	        			<div class='option'>
		        			<?php 
        echo sprintf(__('
		        				<p>
		        				The following fields let you customize the automatic booking confirmation that gets sent to users when they finalize a booking. You only need to fill this out if you would like something different than the global settings defined in the <a href="%s">Theme Customizer</a>.
		        				</p>
								<p>
									For the subject and message fields below you can use a couple of placeholders which signify the title and the link for the property. If you use <strong>!url</strong> it will be replaced by the url of the property. If you use <strong>!title</strong> it will be replaced with the title of the property.
								</p>

		        				', THEMENAME), admin_url() . '/customize.php');
        ?>
		        		</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the subject of the confimation email', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_booking_email_subject', true);
        ?>
	        				<label for='_est_booking_email_subject' class='sectionTitle'><?php 
        _e('Booking Confirmation Subject', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_booking_email_subject' name='_est_booking_email_subject' value='<?php 
        echo $value;
        ?>
'>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the message of the booking confirmation email', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_booking_email_message', true);
        ?>
	        				<label for='_est_booking_email_message' class='sectionTitle'><?php 
        _e('Booking Confirmation Message', THEMENAME);
        ?>
</label>
		        			<textarea rows='12' class='widefat' id='_est_booking_email_message' name='_est_booking_email_message'><?php 
        echo $value;
        ?>
</textarea>

	        			</div>




					</section>





	        		<section class='helpSection'>
	        			<?php 
        _e('
<div class="post-content">

							<p>Properties can be created and managed in the "Properties" section of the admin. They work quite like regular posts. In addition to the standard things like a title, content, being able to schedule them and so on, they give you a lot of property-specific options, let\'s take a look at those.</p>
<p>First of all, there are two custom taxonomies available. Property Type and Property Category. You can add as many entries as you want into each. You can later let users search based on these parameters, and you can use them in property lists to narrow what you show to users.</p>
<p>In the <a href="bonsaished.com/estatement/">Estatement Demo</a> &nbsp;we\'ve used the property types to add categories like "Apartment", "Detached House" and so on. We\'ve used the property categories to add building types like "Highrise", "Victorian", "Colonial" and so on.</p>
<p>Note that the media uploaded to properties is used in the slider for the property page. If you only add one image it is shown as a featured image, if more are added, a slider is created for you.</p>
<p>All the other property-specific settings can be found in the Estatement options box underneath the content editor. :</p>
<ul>
<li>Structure
<ul>
<li><strong><strong>Page Title</strong>: Allows you to show or hide the page title</strong></li>
<li><strong>Sidebar</strong>: Allows you ro show a specific sidebar for this page</li>
<li><strong>Element At The Top Of The Page</strong>: Allows you to select which element is shown at the top of the page.</li>
<li><strong>Ribbon Custom Field</strong>: Allows you to choose which custom field should be shown in the ribbon. A global default can be set for this in the theme customizer.</li>
</ul>
</li>
<li>Location
<ul>
<li><strong>Country</strong>: Allows you to select the country the property is located in</li>
<li><strong>State</strong>: Select the state the property is located in</li>
<li><strong>City</strong>: Add the city the property is in</li>
<li><strong>Street Address</strong>: Add the specific street address if the property.</li>
<li><strong>Zip/Postal Code</strong>: Add the zip or postal code of the property</li>
<li><strong>Latitude</strong>: Allows you to manually set the latitude for a property</li>
<li><strong>Longitude</strong>: Allows you to manually set the longitude for a property</li>
</ul>
</li>
<li>Details
<ul>
<li><b>Global Details</b>: All your global details should be shown in the top part of this section. To modify these global details go to the "Custom Fields" page. To learn more about managing custom fields read our knowledgebase article on <a href="http://bonsaished.com/blog/kb/managing-custom-fields/">Managing Custom Fields</a>.</li>
<li><strong>Custom Details</strong>: Below the global details you can add any ad-hoc details you would like to show for only this property.</li>
</ul>
</li>
<li>Contact Options
<ul>
<li><strong>Agents</strong>: This section allows you to assign agents to a property. By default the post author will be the agent but this can be changed here, and other agents can also be added. Refer to our article on <a href="http://bonsaished.com/blog/kb/managing-agents/">Managing Agents</a> for more information</li>
<li><strong>Contact Auto-Reply Subject</strong>: This setting is set globally in the theme customizer. If you want to specify a different auto-reply subject for a specific property you can do so here.</li>
<li><strong>Contact Auto-Reply Message</strong>: This setting is set globally in the theme customizer. If you want to specify a different auto-reply message for a specific property you can do so here.</li>
<li><strong>Send The Contact Email To This Address</strong>: This setting is set globally in the theme customizer. If you would like contact messages sent about a specific property to go to a different email address you can specify it here.</li>
</ul>
</li>
</ul>
<p>Don\'t forget that help is available inline inside the options box. You can read the text of this article there, as well as reading inline help for each specific option next to the option itself. Simply hover over the help link.</p>

						</div>
	        			', THEMENAME);
        ?>
	        		</section>

	        		<section class='helpSection'>
	        			<?php 
        echo bsh_docs_shortcodes();
        ?>
		        	</section>
		        	<section class='helpSection'>
			        	<?php 
        echo bsh_docs_get_support();
        ?>
			   		</section>

	        	</div>
	        	<div class='clear'></div>
	        </div>

        <?php 
    }
    public function options_box_content($post)
    {
        ?>
        	<div id='bshLogo'></div>
        	<div id='optionsContainer'>
        		<div id='menuBackground'></div>

	        	<ul id='bshMenu'>
	        		<li class='active'><?php 
        _e('Login Page Options', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Forgot Password Page Options', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Password Reset Page Options', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Slideshow Options', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Help', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Shortcode Guide', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Get Support', THEMENAME);
        ?>
</l1>
	        	</ul>
	        	<div id='bshOptions'>
		        	<input id='bshSaveTop' name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="Update">

	        		<section class='active'>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('This text will be used as the title for the login page', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_login_title', true);
        $value = empty($value) ? 'Log In' : $value;
        ?>
	        				<label for='_est_login_title' class='sectionTitle'><?php 
        _e('Login Title', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_login_title' name='_est_login_title' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Redirect the users to this url when they have logged in', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_login_redirect', true);
        $value = empty($value) ? site_url() : $value;
        ?>
	        				<label for='_est_login_redirect' class='sectionTitle'><?php 
        _e('After Login Redirect', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_login_redirect' name='_est_login_redirect' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>



						<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select the page used as the registration page. This must be a page which uses the Registration Page template. If no page is selected, the registration link will not be shown.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_register_page' class='sectionTitle'><?php 
        _e('Registration Page', THEMENAME);
        ?>
</label>

	        				<?php 
        $search_lists = get_posts(array('post_type' => 'page', 'post_status' => 'publish', 'posts_per_page' => -1, 'meta_query' => array(array('key' => '_wp_page_template', 'value' => 'template-bshRegisterPage.php', 'compare' => '='))));
        $choices = array('No Registration Page' => '');
        foreach ($search_lists as $page) {
            $choices[$page->post_title] = $page->ID;
        }
        $current = get_post_meta($post->ID, '_est_register_page', true);
        ?>
	        				<select id='_est_register_page' name='_est_register_page'>
		        				<?php 
        foreach ($choices as $name => $value) {
            $selected = $current == $value ? 'selected="selected"' : '';
            ?>
		        				<option value='<?php 
            echo $value;
            ?>
' <?php 
            echo $selected;
            ?>
>
		        				<?php 
            echo $name;
            ?>
		        				</option>
		        				<?php 
        }
        ?>
	        				</select>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The text you specify here will be shown in the username box as the placeholder text.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_username_placeholder', true);
        $value = empty($value) ? 'Username' : $value;
        ?>
	        				<label for='_est_username_placeholder' class='sectionTitle'><?php 
        _e('Username Placeholder', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_username_placeholder' name='_est_username_placeholder' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The text you specify here will be shown in the password box as the placeholder text.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_password_placeholder', true);
        $value = empty($value) ? 'Password' : $value;
        ?>
	        				<label for='_est_password_placeholder' class='sectionTitle'><?php 
        _e('Password Placeholder', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_password_placeholder' name='_est_password_placeholder' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('This field allows you to modify the text in the login button.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_button_text', true);
        $value = empty($value) ? 'log in' : $value;
        ?>
	        				<label for='_est_button_text' class='sectionTitle'><?php 
        _e('Button Text', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_button_text' name='_est_button_text' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text which is show when a user enters invalid login credentials.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_error_invalid', true);
        $value = empty($value) ? 'Invalid username/password combination' : $value;
        ?>
	        				<label for='_est_error_invalid' class='sectionTitle'><?php 
        _e('Invalid Login Message', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_error_invalid' name='_est_error_invalid' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the message shown if the user tried to log in with an account which hasn\'t been activated.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_error_activation', true);
        $value = empty($value) ? 'Please activate your account before logging in. If you do not have an activation link please use the forgot password form to get a new one.' : $value;
        ?>
	        				<label for='_est_error_activation' class='sectionTitle'><?php 
        _e('Inactive Account Message', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_error_activation' name='_est_error_activation' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text for the forgot password link.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_forgot_password_link_text', true);
        $value = empty($value) ? 'forgot password' : $value;
        ?>
	        				<label for='_est_forgot_password_link_text' class='sectionTitle'><?php 
        _e('Forgot Password Link Text', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_forgot_password_link_text' name='_est_forgot_password_link_text' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text for the register link.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_register_link_text', true);
        $value = empty($value) ? 'register' : $value;
        ?>
	        				<label for='_est_register_link_text' class='sectionTitle'><?php 
        _e('Register Link Text', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_register_link_text' name='_est_register_link_text' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text for the login link.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_login_link_text', true);
        $value = empty($value) ? 'log in' : $value;
        ?>
	        				<label for='_est_login_link_text' class='sectionTitle'><?php 
        _e('Login Link Text', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_login_link_text' name='_est_login_link_text' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        		</section>

					<section>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the title for the forgot password page.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_forgot_password_title', true);
        $value = empty($value) ? 'Forgot Password' : $value;
        ?>
	        				<label for='_est_forgot_password_title' class='sectionTitle'><?php 
        _e('Forgot Password Page Title', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_forgot_password_title' name='_est_forgot_password_title' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the placeholder for the email field.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_email_placeholder', true);
        $value = empty($value) ? 'Email' : $value;
        ?>
	        				<label for='_est_email_placeholder' class='sectionTitle'><?php 
        _e('Email Placeholder', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_email_placeholder' name='_est_email_placeholder' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text for the submit button.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_forgot_button_text', true);
        $value = empty($value) ? 'Retrieve Password' : $value;
        ?>
	        				<label for='_est_forgot_button_text' class='sectionTitle'><?php 
        _e('Button Text', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_forgot_button_text' name='_est_forgot_button_text' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the subject of the password retrieval email.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_forgot_email_subject', true);
        $value = empty($value) ? get_bloginfo() . ' - Reset Password' : $value;
        ?>
	        				<label for='_est_forgot_email_subject' class='sectionTitle'><?php 
        _e('Email Subject', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_forgot_email_subject' name='_est_forgot_email_subject' value='<?php 
        echo esc_attr($value);
        ?>
'>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text you would like to use in the password retrieval email.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_forgot_email_message', true);
        $value = empty($value) ? '<p>It looks like you would like to reset your password for ' . get_bloginfo() . '. If you did not initiate this request, please discard this email.</p><p>To reset your password please click on the link below, or paste it into your browser\'s URL bar.' : $value;
        ?>
	        				<label for='_est_forgot_email_message' class='sectionTitle'><?php 
        _e('Email Message', THEMENAME);
        ?>
</label>
		        			<textarea class='widefat redactor' style='height:120px;' id='_est_forgot_email_message' name='_est_forgot_email_message'><?php 
        echo $value;
        ?>
</textarea>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the title for the page displayed after the user has entered his email address.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_forgot_sent_title', true);
        $value = empty($value) ? 'Check Your Inbox' : $value;
        ?>
	        				<label for='_est_forgot_sent_title' class='sectionTitle'><?php 
        _e('Password Reset Sent Page Title', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_forgot_sent_title' name='_est_forgot_sent_title' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text to show on the page displayed after the user has entered his email address.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_forgot_sent_message', true);
        $value = empty($value) ? '<p>An email has been sent to you with instructions for resetting your password</p> <p>Follow the steps outlined in the email and you should be able to log back in in no time.</p>' : $value;
        ?>
	        				<label for='_est_forgot_sent_message' class='sectionTitle'><?php 
        _e('Password Reset Sent Page Text', THEMENAME);
        ?>
</label>
		        			<textarea class='widefat redactor' style='height:120px;' id='_est_forgot_sent_message' name='_est_forgot_sent_message'><?php 
        echo $value;
        ?>
</textarea>
	        			</div>





					</section>

					<section>
	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the title for the page shown when an incorrect reset link is used.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_invalid_key_title', true);
        $value = empty($value) ? 'Password Could Not Be Reset' : $value;
        ?>
	        				<label for='_est_invalid_key_title' class='sectionTitle'><?php 
        _e('Password Reset Failed Title', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_invalid_key_title' name='_est_invalid_key_title' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text to show on the page if the password reset fails due to an invalid security key.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_invalid_key_message', true);
        $value = empty($value) ? '<p>Your security key seems to be invalid so we can not reset your password. This usually happens if you try to reset your password twice with the same link.</p><p>If you want to reset your password again, please initiate a password reset via the login page</p>' : $value;
        ?>
	        				<label for='_est_invalid_key_message' class='sectionTitle'><?php 
        _e('Password Reset Failed Text', THEMENAME);
        ?>
</label>
		        			<textarea class='widefat redactor' style='height:120px;' id='_est_invalid_key_message' name='_est_invalid_key_message'><?php 
        echo $value;
        ?>
</textarea>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the title for the page shown when a users password has been reset and the new password has been sent.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_password_reset_success_title', true);
        $value = empty($value) ? 'Your New Password Is Ready' : $value;
        ?>
	        				<label for='_est_password_reset_success_title' class='sectionTitle'><?php 
        _e('Password Reset Success Title', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_password_reset_success_title' name='_est_password_reset_success_title' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text for the page shown when a users password has been reset and the new password has been sent.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_password_reset_success_message', true);
        $value = empty($value) ? '<p>Your password has been reset and sent to your email address. When logging in again we suggest changing your password</p>' : $value;
        ?>
	        				<label for='_est_password_reset_success_message' class='sectionTitle'><?php 
        _e('Password Reset Success Text', THEMENAME);
        ?>
</label>
		        			<textarea class='widefat redactor' style='height:120px;' id='_est_password_reset_success_message' name='_est_password_reset_success_message'><?php 
        echo $value;
        ?>
</textarea>
	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the subject for the email which contains the user\'s new password', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_password_reset_subject', true);
        $value = empty($value) ? get_bloginfo() . ' - Your new password' : $value;
        ?>
	        				<label for='_est_password_reset_subject' class='sectionTitle'><?php 
        _e('Password Reset Success Email Subject', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_password_reset_subject' name='_est_password_reset_subject' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text for the email which contains the user\'s new password. Make sure to use @password@ as a placeholder for the user\'s actual new password.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_password_reset_message', true);
        $value = empty($value) ? '<p>Congratulations your password has been reset successfully. Your new password is: <strong>@password@</strong>.</p><p>You can now <a href="' . get_permalink($post->ID) . '">log in</a> with your new password. We recommend changing it as soon as you log in again.</p>' : $value;
        ?>
	        				<label for='_est_password_reset_message' class='sectionTitle'><?php 
        _e('Password Reset Success Text', THEMENAME);
        ?>
</label>
		        			<textarea class='widefat redactor' style='height:120px;' id='_est_password_reset_message' name='_est_password_reset_message'><?php 
        echo $value;
        ?>
</textarea>
	        			</div>





					</section>

	        		<section>
	        			<div class='option'>

		        		<?php 
        _e('
		        			<p>
		        			If you upload <strong>one image</strong> to this page that image will be used as the background for the search page. If you upload <strong>multiple images</strong> to this page you can set up a slideshow, or a different image to show up on each page load. The following options all apply to situations where you have uploaded more than one image.
		        			</p>
		        			', THEMENAME);
        ?>
		        		</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you have uploaded multiple images to the page you can choose to display them all using a fading transition effect or load a new one on each page load.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_search_background_type' class='sectionTitle'><?php 
        _e('Background Type', THEMENAME);
        ?>
</label>

	        				<?php 
        $choices = array('Slideshow' => 'slideshow', 'New image on each page load' => 'pageload');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_search_background_type', true);
        $current = empty($current) ? 'slideshow' : $current;
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'default') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_search_background_type-<?php 
            echo $i;
            ?>
' name='_est_search_background_type' value='<?php 
            echo $value;
            ?>
'><label for='_est_search_background_type-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>


	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you\'ve selected the slideshow option above you can set the time each image is displayed for here.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_slideshow_speed', true);
        $value = empty($value) ? '12' : $value;
        ?>
	        				<label for='_est_button_text' class='sectionTitle'><?php 
        _e('Slideshow Speed (in seconds)', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_slideshow_speed' name='_est_slideshow_speed' value='<?php 
        echo $value;
        ?>
'>
	        			</div>



		        	</section>




	        		<section class='helpSection'>
	        			<?php 
        _e('

							<p>The search page template allows you to crearte a beautiful full screen search page to capture users. It is extremely customizable allowing you to specify how users can search and what parameters they can use.</p>
<p>To create the full size backgrounds for the search page all you need to do is upload one or more large image in the add media section. These will be used as the basis for the rotation of images.</p>
<p>Search pages allow you to modify the following settings:</p>
<ul>
	<li>Text Options
<ul>
	<li><strong>Search Placeholder</strong>: Specify the text shown inside the search box by default</li>
	<li><strong>Button Text</strong>: Specify the button text</li>
	<li><strong>Advanced Options Open Text</strong>: Specify the text in the advanced search tab when it is closed</li>
	<li><strong>Advanced Options Closed Text</strong>: Specify the text in the advanced search tab when it is open</li>
</ul>
</li>
	<li>Slideshow Options
<ul>
	<li><strong>Background Type</strong>: Select how you want to show your images. You can cycle through them or show a different one on each reload.</li>
	<li><strong>Slideshow Speed</strong>: Select how long each image is shown</li>
</ul>
</li>
	<li>Advanced Search
<ul>
	<li><strong>Enable Advanced Search</strong>: If enabled, users will be able to use the parameters you specify to narrow their search.</li>
	<li><strong>Built In Details To Show</strong>: This large table allows you to select which built in details you want to allow the user to use. You can select each detail and then select the control type it should use. In addition you can type a numeric order into the box to make them show up in the order you\'d like.</li>
	<li><strong>Custom In Details To Show</strong>: This large table allows you to select which custom details you want to allow the user to use. You can select each detail and then select the control type it should use. In addition you can type a numeric order into the box to make them show up in the order you\'d like</li>
</ul>
</li>
	<li>Structure
<ul>
	<li><strong>Search Height</strong>: This option allows you to choose between a full-page search or a search with a specific height. If a specific height is selected you will be able to add content into the editor, just like on other pages. This is great for creating some beautiful <a href="http://airbnb.com">airbnb</a> style pages.</li>
	<li><strong>Layout</strong>: The layout option applies to this page if a specific search height is selected. In this case you can choose a layout.</li>
	<li><strong>Sidebar</strong>: If a search height is specifically chosen and a layout with a sidebar is used you can select which sidebar should show up here.</li>
</ul>
</li>
</ul>

	        			', THEMENAME);
        ?>
	        		</section>

	        		<section class='helpSection'>
	        			<?php 
        echo bsh_docs_shortcodes();
        ?>
		        	</section>
		        	<section class='helpSection'>
			        	<?php 
        echo bsh_docs_get_support();
        ?>
			   		</section>

	        	</div>
	        	<div class='clear'></div>
	        </div>

        <?php 
    }
    public function options_box_content($post)
    {
        ?>
        	<div id='bshLogo'></div>
        	<div id='optionsContainer'>
        		<div id='menuBackground'></div>

	        	<ul id='bshMenu'>
	        		<li class='active'><?php 
        _e('Basic Setup', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Text Options', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Slideshow Options', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Advanced Search', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Structure', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Help', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Shortcode Guide', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Get Support', THEMENAME);
        ?>
</l1>
	        	</ul>
	        	<div id='bshOptions'>
		        	<input id='bshSaveTop' name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="Update">

	        		<section class='active'>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('By default the search results are shown using the default WordPress search page. By using a dedicated post listing page you can narrow the search to a specific subset of items', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_page' class='sectionTitle'><?php 
        _e('Used Search Page', THEMENAME);
        ?>
</label>

	        				<?php 
        $search_lists = get_posts(array('post_type' => 'page', 'post_status' => 'publish', 'posts_per_page' => -1, 'meta_query' => array(array('key' => '_wp_page_template', 'value' => array('template-bshListingPage.php', 'template-bshCustomListingPage.php'), 'compare' => 'IN'))));
        if (empty($search_lists)) {
            ?>

									<p>To make sure your search page works you MUST create a property list page and use it as the results page. Create a property list page and come back here to select it.</p>
	        						<?php 
        } else {
            echo '<p>You MUST select a result page for your search page to work!</p>';
            $choices = array('-- Select a Results Page --' => 'default');
            foreach ($search_lists as $page) {
                $choices[$page->post_title] = $page->ID;
            }
            $current = get_post_meta($post->ID, '_est_search_page', true);
            ?>
		        				<select id='_est_search_page' name='_est_search_page'>
			        				<?php 
            foreach ($choices as $name => $value) {
                $selected = ($current == $value or empty($current) and $value == 'default') ? 'selected="selected"' : '';
                ?>
			        				<option value='<?php 
                echo $value;
                ?>
' <?php 
                echo $selected;
                ?>
>
			        				<?php 
                echo $name;
                ?>
			        				</option>
			        				<?php 
            }
            ?>
		        				</select>

								<?php 
        }
        ?>

	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Make sure the "Enable Advanced Search" box is checked if you want to enable searching based on custom parameters, taxonomies and such. You can find all the options for this below', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_advanced_search' class='sectionTitle'><?php 
        _e('Enable Advanced Search?', THEMENAME);
        ?>
</label>

	        				<?php 
        $choices = array('Yes' => 'yes', 'No' => 'no');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_advanced_search', true);
        $current = empty($current) ? 'no' : $current;
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'default') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_advanced_search-<?php 
            echo $i;
            ?>
' name='_est_advanced_search' value='<?php 
            echo $value;
            ?>
'><label for='_est_advanced_search-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>


	        			</div>



	        		</section>

	        		<section>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The text you specify here will be shown in the search input box as the placeholder text.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_input_placeholder', true);
        $value = empty($value) ? 'Where would you like to live?' : $value;
        ?>
	        				<label for='_est_input_placeholder' class='sectionTitle'><?php 
        _e('Search Placeholder', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_input_placeholder' name='_est_input_placeholder' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('This field allows you to modify the text in the search button.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_button_text', true);
        $value = empty($value) ? 'search' : $value;
        ?>
	        				<label for='_est_button_text' class='sectionTitle'><?php 
        _e('Button Text', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_button_text' name='_est_button_text' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text used for opening the advanced section. This is only visible to the user if you have enabled advanced options in the advanced search section', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_advanced_search_text', true);
        $value = empty($value) ? 'more options' : $value;
        ?>
	        				<label for='_est_advanced_search_text' class='sectionTitle'><?php 
        _e('Advanced Options Open Text', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_advanced_search_text' name='_est_advanced_search_text' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text used for closing the advanced section. This is only visible to the user if you have enabled advanced options in the advanced search section', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_advanced_search_text_open', true);
        $value = empty($value) ? 'less options' : $value;
        ?>
	        				<label for='_est_advanced_search_text_open' class='sectionTitle'><?php 
        _e('Advanced Options Close Text', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_advanced_search_text_open' name='_est_advanced_search_text_open' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>




	        		</section>
	        		<section>
	        			<div class='option'>

		        		<?php 
        _e('
		        			<p>
		        			If you upload <strong>one image</strong> to this page that image will be used as the background for the search page. If you upload <strong>multiple images</strong> to this page you can set up a slideshow, or a different image to show up on each page load. The following options all apply to situations where you have uploaded more than one image.
		        			</p>
		        			<p>
		        			    If you would like to specify images to use in the slider instead of using all the attached ones use the Image Ids field to add a comma separated list of image Ids.
		        			</p>
		        			', THEMENAME);
        ?>
		        		</div>




	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you have uploaded multiple images to the page you can choose to display them all using a fading transition effect or load a new one on each page load.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_search_background_type' class='sectionTitle'><?php 
        _e('Background Type', THEMENAME);
        ?>
</label>

	        				<?php 
        $choices = array('Slideshow' => 'slideshow', 'New image on each page load' => 'pageload');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_search_background_type', true);
        $current = empty($current) ? 'slideshow' : $current;
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'default') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_search_background_type-<?php 
            echo $i;
            ?>
' name='_est_search_background_type' value='<?php 
            echo $value;
            ?>
'><label for='_est_search_background_type-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>


	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you\'ve selected the slideshow option above you can set the time each image is displayed for here.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_slideshow_speed', true);
        $value = empty($value) ? '12' : $value;
        ?>
	        				<label for='_est_button_text' class='sectionTitle'><?php 
        _e('Slideshow Speed (in seconds)', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_slideshow_speed' name='_est_slideshow_speed' value='<?php 
        echo $value;
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you would like to show only specific images, add their ids here.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_slideshow_images', true);
        $value = empty($value) ? '' : $value;
        ?>
	        				<label for='_est_slideshow_images' class='sectionTitle'><?php 
        _e('Image Ids (comma separated)', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_slideshow_images' name='_est_slideshow_images' value='<?php 
        echo $value;
        ?>
'>
	        			</div>



		        	</section>

	        		<section>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you\'d like the search options to be visible by default choose the appropriate option below', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_show_advanced' class='sectionTitle'><?php 
        _e('Show Options By Default?', THEMENAME);
        ?>
</label>

	        				<?php 
        $choices = array('Yes' => 'yes', 'No' => 'no');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_show_advanced', true);
        $current = empty($current) ? 'no' : $current;
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'no') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_show_advanced-<?php 
            echo $i;
            ?>
' name='_est_show_advanced' value='<?php 
            echo $value;
            ?>
'><label for='_est_show_advanced-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>


	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo _e('Select the taxonomies you would like to add to this search page', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_details' class='sectionTitle'><?php 
        _e('Built In Taxonomies To Show', THEMENAME);
        ?>
</label>

	        				<?php 
        $args = array('public' => true, '_builtin' => false);
        $output = 'names';
        // or objects
        $operator = 'and';
        // 'and' or 'or'
        $taxonomies = get_option('est_taxonomies');
        $selection = get_post_meta($post->ID, '_est_taxonomies', true);
        ?>

			        				<span class='checkAll'><?php 
        _e('select all', THEMENAME);
        ?>
</span>
			        				<span class='checkNone'><?php 
        _e('select none', THEMENAME);
        ?>
</span>

		        				<table class='choices'>
		        					<thead>
		        					<tr>
		        						<th></th>
		        						<th class='text-left'><?php 
        _e('Taxonomy', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Control Type', THEMENAME);
        ?>
</th>
		        						<th><?php 
        _e('Order', THEMENAME);
        ?>
</th>
		        					</tr>
		        					</thead>
		        					<tbody>

			        				<?php 
        foreach ($taxonomies as $taxonomy => $data) {
            if (empty($selection)) {
                $checked = '';
            } else {
                $checked = (!empty($selection[$taxonomy]['show']) and $selection[$taxonomy]['show'] == 'yes') ? 'checked="checked"' : '';
            }
            ?>
			        				<tr>
				        				<td class='checkbox'>
					        				<input <?php 
            echo $checked;
            ?>
 type='checkbox' id='_est_taxonomies-<?php 
            echo $i;
            ?>
' name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][show]' value='yes'>
				        				</td>
				        				<td>
					        				<label for='_est_taxonomies-<?php 
            echo $i;
            ?>
'><?php 
            echo $data['labels']['name'];
            ?>
</label>
				        				</td>
							        	<td>
											<select name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][field]'>
				        				<?php 
            $fields = array('select' => 'Dropdown Box', 'slider' => 'Range Slider', 'checkbox' => 'Checkboxes', 'radio' => 'Radio Buttons', 'text' => 'Text Field');
            foreach ($fields as $field => $name) {
                if (empty($selection)) {
                    $selected = '';
                } else {
                    $selected = $selection[$taxonomy]['field'] == $field ? 'selected="selected"' : '';
                }
                echo '<option ' . $selected . ' value="' . $field . '">' . $name . '</option>';
            }
            ?>
				        				</td>
				        				<td class='order'>
				        					<?php 
            $order = !empty($selection[$taxonomy]['order']) ? $selection[$taxonomy]['order'] : '';
            ?>
				        					<input type='text' name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][order]' value='<?php 
            echo $order;
            ?>
'>
				        				</td>

			        				</tr>
			        				<input type='hidden' name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][type]' value='taxonomy'>

			        				<?php 
            $i++;
        }
        ?>
			        				</tbody>
		        				</table>
	        				<div class='clear'></div>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo _e('Select the default in details you would like to add to this search page', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_customdatas' class='sectionTitle'><?php 
        _e('Built In Details To Show', THEMENAME);
        ?>
</label>

	        				<?php 
        $details = get_option('est_customdata');
        $selection = get_post_meta($post->ID, '_est_customdatas', true);
        ?>

			        				<span class='checkAll'><?php 
        _e('select all', THEMENAME);
        ?>
</span>
			        				<span class='checkNone'><?php 
        _e('select none', THEMENAME);
        ?>
</span>

		        				<table class='choices'>
		        					<thead>
		        					<tr>
		        						<th></th>
		        						<th class='text-left'><?php 
        _e('Custom Field', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Control Type', THEMENAME);
        ?>
</th>
		        						<th><?php 
        _e('Order', THEMENAME);
        ?>
</th>
		        					</tr>
		        					</thead>
		        					<tbody>

			        				<?php 
        foreach ($details as $key => $datail) {
            if (empty($selection)) {
                $checked = '';
            } else {
                $checked = (!empty($selection[$key]['show']) and $selection[$key]['show'] == 'yes') ? 'checked="checked"' : '';
            }
            ?>
			        				<tr>
				        				<td class='checkbox'>
					        				<input <?php 
            echo $checked;
            ?>
 type='checkbox' id='_est_customdatas-<?php 
            echo $i;
            ?>
' name='_est_customdatas[<?php 
            echo $key;
            ?>
][show]' value='yes'>
				        				</td>
				        				<td>
					        				<label for='_est_customdatas-<?php 
            echo $i;
            ?>
'><?php 
            echo $datail['name'];
            ?>
</label>
				        				</td>
							        	<td>
											<select name='_est_customdatas[<?php 
            echo $key;
            ?>
][field]'>
				        				<?php 
            $fields = array('select' => 'Dropdown Box', 'slider' => 'Range Slider', 'checkbox' => 'Checkboxes', 'radio' => 'Radio Buttons', 'text' => 'Text Field');
            foreach ($fields as $field => $name) {
                $selected = (!empty($selection[$key]['field']) and $selection[$key]['field'] == $field) ? 'selected="selected"' : '';
                echo '<option ' . $selected . ' value="' . $field . '">' . $name . '</option>';
            }
            ?>
				        				</td>
				        				<td class='order'>
				        					<?php 
            $order = !empty($selection[$key]['order']) ? $selection[$key]['order'] : '';
            ?>
				        					<input type='text' name='_est_customdatas[<?php 
            echo $key;
            ?>
][order]' value='<?php 
            echo $order;
            ?>
'>
				        				</td>

			        				</tr>
				        			<input type='hidden' name='_est_customdatas[<?php 
            echo $key;
            ?>
][type]' value='customdata'>
		        				<?php 
            $i++;
        }
        ?>
			        				</tbody>
		        				</table>
	        				<div class='clear'></div>

	        			</div>

		        	</section>


		        	<section>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select between a full page search or specify the height to be able to add some content', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $full_value = get_post_meta($post->ID, '_est_full_page_search', true);
        $height_value = get_post_meta($post->ID, '_est_search_height', true);
        $height_value = empty($height_value) ? '400px' : $height_value;
        $checked_yes = (empty($full_value) or $full_value == 'yes') ? 'checked="checked"' : '';
        $checked_no = $full_value == 'no' ? 'checked="checked"' : '';
        ?>
	        				<label for='_est_full_page_search' class='sectionTitle'><?php 
        _e('Search Height', THEMENAME);
        ?>
</label>

	        				<p>
	        				<input id='_est_full_page_search_0' <?php 
        echo $checked_yes;
        ?>
 type='radio' name='_est_full_page_search' value='yes'> <label for='_est_full_page_search_0'><?php 
        _e('Full Page Search', THEMENAME);
        ?>
</label><br>
	        				<input id='_est_full_page_search_1' <?php 
        echo $checked_no;
        ?>
 type='radio' name='_est_full_page_search' value='no'> <label for='_est_full_page_search_1'><?php 
        _e('Specific Search Height:', THEMENAME);
        ?>
</label><br>
	        				</p>
		        			<input type='text' class='widefat' id='_est_search_height' name='_est_search_height' value='<?php 
        echo esc_attr($height_value);
        ?>
'></p>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Show or hide the title bar', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_show_title_bar' class='sectionTitle'><?php 
        _e('Show Title Bar?', THEMENAME);
        ?>
</label>

	        				<?php 
        $choices = array('Yes' => 'show', 'No' => 'hide');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_show_title_bar', true);
        $current = empty($current) ? 'show' : $current;
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'show') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_show_title_bar-<?php 
            echo $i;
            ?>
' name='_est_show_title_bar' value='<?php 
            echo $value;
            ?>
'><label for='_est_show_title_bar-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>


	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('By default the layout of this page is inherited from the default layout which can be changed in the <a href="%s">Theme Customizer</a>. If you need a different layout on this page, you can override the default setting.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='_est_layout' class='sectionTitle'><?php 
        _e('Layout', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Global Setting' => 'default', '2 Columns - Sidebar on the Right' => '2col_right', '2 Columns - Sidebar on the Left' => '2col_left', '1 Column' => '1col');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_layout', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'default') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_layout-<?php 
            echo $i;
            ?>
' name='_est_layout' value='<?php 
            echo $value;
            ?>
'><label for='_est_layout-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('If you are using a layout with a sidebar the default sidebar will be shown. You can set the default sidebar in the <a href="%s">Theme Customizer</a>. If you would like to use a different sidebar on this page, choose one here.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='_est_sidebar' class='sectionTitle'><?php 
        _e('Sidebar', THEMENAME);
        ?>
</label>

	        				<?php 
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        $choices = explode(',', get_theme_mod('sidebars'));
        $sidebars['default'] = 'Default';
        $sidebars['Sidebar'] = 'Sidebar';
        foreach ($choices as $choice) {
            $choice = trim($choice);
            if (!empty($choice)) {
                $sidebars[$choice] = $choice;
            }
        }
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        ?>
	        				<select id='_est_sidebar' name='_est_sidebar'>
		        				<?php 
        foreach ($sidebars as $value => $name) {
            $selected = ($current == $value or empty($current) and $value == 'default') ? 'selected="selected"' : '';
            ?>
		        				<option value='<?php 
            echo $value;
            ?>
' <?php 
            echo $selected;
            ?>
>
		        				<?php 
            echo $name;
            ?>
		        				</option>
		        				<?php 
        }
        ?>
	        				</select>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the slider (if any) to use on the page', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $slider = get_post_meta($post->ID, '_est_slider', true);
        $slider_shortcode = get_post_meta($post->ID, '_est_slider_shortcode', true);
        $checked_default = (empty($slider) or $slider == 'default') ? 'checked="checked"' : '';
        $checked_specify = (!empty($slider) and $slider == 'specify') ? 'checked="checked"' : '';
        ?>
	        				<label for='_est_slider' class='sectionTitle'><?php 
        _e('Slider To Use', THEMENAME);
        ?>
</label>

	        				<p>
	        				<input id='_est_slider_0' <?php 
        echo $checked_default;
        ?>
 type='radio' name='_est_slider' value='default'> <label for='_est_slider_0'><?php 
        _e('Use Default Slider', THEMENAME);
        ?>
</label><br>
	        				<input id='_est_slider_1' <?php 
        echo $checked_specify;
        ?>
 type='radio' name='_est_slider' value='specify'> <label for='_est_slider_1'><?php 
        _e('Specify Slider:', THEMENAME);
        ?>
</label><br>
	        				</p>
		        			<input type='text' class='widefat' id='_est_slider_shortcode' name='_est_slider_shortcode' value='<?php 
        echo $slider_shortcode;
        ?>
'></p>
	        			</div>

		        	</section>


	        		<section class='helpSection'>
	        			<?php 
        _e('

							<p>The search page template allows you to crearte a beautiful full screen search page to capture users. It is extremely customizable allowing you to specify how users can search and what parameters they can use.</p>
<p>To create the full size backgrounds for the search page all you need to do is upload one or more large image in the add media section. These will be used as the basis for the rotation of images.</p>
<p>Search pages allow you to modify the following settings:</p>
<ul>
	<li>Text Options
<ul>
	<li><strong>Search Placeholder</strong>: Specify the text shown inside the search box by default</li>
	<li><strong>Button Text</strong>: Specify the button text</li>
	<li><strong>Advanced Options Open Text</strong>: Specify the text in the advanced search tab when it is closed</li>
	<li><strong>Advanced Options Closed Text</strong>: Specify the text in the advanced search tab when it is open</li>
</ul>
</li>
	<li>Slideshow Options
<ul>
	<li><strong>Background Type</strong>: Select how you want to show your images. You can cycle through them or show a different one on each reload.</li>
	<li><strong>Slideshow Speed</strong>: Select how long each image is shown</li>
</ul>
</li>
	<li>Advanced Search
<ul>
	<li><strong>Enable Advanced Search</strong>: If enabled, users will be able to use the parameters you specify to narrow their search.</li>
	<li><strong>Built In Details To Show</strong>: This large table allows you to select which built in details you want to allow the user to use. You can select each detail and then select the control type it should use. In addition you can type a numeric order into the box to make them show up in the order you\'d like.</li>
	<li><strong>Custom In Details To Show</strong>: This large table allows you to select which custom details you want to allow the user to use. You can select each detail and then select the control type it should use. In addition you can type a numeric order into the box to make them show up in the order you\'d like</li>
</ul>
</li>
	<li>Structure
<ul>
	<li><strong>Search Height</strong>: This option allows you to choose between a full-page search or a search with a specific height. If a specific height is selected you will be able to add content into the editor, just like on other pages. This is great for creating some beautiful <a href="http://airbnb.com">airbnb</a> style pages.</li>
	<li><strong>Layout</strong>: The layout option applies to this page if a specific search height is selected. In this case you can choose a layout.</li>
	<li><strong>Sidebar</strong>: If a search height is specifically chosen and a layout with a sidebar is used you can select which sidebar should show up here.</li>
</ul>
</li>
</ul>

	        			', THEMENAME);
        ?>
	        		</section>

	        		<section class='helpSection'>
	        			<?php 
        echo bsh_docs_shortcodes();
        ?>
		        	</section>
		        	<section class='helpSection'>
			        	<?php 
        echo bsh_docs_get_support();
        ?>
			   		</section>

	        	</div>
	        	<div class='clear'></div>
	        </div>

        <?php 
    }
    public function options_box_content($post)
    {
        ?>
        	<div id='bshLogo'></div>
        	<div id='optionsContainer'>
        		<div id='menuBackground'></div>

	        	<ul id='bshMenu'>
	        		<li class='active'><?php 
        _e('Text Options', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Map Options', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Structure', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Proximity Options', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Advanced Search', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Properties Shown', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Help', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Shortcode Guide', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Get Support', THEMENAME);
        ?>
</l1>
	        	</ul>
	        	<div id='bshOptions'>
		        	<input id='bshSaveTop' name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="Update">

	        		<section class='active'>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The text you specify here will be shown in the search input box as the placeholder text.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_input_placeholder', true);
        $value = empty($value) ? 'Where would you like to live?' : $value;
        ?>
	        				<label for='_est_input_placeholder' class='sectionTitle'><?php 
        _e('Search Placeholder', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_input_placeholder' name='_est_input_placeholder' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('This field allows you to modify the text in the search button.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_button_text', true);
        $value = empty($value) ? 'search' : $value;
        ?>
	        				<label for='_est_button_text' class='sectionTitle'><?php 
        _e('Button Text', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_button_text' name='_est_button_text' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text used for opening the advanced section. This is only visible to the user if you have enabled advanced options in the advanced search section', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_advanced_search_text', true);
        $value = empty($value) ? 'more options' : $value;
        ?>
	        				<label for='_est_advanced_search_text' class='sectionTitle'><?php 
        _e('Advanced Options Open Text', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_advanced_search_text' name='_est_advanced_search_text' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text used for closing the advanced section. This is only visible to the user if you have enabled advanced options in the advanced search section', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_advanced_search_text_open', true);
        $value = empty($value) ? 'less options' : $value;
        ?>
	        				<label for='_est_advanced_search_text_open' class='sectionTitle'><?php 
        _e('Advanced Options Close Text', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_advanced_search_text_open' name='_est_advanced_search_text_open' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the text used when there are no properties found for the given location', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_no_results_message', true);
        $value = empty($value) ? 'There are no results near that location. Please try a different location, or increase the distance in the additional options' : $value;
        ?>
	        				<label for='_est_no_results_message' class='sectionTitle'><?php 
        _e('No Results Message', THEMENAME);
        ?>
</label>
		        			<textarea class='widefat' id='_est_no_results_message' name='_est_no_results_message'><?php 
        echo esc_attr($value);
        ?>
</textarea>
	        			</div>



	        		</section>


	        		<section>




	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select the type of map you would like to use in the map page', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_map_type' class='sectionTitle'><?php 
        _e('Map Type', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Roadmap' => 'roadmap', 'Satellite' => 'satellite', 'Hybrid' => 'hybrid', 'Terrain' => 'terrain');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_map_type', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'roadmap') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_map_type-<?php 
            echo $i;
            ?>
' name='_est_map_type' value='<?php 
            echo $value;
            ?>
'><label for='_est_map_type-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Set the markers to open a popup or go directly to the property', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_marker_action' class='sectionTitle'><?php 
        _e('Marker Action', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Show Popup' => 'popup', 'Link To Property Page' => 'link');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_marker_action', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'popup') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_marker_action-<?php 
            echo $i;
            ?>
' name='_est_marker_action' value='<?php 
            echo $value;
            ?>
'><label for='_est_marker_action-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Set an initial zoom for the map.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_map_initial_zoom', true);
        $value = empty($value) ? '12' : $value;
        ?>
	        				<label for='_est_map_initial_zoom' class='sectionTitle'><?php 
        _e('Initial Map Zoom', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_map_initial_zoom' name='_est_map_initial_zoom' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the initial location of the map. Use any text you would enter into Google Maps', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_initial_location', true);
        $auto = get_post_meta($post->ID, '_est_initial_location_auto', true);
        $autoChecked_on = $auto == 'yes' ? 'checked="checked"' : '';
        $autoChecked_off = $auto == 'no' ? 'checked="checked"' : '';
        $autoChecked_coord = $auto == 'coord' ? 'checked="checked"' : '';
        if (empty($autoChecked_on) and empty($autoChecked_off)) {
            $autoChecked_on = 'checked="checked"';
        }
        ?>
	        				<label for='_est_initial_location' class='sectionTitle'><?php 
        _e('Initial Map Location', THEMENAME);
        ?>
</label>

	        				<p>
	        				<input id='_est_initial_location_auto_0' <?php 
        echo $autoChecked_on;
        ?>
 type='radio' name='_est_initial_location_auto' value='yes'> <label for='_est_initial_location_auto_0'><?php 
        _e('Use the viewer\'s location', THEMENAME);
        ?>
</label><br>
	        				<input id='_est_initial_location_auto_1' <?php 
        echo $autoChecked_off;
        ?>
 type='radio' name='_est_initial_location_auto' value='no'> <label for='_est_initial_location_auto_1'><?php 
        _e('Use the specified address below', THEMENAME);
        ?>
</label><br>
	        				<input id='_est_initial_location_auto_2' <?php 
        echo $autoChecked_coord;
        ?>
 type='radio' name='_est_initial_location_auto' value='coord'> <label for='_est_initial_location_auto_2'><?php 
        _e('Use coordinates specified below (use the format: lat,lng)', THEMENAME);
        ?>
</label><br>

	        				</p>
		        			<input type='text' class='widefat' id='_est_initial_location' name='_est_initial_location' value='<?php 
        echo esc_attr($value);
        ?>
'></p>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The string you enter here will be added to every request sent to the map. If a user searches for "London" and you have entered "USA" into this field, the request sent to Google Maps will be: "London USA".', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_location_bias', true);
        $value = empty($value) ? '' : $value;
        ?>
	        				<label for='_est_location_bias' class='sectionTitle'><?php 
        _e('Location Bias', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_location_bias' name='_est_location_bias' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select what should happen if there are no properties near the users location or search', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_error_behavior' class='sectionTitle'><?php 
        _e('Error Behavior', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Show Error Message' => 'show_error', 'Don\'t Show Error Message' => 'no_error');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_error_behavior', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'show_error') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_error_behavior-<?php 
            echo $i;
            ?>
' name='_est_error_behavior' value='<?php 
            echo $value;
            ?>
'><label for='_est_error_behavior-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('By specifying a new image you can change the way the markers look on the map', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_marker', true);
        $value = empty($value) ? get_template_directory_uri() . '/images/marker.png' : $value;
        ?>
	        				<label for='_est_marker' class='sectionTitle'><?php 
        _e('Map Marker Image', THEMENAME);
        ?>
</label>
		        			<img src='<?php 
        echo $value;
        ?>
' data-id='_est_marker'><br><br>
		        			<span class='button primary bshUpload' data-id='_est_marker'>Select an Image</span>
		        			<input type='hidden' name='_est_marker' id='_est_marker'>

	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Set a horizontal offset for the map.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_map_offset_x', true);
        $value = empty($value) ? '0' : $value;
        ?>
	        				<label for='_est_map_offset_x' class='sectionTitle'><?php 
        _e('Horizontal Map Offset', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_map_offset_x' name='_est_map_offset_x' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Set a vertical offset for the map.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_map_offset_y', true);
        $value = empty($value) ? '0' : $value;
        ?>
	        				<label for='_est_map_offset_y' class='sectionTitle'><?php 
        _e('Vertical Map Offset', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_map_offset_y' name='_est_map_offset_y' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>

	        		</section>

	        		<section>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select between a full page map or specify the height to be able to add some content', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $full_value = get_post_meta($post->ID, '_est_full_page_map', true);
        $height_value = get_post_meta($post->ID, '_est_map_height', true);
        $height_value = empty($height_value) ? '400px' : $height_value;
        $checked_yes = (empty($full_value) or $full_value == 'yes') ? 'checked="checked"' : '';
        $checked_no = $full_value == 'no' ? 'checked="checked"' : '';
        ?>
	        				<label for='_est_full_page_map' class='sectionTitle'><?php 
        _e('Map Height', THEMENAME);
        ?>
</label>

	        				<p>
	        				<input id='_est_full_page_map_0' <?php 
        echo $checked_yes;
        ?>
 type='radio' name='_est_full_page_map' value='yes'> <label for='_est_full_page_map_0'><?php 
        _e('Full Page Map', THEMENAME);
        ?>
</label><br>
	        				<input id='_est_full_page_map_1' <?php 
        echo $checked_no;
        ?>
 type='radio' name='_est_full_page_map' value='no'> <label for='_est_full_page_map_1'><?php 
        _e('Specific Map Height:', THEMENAME);
        ?>
</label><br>
	        				</p>
		        			<input type='text' class='widefat' id='_est_map_height' name='_est_map_height' value='<?php 
        echo esc_attr($height_value);
        ?>
'></p>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('By default the layout of this page is inherited from the default layout which can be changed in the <a href="%s">Theme Customizer</a>. If you need a different layout on this page, you can override the default setting.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='_est_layout' class='sectionTitle'><?php 
        _e('Layout', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Global Setting' => 'default', '2 Columns - Sidebar on the Right' => '2col_right', '2 Columns - Sidebar on the Left' => '2col_left', '1 Column' => '1col');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_layout', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'default') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_layout-<?php 
            echo $i;
            ?>
' name='_est_layout' value='<?php 
            echo $value;
            ?>
'><label for='_est_layout-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('If you are using a layout with a sidebar the default sidebar will be shown. You can set the default sidebar in the <a href="%s">Theme Customizer</a>. If you would like to use a different sidebar on this page, choose one here.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='_est_sidebar' class='sectionTitle'><?php 
        _e('Sidebar', THEMENAME);
        ?>
</label>

	        				<?php 
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        $choices = explode(',', get_theme_mod('sidebars'));
        $sidebars['default'] = 'Default';
        $sidebars['Sidebar'] = 'Sidebar';
        foreach ($choices as $choice) {
            $choice = trim($choice);
            if (!empty($choice)) {
                $sidebars[$choice] = $choice;
            }
        }
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        ?>
	        				<select id='_est_sidebar' name='_est_sidebar'>
		        				<?php 
        foreach ($sidebars as $value => $name) {
            $selected = ($current == $value or empty($current) and $value == 'default') ? 'selected="selected"' : '';
            ?>
		        				<option value='<?php 
            echo $value;
            ?>
' <?php 
            echo $selected;
            ?>
>
		        				<?php 
            echo $name;
            ?>
		        				</option>
		        				<?php 
        }
        ?>
	        				</select>
	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the slider (if any) to use on the page', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $slider = get_post_meta($post->ID, '_est_slider', true);
        $slider_shortcode = get_post_meta($post->ID, '_est_slider_shortcode', true);
        $checked_default = (empty($slider) or $slider == 'default') ? 'checked="checked"' : '';
        $checked_specify = (!empty($slider) and $slider == 'specify') ? 'checked="checked"' : '';
        ?>
	        				<label for='_est_slider' class='sectionTitle'><?php 
        _e('Slider To Use', THEMENAME);
        ?>
</label>

	        				<p>
	        				<input id='_est_slider_0' <?php 
        echo $checked_default;
        ?>
 type='radio' name='_est_slider' value='default'> <label for='_est_slider_0'><?php 
        _e('Use Default Slider', THEMENAME);
        ?>
</label><br>
	        				<input id='_est_slider_1' <?php 
        echo $checked_specify;
        ?>
 type='radio' name='_est_slider' value='specify'> <label for='_est_slider_1'><?php 
        _e('Specify Slider:', THEMENAME);
        ?>
</label><br>
	        				</p>
		        			<input type='text' class='widefat' id='_est_slider_shortcode' name='_est_slider_shortcode' value='<?php 
        echo $slider_shortcode;
        ?>
'></p>
	        			</div>


	        		</section>

					<section>
	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If enabled users can choose to search for properties near their area. If disabled the default proximity value will be used', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_show_proximity' class='sectionTitle'><?php 
        _e('Enable Proximity Search?', THEMENAME);
        ?>
</label>

	        				<?php 
        $choices = array('Yes' => 'yes', 'No' => 'no');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_show_proximity', true);
        $current = empty($current) ? 'yes' : $current;
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'default') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_show_proximity-<?php 
            echo $i;
            ?>
' name='_est_show_proximity' value='<?php 
            echo $value;
            ?>
'><label for='_est_show_proximity-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>


	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Define a label for the proximity field.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_proximity_label', true);
        $value = empty($value) ? 'Distance' : $value;
        ?>
	        				<label for='_est_proximity_label' class='sectionTitle'><?php 
        _e('Proximity Field Label', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_proximity_label' name='_est_proximity_label' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select a default proximity for searches. If proximity is disabled this value is used, otherwise this value is selected by default.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_default_proximity', true);
        $value = empty($value) ? '100' : $value;
        ?>
	        				<label for='_est_default_proximity' class='sectionTitle'><?php 
        _e('Default Proximity', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_default_proximity' name='_est_default_proximity' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select the unit of measurement to use for proximity', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_proximity_unit' class='sectionTitle'><?php 
        _e('Proximity Unit', THEMENAME);
        ?>
</label>

	        				<?php 
        $choices = array('Miles' => 'mi', 'Kilometers' => 'km');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_proximity_unit', true);
        $current = empty($current) ? 'mi' : $current;
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'default') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_proximity_unit-<?php 
            echo $i;
            ?>
' name='_est_proximity_unit' value='<?php 
            echo $value;
            ?>
'><label for='_est_proximity_unit-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>


	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Enter a comma separated list of values to use in the proximity dropdown, if enabled', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_proximity_options', true);
        $value = empty($value) ? '25,50,100,200,500' : $value;
        ?>
	        				<label for='_est_proximity_options' class='sectionTitle'><?php 
        _e('Selectable Proximity Values', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_proximity_options' name='_est_proximity_options' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


					</section>

	        		<section>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('By default the search results are shown using the default WordPress search page. By using a dedicated post listing page you can narrow the search to a specific subset of items', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_page' class='sectionTitle'><?php 
        _e('Used Search Page', THEMENAME);
        ?>
</label>

	        				<?php 
        $search_lists = get_posts(array('post_type' => 'page', 'post_status' => 'publish', 'meta_query' => array(array('key' => '_wp_page_template', 'value' => array('template-bshListingPage.php'), 'compare' => 'IN'))));
        $choices = array('Default Search' => 'default');
        foreach ($search_lists as $page) {
            $choices[$page->post_title] = $page->ID;
        }
        $current = get_post_meta($post->ID, '_est_search_page', true);
        ?>
	        				<select id='_est_search_page' name='_est_search_page'>
		        				<?php 
        foreach ($choices as $name => $value) {
            $selected = ($current == $value or empty($current) and $value == 'default') ? 'selected="selected"' : '';
            ?>
		        				<option value='<?php 
            echo $value;
            ?>
' <?php 
            echo $selected;
            ?>
>
		        				<?php 
            echo $name;
            ?>
		        				</option>
		        				<?php 
        }
        ?>
	        				</select>
	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you dont\'t want to enable searching on the map at all then you can disable the search functionality altogether here. Note that advanced search is only shown if this setting is set to yes.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_advanced_search' class='sectionTitle'><?php 
        _e('Enable Search?', THEMENAME);
        ?>
</label>

	        				<?php 
        $choices = array('Yes' => 'yes', 'No' => 'no');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_search', true);
        $current = empty($current) ? 'yes' : $current;
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'yes') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_search-<?php 
            echo $i;
            ?>
' name='_est_search' value='<?php 
            echo $value;
            ?>
'><label for='_est_search-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>


	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Make sure the "Enable Advanced Search" box is checked if you want to enable searching based on custom parameters, taxonomies and such. You can find all the options for this below', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_advanced_search' class='sectionTitle'><?php 
        _e('Enable Advanced Search?', THEMENAME);
        ?>
</label>

	        				<?php 
        $choices = array('Yes' => 'yes', 'No' => 'no');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_advanced_search', true);
        $current = empty($current) ? 'no' : $current;
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'default') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_advanced_search-<?php 
            echo $i;
            ?>
' name='_est_advanced_search' value='<?php 
            echo $value;
            ?>
'><label for='_est_advanced_search-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>


	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('If you\'d like the search options to be visible by default choose the appropriate option below', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_show_advanced' class='sectionTitle'><?php 
        _e('Show Options By Default?', THEMENAME);
        ?>
</label>

	        				<?php 
        $choices = array('Yes' => 'yes', 'No' => 'no');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_show_advanced', true);
        $current = empty($current) ? 'no' : $current;
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'no') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_show_advanced-<?php 
            echo $i;
            ?>
' name='_est_show_advanced' value='<?php 
            echo $value;
            ?>
'><label for='_est_show_advanced-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>


	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo _e('Select the taxonomies you would like to add to this search page', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_details' class='sectionTitle'><?php 
        _e('Built In Taxonomies To Show', THEMENAME);
        ?>
</label>

	        				<?php 
        $args = array('public' => true, '_builtin' => false);
        $output = 'names';
        // or objects
        $operator = 'and';
        // 'and' or 'or'
        $taxonomies = get_option('est_taxonomies');
        $selection = get_post_meta($post->ID, '_est_taxonomies', true);
        ?>

			        				<span class='checkAll'><?php 
        _e('select all', THEMENAME);
        ?>
</span>
			        				<span class='checkNone'><?php 
        _e('select none', THEMENAME);
        ?>
</span>

		        				<table class='choices'>
		        					<thead>
		        					<tr>
		        						<th></th>
		        						<th class='text-left'><?php 
        _e('Taxonomy', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Control Type', THEMENAME);
        ?>
</th>
		        						<th><?php 
        _e('Order', THEMENAME);
        ?>
</th>
		        					</tr>
		        					</thead>
		        					<tbody>

			        				<?php 
        foreach ($taxonomies as $taxonomy => $data) {
            $checked = (!empty($selection[$taxonomy]['show']) and $selection[$taxonomy]['show'] == 'yes') ? 'checked="checked"' : '';
            ?>
			        				<tr>
				        				<td class='checkbox'>
					        				<input <?php 
            echo $checked;
            ?>
 type='checkbox' id='_est_taxonomies-<?php 
            echo $i;
            ?>
' name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][show]' value='yes'>
				        				</td>
				        				<td>
					        				<label for='_est_taxonomies-<?php 
            echo $i;
            ?>
'><?php 
            echo $data['labels']['name'];
            ?>
</label>
				        				</td>
							        	<td>
											<select name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][field]'>
				        				<?php 
            $fields = array('select' => 'Dropdown Box', 'slider' => 'Range Slider', 'checkbox' => 'Checkboxes', 'radio' => 'Radio Buttons', 'text' => 'Text Field');
            foreach ($fields as $field => $name) {
                $selected = (!empty($selection[$taxonomy]['field']) and $selection[$taxonomy]['field'] == $field) ? 'selected="selected"' : '';
                echo '<option ' . $selected . ' value="' . $field . '">' . $name . '</option>';
            }
            ?>
				        				</td>
				        				<td class='order'>
				        					<?php 
            $order = !empty($selection[$taxonomy]['order']) ? $selection[$taxonomy]['order'] : '';
            ?>
				        					<input type='text' name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][order]' value='<?php 
            echo $order;
            ?>
'>
				        				</td>

			        				</tr>
			        				<input type='hidden' name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][type]' value='taxonomy'>

			        				<?php 
            $i++;
        }
        ?>
			        				</tbody>
		        				</table>
	        				<div class='clear'></div>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo _e('Select the default in details you would like to add to this search page', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_customdatas' class='sectionTitle'><?php 
        _e('Built In Details To Show', THEMENAME);
        ?>
</label>

	        				<?php 
        $details = get_option('est_customdata');
        $selection = get_post_meta($post->ID, '_est_customdatas', true);
        ?>

			        				<span class='checkAll'><?php 
        _e('select all', THEMENAME);
        ?>
</span>
			        				<span class='checkNone'><?php 
        _e('select none', THEMENAME);
        ?>
</span>

		        				<table class='choices'>
		        					<thead>
		        					<tr>
		        						<th></th>
		        						<th class='text-left'><?php 
        _e('Custom Field', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Control Type', THEMENAME);
        ?>
</th>
		        						<th><?php 
        _e('Order', THEMENAME);
        ?>
</th>
		        					</tr>
		        					</thead>
		        					<tbody>

			        				<?php 
        foreach ($details as $key => $datail) {
            $checked = (!empty($selection[$key]['show']) and $selection[$key]['show'] == 'yes') ? 'checked="checked"' : '';
            ?>
			        				<tr>
				        				<td class='checkbox'>
					        				<input <?php 
            echo $checked;
            ?>
 type='checkbox' id='_est_customdatas-<?php 
            echo $i;
            ?>
' name='_est_customdatas[<?php 
            echo $key;
            ?>
][show]' value='yes'>
				        				</td>
				        				<td>
					        				<label for='_est_customdatas-<?php 
            echo $i;
            ?>
'><?php 
            echo $datail['name'];
            ?>
</label>
				        				</td>
							        	<td>
											<select name='_est_customdatas[<?php 
            echo $key;
            ?>
][field]'>
				        				<?php 
            $fields = array('select' => 'Dropdown Box', 'slider' => 'Range Slider', 'checkbox' => 'Checkboxes', 'radio' => 'Radio Buttons', 'text' => 'Text Field');
            foreach ($fields as $field => $name) {
                $selected = (!empty($selection[$key]['field']) and $selection[$key]['field'] == $field) ? 'selected="selected"' : '';
                echo '<option ' . $selected . ' value="' . $field . '">' . $name . '</option>';
            }
            ?>
				        				</td>
				        				<td class='order'>
				        					<?php 
            $order = !empty($selection[$key]['order']) ? $selection[$key]['order'] : '';
            ?>
				        					<input type='text' name='_est_customdatas[<?php 
            echo $key;
            ?>
][order]' value='<?php 
            echo $order;
            ?>
'>
				        				</td>

			        				</tr>
				        			<input type='hidden' name='_est_customdatas[<?php 
            echo $key;
            ?>
][type]' value='customdata'>
		        				<?php 
            $i++;
        }
        ?>
			        				</tbody>
		        				</table>
	        				<div class='clear'></div>

	        			</div>

		        	</section>

					<section>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Select which custom field value to show in the map when users click on a map makrker', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_field' class='sectionTitle'><?php 
        _e('Field To Show', THEMENAME);
        ?>
</label>
	        				<?php 
        $customdata = get_option('est_customdata');
        foreach ($customdata as $key => $data) {
            $choices[$data['name']] = $key;
        }
        ?>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_field', true);
        ?>
		        				<select <?php 
        echo $selected;
        ?>
 id='_est_field' name='_est_field'>
		        					<option value=''><?php 
        _e('Select a Field', THEMENAME);
        ?>
</option>

		        				<?php 
        $i = 1;
        foreach ($choices as $name => $value) {
            $selected = $current == $value ? 'selected="selected"' : '';
            ?>
		        					<option <?php 
            echo $selected;
            ?>
 value='<?php 
            echo $value;
            ?>
'><?php 
            echo $name;
            ?>
</option>
		        				<?php 
        }
        ?>
		        				</select>
	        				</ul>
	        			</div>



						<?php 
        $taxonomies = get_option('est_taxonomies');
        foreach ($taxonomies as $taxonomy) {
            ?>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
            _e('help', THEMENAME);
            ?>
</span>
        						<div class='content'>
        						<?php 
            echo sprintf(__('By Selecting a number of %s you can narrow the properties shown to only the selected types. If no types are selected all properties will be shown.', THEMENAME), $taxonomy['labels']['name']);
            ?>
        						</div>
        					</div>

	        				<label for='_est_taxonomy_<?php 
            echo $taxonomy['slug'];
            ?>
' class='sectionTitle'><?php 
            echo $taxonomy['labels']['name'];
            ?>
</label>

	        				<?php 
            $terms = get_terms($taxonomy['slug']);
            if (empty($terms)) {
                echo sprintf(__('You haven\'t created any %s yet. You can do so by clicking on any property item (or creating one) and adding one on the fly using the taxonomy box on the right.', THEMENAME), $taxonomy['labels']['name']);
            } else {
                ?>

			        				<span class='checkAll'>select all</span>
			        				<span class='checkNone'>select none</span>

			        				<div class='clear'></div>


	        					<?php 
                $terms_1 = array_slice($terms, 0, ceil(count($terms) / 2));
                $terms_2 = array_slice($terms, ceil(count($terms) / 2));
                ?>
		        				<ul class='choices half-left'>
			        				<?php 
                $current = get_post_meta($post->ID, '_est_taxonomy_' . $taxonomy['slug'], true);
                $i = 1;
                foreach ($terms_1 as $term) {
                    $checked = (is_array($current) and in_array($term->term_id, $current)) ? 'checked="checked"' : '';
                    ?>
			        				<li>
			        				<input <?php 
                    echo $checked;
                    ?>
 type='checkbox' id='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
-<?php 
                    echo $i;
                    ?>
' name='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
[]' value='<?php 
                    echo $term->term_id;
                    ?>
'><label for='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
-<?php 
                    echo $i;
                    ?>
'><?php 
                    echo $term->name;
                    ?>
</label><br>
			        				</li>
			        				<?php 
                    $i++;
                }
                ?>
		        				</ul>
		        				<ul class='choices half-right'>
			        				<?php 
                foreach ($terms_2 as $term) {
                    $checked = (is_array($current) and in_array($term->term_id, $current)) ? 'checked="checked"' : '';
                    ?>
			        				<li>
			        				<input <?php 
                    echo $checked;
                    ?>
 type='checkbox' id='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
-<?php 
                    echo $i;
                    ?>
' name='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
[]' value='<?php 
                    echo $term->term_id;
                    ?>
'><label for='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
-<?php 
                    echo $i;
                    ?>
'><?php 
                    echo $term->name;
                    ?>
</label><br>
			        				</li>
			        				<?php 
                    $i++;
                }
                ?>
		        				</ul>
		        			<?php 
            }
            ?>

		        			<input type='hidden' id='_est_taxonomy_<?php 
            echo $taxonomy['slug'];
            ?>
-<?php 
            echo $i;
            ?>
' name='_est_taxonomy_<?php 
            echo $taxonomy['slug'];
            ?>
[]' value='none'>
	        				<div class='clear'></div>

	        			</div>



						<?php 
        }
        ?>

					</section>


	        		<section class='helpSection'>
	        			<?php 
        _e('

							<p>The map search page template allows you to crearte a beautiful full screen map search page. The page supports searching nearby the users location with a customizable distance</p>
<p>To create a map page first go to the Page section and add a new page. On the right, select “Map Page” from the template selector. You should see that specific options for this page type are loaded. Once done, you can add a title, some content, and choose your options.</p>
<p>Map pages allow you to modify the following settings:</p>
<ul>
<li>Text Options
<ul>
<li><strong>Search Placeholder</strong>: Specify the text shown inside the search box by default</li>
<li><strong>Button Text</strong>: Specify the button text</li>
<li><strong>Advanced Options Open Text</strong>: Specify the text in the advanced search tab when it is closed</li>
<li><strong>Advanced Options Closed Text</strong>:&nbsp;Specify the text in the advanced search tab when it is open</li>
<li><strong>No Results Message</strong>: Specify the message shown to users when no properties are found near the area they searched for.</li>
</ul>
</li>
<li>Map Options
<ul>
<li><strong>Map Type</strong>: Allows you to specify the map type.</li>
<li><strong>Initial Map Location</strong>: Specify the area the map should show when it loads. A search for nearby properties is performed when the page loads. You can also specify the user’s current location to be the initial position.</li>
<li><strong> Error Behavior</strong>: Select how the map should behave if there are no search results near the user’s location or search</li>
<li><strong>Map Marker Image</strong>: This setting allows you to select a different map marker image.</li>
</ul>
</li>
<li>Advanced Search
<ul>
<li><strong>Enable Advanced Search</strong>: If enabled, users will be able to use the parameters you specify to narrow their search.</li>
<li><strong>Built In Details To Show</strong>: This large table allows you to select which built in details you want to allow the user to use. You can select each detail and then select the control type it should use. In addition you can type a numeric order into the box to make them show up in the order you’d like.</li>
<li><strong>Custom In Details To Show</strong>: This large table allows you to select which custom details you want to allow the user to use. You can select each detail and then select the control type it should use. In addition you can type a numeric order into the box to make them show up in the order you’d like</li>
</ul>
</li>
<li>Structure
<ul>
<li><strong>Map Height</strong>: This option allows you to choose between a full-page map or a map with a specific height. If a specific height is selected you will be able to add content into the editor, just like on other pages. This is great for creating some beautiful <a href="http://airbnb.com">airbnb</a> style pages.</li>
<li><strong>Layout</strong>: The layout option applies to this page if a specific map height is selected. In this case you can choose a layout.</li>
<li><strong>Sidebar</strong>: If a map height is specifically chosen and a layout with a sidebar is used you can select which sidebar should show up here.</li>
</ul>
</li>
</ul>
<p>Don’t forget that help is available inline inside the options box. You can read the text of this article there, as well as reading inline help for each specific option next to the option itself. Simply hover over the help link.</p>

							        			', THEMENAME);
        ?>
	        		</section>

	        		<section class='helpSection'>
	        			<?php 
        echo bsh_docs_shortcodes();
        ?>
		        	</section>
		        	<section class='helpSection'>
			        	<?php 
        echo bsh_docs_get_support();
        ?>
			   		</section>

	        	</div>
	        	<div class='clear'></div>
	        </div>

        <?php 
    }
    public function options_box_content($post)
    {
        ?>
        	<div id='bshLogo'></div>
        	<div id='optionsContainer'>
        		<div id='menuBackground'></div>

	        	<ul id='bshMenu'>
	        		<li class='active'><?php 
        _e('Structure', THEMENAME);
        ?>
</l1>
	        		<li ><?php 
        _e('Properties Shown', THEMENAME);
        ?>
</li>
	        		<li><?php 
        _e('Filter Setup', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Help', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Shortcode Guide', THEMENAME);
        ?>
</l1>
	        		<li><?php 
        _e('Get Support', THEMENAME);
        ?>
</l1>
	        	</ul>
	        	<div id='bshOptions'>
		        	<input id='bshSaveTop' name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="Update">


		        	<section class='active'>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The filter area can be positioned on the left, the right (just like the sidebars) or on top.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_filter_location' class='sectionTitle'><?php 
        _e('Filter Location', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Left' => 'left', 'Right' => 'right');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_filter_location', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'right') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_filter_location-<?php 
            echo $i;
            ?>
' name='_est_filter_location' value='<?php 
            echo $value;
            ?>
'><label for='_est_filter_location-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo sprintf(__('If you are using a layout with a sidebar the default sidebar will be shown. You can set the default sidebar in the <a href="%s">Theme Customizer</a>. If you would like to use a different sidebar on this page, choose one here.', THEMENAME), esc_url(admin_url('customize.php')));
        ?>
        						</div>
        					</div>

	        				<label for='_est_sidebar' class='sectionTitle'><?php 
        _e('Sidebar', THEMENAME);
        ?>
</label>

	        				<?php 
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        $choices = explode(',', get_theme_mod('sidebars'));
        $sidebars['none'] = 'Do not show sidebar';
        $sidebars['default'] = 'Default';
        $sidebars['Sidebar'] = 'Sidebar';
        foreach ($choices as $choice) {
            $choice = trim($choice);
            if (!empty($choice)) {
                $sidebars[$choice] = $choice;
            }
        }
        $current = get_post_meta($post->ID, '_est_sidebar', true);
        ?>
	        				<select id='_est_sidebar' name='_est_sidebar'>
		        				<?php 
        foreach ($sidebars as $value => $name) {
            $selected = ($current == $value or empty($current) and $value == 'none') ? 'selected="selected"' : '';
            ?>
		        				<option value='<?php 
            echo $value;
            ?>
' <?php 
            echo $selected;
            ?>
>
		        				<?php 
            echo $name;
            ?>
		        				</option>
		        				<?php 
        }
        ?>
	        				</select>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the slider (if any) to use on the page', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $slider = get_post_meta($post->ID, '_est_slider', true);
        $slider_shortcode = get_post_meta($post->ID, '_est_slider_shortcode', true);
        $checked_default = (empty($slider) or $slider == 'default') ? 'checked="checked"' : '';
        $checked_specify = (!empty($slider) and $slider == 'specify') ? 'checked="checked"' : '';
        ?>
	        				<label for='_est_slider' class='sectionTitle'><?php 
        _e('Slider To Use', THEMENAME);
        ?>
</label>

	        				<p>
	        				<input id='_est_slider_0' <?php 
        echo $checked_default;
        ?>
 type='radio' name='_est_slider' value='default'> <label for='_est_slider_0'><?php 
        _e('Use Default Slider', THEMENAME);
        ?>
</label><br>
	        				<input id='_est_slider_1' <?php 
        echo $checked_specify;
        ?>
 type='radio' name='_est_slider' value='specify'> <label for='_est_slider_1'><?php 
        _e('Specify Slider:', THEMENAME);
        ?>
</label><br>
	        				</p>
		        			<input type='text' class='widefat' id='_est_slider_shortcode' name='_est_slider_shortcode' value='<?php 
        echo $slider_shortcode;
        ?>
'></p>
	        			</div>

		        	</section>

					<section>
						<?php 
        $taxonomies = get_option('est_taxonomies');
        foreach ($taxonomies as $taxonomy) {
            ?>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
            _e('help', THEMENAME);
            ?>
</span>
        						<div class='content'>
        						<?php 
            echo sprintf(__('By Selecting a number of %s you can narrow the properties shown to only the selected types. If no types are selected all properties will be shown.', THEMENAME), $taxonomy['labels']['name']);
            ?>
        						</div>
        					</div>

	        				<label for='_est_taxonomy_<?php 
            echo $taxonomy['slug'];
            ?>
' class='sectionTitle'><?php 
            echo $taxonomy['labels']['name'];
            ?>
</label>

	        				<?php 
            $terms = get_terms($taxonomy['slug']);
            if (empty($terms)) {
                echo sprintf(__('You haven\'t created any %s yet. You can do so by clicking on any property item (or creating one) and adding one on the fly using the taxonomy box on the right.', THEMENAME), $taxonomy['labels']['name']);
            } else {
                ?>

			        				<span class='checkAll'>select all</span>
			        				<span class='checkNone'>select none</span>

			        				<div class='clear'></div>


	        					<?php 
                $terms_1 = array_slice($terms, 0, ceil(count($terms) / 2));
                $terms_2 = array_slice($terms, ceil(count($terms) / 2));
                ?>
		        				<ul class='choices half-left'>
			        				<?php 
                $current = get_post_meta($post->ID, '_est_taxonomy_' . $taxonomy['slug'], true);
                $i = 1;
                foreach ($terms_1 as $term) {
                    $checked = (is_array($current) and in_array($term->term_id, $current)) ? 'checked="checked"' : '';
                    ?>
			        				<li>
			        				<input <?php 
                    echo $checked;
                    ?>
 type='checkbox' id='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
-<?php 
                    echo $i;
                    ?>
' name='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
[]' value='<?php 
                    echo $term->term_id;
                    ?>
'><label for='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
-<?php 
                    echo $i;
                    ?>
'><?php 
                    echo $term->name;
                    ?>
</label><br>
			        				</li>
			        				<?php 
                    $i++;
                }
                ?>
		        				</ul>
		        				<ul class='choices half-right'>
			        				<?php 
                foreach ($terms_2 as $term) {
                    $checked = (is_array($current) and in_array($term->term_id, $current)) ? 'checked="checked"' : '';
                    ?>
			        				<li>
			        				<input <?php 
                    echo $checked;
                    ?>
 type='checkbox' id='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
-<?php 
                    echo $i;
                    ?>
' name='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
[]' value='<?php 
                    echo $term->term_id;
                    ?>
'><label for='_est_taxonomy_<?php 
                    echo $taxonomy['slug'];
                    ?>
-<?php 
                    echo $i;
                    ?>
'><?php 
                    echo $term->name;
                    ?>
</label><br>
			        				</li>
			        				<?php 
                    $i++;
                }
                ?>
		        				</ul>
		        			<?php 
            }
            ?>

		        			<input type='hidden' id='_est_taxonomy_<?php 
            echo $taxonomy['slug'];
            ?>
-<?php 
            echo $i;
            ?>
' name='_est_taxonomy_<?php 
            echo $taxonomy['slug'];
            ?>
[]' value='none'>
	        				<div class='clear'></div>

	        			</div>



						<?php 
        }
        ?>


					</section>

	        		<section>

	        			 <div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify the title of the search box. If left blank the title will be hidden', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_search_title', true);
        ?>
	        				<label for='_est_search_title' class='sectionTitle'><?php 
        _e('Search Section Title', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_search_title' name='_est_search_title' value='<?php 
        echo $value;
        ?>
'>

	        			</div>


	        			 <div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Specify how the properties should be ordered', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $customdata = get_option('est_customdata');
        $value = get_post_meta($post->ID, '_est_orderby', true);
        $value = empty($value) ? 'post_date' : $value;
        $customdata['post_date'] = array('name' => __('Published Date', THEMENAME));
        $customdata['post_title'] = array('name' => __('Title', THEMENAME));
        ?>
	        				<label for='_est_orderby' class='sectionTitle'><?php 
        _e('Order Properties By', THEMENAME);
        ?>
</label>
		        			<select name='_est_orderby' id='_est_orderby'>
		        				<?php 
        foreach ($customdata as $key => $details) {
            ?>
		        				<?php 
            $selected = $value == $key ? 'selected="selected"' : '';
            ?>
		        					<option <?php 
            echo $selected;
            ?>
 value='<?php 
            echo $key;
            ?>
'><?php 
            echo $details['name'];
            ?>
</option>
		        				<?php 
        }
        ?>
		        			</select>


        					<?php 
        $value = get_post_meta($post->ID, '_est_order', true);
        $value = empty($value) ? 'DESC' : $value;
        $orders = array('DESC' => 'Descending', 'ASC' => 'Ascending');
        ?>

		        			<select name='_est_order' id='_est_order'>
		        				<?php 
        foreach ($orders as $key => $name) {
            ?>
		        				<?php 
            $selected = $value == $key ? 'selected="selected"' : '';
            ?>
		        					<option <?php 
            echo $selected;
            ?>
 value='<?php 
            echo $key;
            ?>
'><?php 
            echo $name;
            ?>
</option>
		        				<?php 
        }
        ?>
		        			</select>




	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('The filter can either show all properties and filter using a smooth animation or it can paginate the results and then filter using ajax whenever a new parameter is selected.', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_filter_type' class='sectionTitle'><?php 
        _e('Filter Type', THEMENAME);
        ?>
</label>
	        				<?php 
        $choices = array('Show All Properties - Filter With Animation' => 'all', 'Paginate Results - Filter Using AJAX' => 'paginate');
        ?>
	        				<ul class='choices'>
		        				<?php 
        $current = get_post_meta($post->ID, '_est_filter_type', true);
        $i = 1;
        foreach ($choices as $choice => $value) {
            $checked = ($current == $value or empty($current) and $value == 'all') ? 'checked="checked"' : '';
            ?>
		        				<li>
		        				<input <?php 
            echo $checked;
            ?>
 type='radio' id='_est_filter_type-<?php 
            echo $i;
            ?>
' name='_est_filter_type' value='<?php 
            echo $value;
            ?>
'><label for='_est_filter_type-<?php 
            echo $i;
            ?>
'><?php 
            echo $choice;
            ?>
</label><br>
		        				</li>
		        				<?php 
            $i++;
        }
        ?>
	        				</ul>
	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Determine the number of properties to show per page', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_posts_per_page', true);
        $value = empty($value) ? get_option('posts_per_page') : $value;
        ?>
	        				<label for='_est_posts_per_page' class='sectionTitle'><?php 
        _e('Properties Per Page', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_posts_per_page' name='_est_posts_per_page' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>



	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Define the title to be shown if there are no results.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_no_results_title', true);
        $value = empty($value) ? 'Ooops, No Results!' : $value;
        ?>
	        				<label for='_est_no_results_title' class='sectionTitle'><?php 
        _e('No Results Title', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_no_results_title' name='_est_no_results_title' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>

	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        _e('Define the message to be shown if there are no results.', THEMENAME);
        ?>
        						</div>
        					</div>

        					<?php 
        $value = get_post_meta($post->ID, '_est_no_results_message', true);
        $value = empty($value) ? 'Try broadening your search using the filters' : $value;
        ?>
	        				<label for='_est_no_results_message' class='sectionTitle'><?php 
        _e('No Results Message', THEMENAME);
        ?>
</label>
		        			<input type='text' class='widefat' id='_est_no_results_message' name='_est_no_results_message' value='<?php 
        echo esc_attr($value);
        ?>
'>
	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo _e('Select the taxonomies you would like to add to this search page', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_details' class='sectionTitle'><?php 
        _e('Built In Taxonomies To Show', THEMENAME);
        ?>
</label>

	        				<?php 
        $args = array('public' => true, '_builtin' => false);
        $output = 'names';
        // or objects
        $operator = 'and';
        // 'and' or 'or'
        $taxonomies = get_option('est_taxonomies');
        $selection = get_post_meta($post->ID, '_est_taxonomies', true);
        ?>

			        				<span class='checkAll'><?php 
        _e('select all', THEMENAME);
        ?>
</span>
			        				<span class='checkNone'><?php 
        _e('select none', THEMENAME);
        ?>
</span>

		        				<table class='choices'>
		        					<thead>
		        					<tr>
		        						<th></th>
		        						<th class='text-left'><?php 
        _e('Taxonomy', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Control Type', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Filter Type', THEMENAME);
        ?>
</th>
		        						<th><?php 
        _e('Order', THEMENAME);
        ?>
</th>
		        					</tr>
		        					</thead>
		        					<tbody>

			        				<?php 
        foreach ($taxonomies as $taxonomy => $data) {
            $checked = (!empty($selection[$taxonomy]['show']) and $selection[$taxonomy]['show'] == 'yes') ? 'checked="checked"' : '';
            ?>
			        				<tr>
				        				<td class='checkbox'>
					        				<input <?php 
            echo $checked;
            ?>
 type='checkbox' id='_est_taxonomies-<?php 
            echo $i;
            ?>
' name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][show]' value='yes'>
				        				</td>
				        				<td>
					        				<label for='_est_taxonomies-<?php 
            echo $i;
            ?>
'><?php 
            echo $data['labels']['name'];
            ?>
</label>
				        				</td>
							        	<td>
											<select name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][field]'>
				        				<?php 
            $fields = array('select' => 'Dropdown Box', 'slider' => 'Range Slider', 'checkbox' => 'Checkboxes', 'radio' => 'Radio Buttons', 'text' => 'Text Field');
            foreach ($fields as $field => $name) {
                if (empty($selection)) {
                    $selected = '';
                } else {
                    $selected = $selection[$taxonomy]['field'] == $field ? 'selected="selected"' : '';
                }
                echo '<option ' . $selected . ' value="' . $field . '">' . $name . '</option>';
            }
            ?>
				        				</td>
							        	<td>
											<select name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][filter_type]'>
				        				<?php 
            $fields = array('and' => 'And Filter', 'or' => 'Or Filter');
            foreach ($fields as $field => $name) {
                if (empty($selection)) {
                    $selected = '';
                } else {
                    $selected = $selection[$taxonomy]['filter_type'] == $field ? 'selected="selected"' : '';
                }
                echo '<option ' . $selected . ' value="' . $field . '">' . $name . '</option>';
            }
            ?>
				        				</td>

				        				<td class='order'>
				        					<?php 
            $order = !empty($selection[$taxonomy]['order']) ? $selection[$taxonomy]['order'] : '';
            ?>
				        					<input type='text' name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][order]' value='<?php 
            echo $order;
            ?>
'>
				        				</td>

			        				</tr>
			        				<input type='hidden' name='_est_taxonomies[<?php 
            echo $taxonomy;
            ?>
][type]' value='taxonomy'>

			        				<?php 
            $i++;
        }
        ?>
			        				</tbody>
		        				</table>
	        				<div class='clear'></div>

	        			</div>


	        			<div class='option'>
        					<div class='help'>
        						<span class='title'><?php 
        _e('help', THEMENAME);
        ?>
</span>
        						<div class='content'>
        						<?php 
        echo _e('Select the default in details you would like to add to this search page', THEMENAME);
        ?>
        						</div>
        					</div>

	        				<label for='_est_customdatas' class='sectionTitle'><?php 
        _e('Built In Details To Show', THEMENAME);
        ?>
</label>

	        				<?php 
        $details = get_option('est_customdata');
        $selection = get_post_meta($post->ID, '_est_customdatas', true);
        ?>

			        				<span class='checkAll'><?php 
        _e('select all', THEMENAME);
        ?>
</span>
			        				<span class='checkNone'><?php 
        _e('select none', THEMENAME);
        ?>
</span>

		        				<table class='choices'>
		        					<thead>
		        					<tr>
		        						<th></th>
		        						<th class='text-left'><?php 
        _e('Custom Field', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Control Type', THEMENAME);
        ?>
</th>
		        						<th class='text-left'><?php 
        _e('Filter Type', THEMENAME);
        ?>
</th>
		        						<th><?php 
        _e('Order', THEMENAME);
        ?>
</th>
		        					</tr>
		        					</thead>
		        					<tbody>

			        				<?php 
        foreach ($details as $key => $datail) {
            $checked = (!empty($selection[$key]['show']) and $selection[$key]['show'] == 'yes') ? 'checked="checked"' : '';
            ?>
			        				<tr>
				        				<td class='checkbox'>
					        				<input <?php 
            echo $checked;
            ?>
 type='checkbox' id='_est_customdatas-<?php 
            echo $i;
            ?>
' name='_est_customdatas[<?php 
            echo $key;
            ?>
][show]' value='yes'>
				        				</td>
				        				<td>
					        				<label for='_est_customdatas-<?php 
            echo $i;
            ?>
'><?php 
            echo $datail['name'];
            ?>
</label>
				        				</td>
							        	<td>
											<select name='_est_customdatas[<?php 
            echo $key;
            ?>
][field]'>
				        				<?php 
            $fields = array('select' => 'Dropdown Box', 'slider' => 'Range Slider', 'checkbox' => 'Checkboxes', 'radio' => 'Radio Buttons', 'text' => 'Text Field');
            foreach ($fields as $field => $name) {
                if (empty($selection)) {
                    $selected = '';
                } else {
                    $selected = $selection[$key]['field'] == $field ? 'selected="selected"' : '';
                }
                echo '<option ' . $selected . ' value="' . $field . '">' . $name . '</option>';
            }
            ?>
				        				</td>
							        	<td>
											<select name='_est_customdatas[<?php 
            echo $key;
            ?>
][filter_type]'>
				        				<?php 
            $fields = array('and' => 'And Filter', 'or' => 'Or Filter');
            foreach ($fields as $field => $name) {
                if (empty($selection)) {
                    $selected = '';
                } else {
                    $selected = $selection[$key]['filter_type'] == $field ? 'selected="selected"' : '';
                }
                echo '<option ' . $selected . ' value="' . $field . '">' . $name . '</option>';
            }
            ?>
				        				</td>

				        				<td class='order'>
				        					<?php 
            $order = !empty($selection[$key]['order']) ? $selection[$key]['order'] : '';
            ?>
				        					<input type='text' name='_est_customdatas[<?php 
            echo $key;
            ?>
][order]' value='<?php 
            echo $order;
            ?>
'>
				        				</td>

			        				</tr>
				        			<input type='hidden' name='_est_customdatas[<?php 
            echo $key;
            ?>
][type]' value='customdata'>
		        				<?php 
            $i++;
        }
        ?>
			        				</tbody>
		        				</table>
	        				<div class='clear'></div>

	        			</div>

		        	</section>



	        		<section class='helpSection'>
	        			<?php 
        _e('

							<p>The search page template allows you to crearte a beautiful full screen search page to capture users. It is extremely customizable allowing you to specify how users can search and what parameters they can use.</p>
<p>To create the full size backgrounds for the search page all you need to do is upload one or more large image in the add media section. These will be used as the basis for the rotation of images.</p>
<p>Search pages allow you to modify the following settings:</p>
<ul>
	<li>Text Options
<ul>
	<li><strong>Search Placeholder</strong>: Specify the text shown inside the search box by default</li>
	<li><strong>Button Text</strong>: Specify the button text</li>
	<li><strong>Advanced Options Open Text</strong>: Specify the text in the advanced search tab when it is closed</li>
	<li><strong>Advanced Options Closed Text</strong>: Specify the text in the advanced search tab when it is open</li>
</ul>
</li>
	<li>Slideshow Options
<ul>
	<li><strong>Background Type</strong>: Select how you want to show your images. You can cycle through them or show a different one on each reload.</li>
	<li><strong>Slideshow Speed</strong>: Select how long each image is shown</li>
</ul>
</li>
	<li>Advanced Search
<ul>
	<li><strong>Enable Advanced Search</strong>: If enabled, users will be able to use the parameters you specify to narrow their search.</li>
	<li><strong>Built In Details To Show</strong>: This large table allows you to select which built in details you want to allow the user to use. You can select each detail and then select the control type it should use. In addition you can type a numeric order into the box to make them show up in the order you\'d like.</li>
	<li><strong>Custom In Details To Show</strong>: This large table allows you to select which custom details you want to allow the user to use. You can select each detail and then select the control type it should use. In addition you can type a numeric order into the box to make them show up in the order you\'d like</li>
</ul>
</li>
	<li>Structure
<ul>
	<li><strong>Search Height</strong>: This option allows you to choose between a full-page search or a search with a specific height. If a specific height is selected you will be able to add content into the editor, just like on other pages. This is great for creating some beautiful <a href="http://airbnb.com">airbnb</a> style pages.</li>
	<li><strong>Layout</strong>: The layout option applies to this page if a specific search height is selected. In this case you can choose a layout.</li>
	<li><strong>Sidebar</strong>: If a search height is specifically chosen and a layout with a sidebar is used you can select which sidebar should show up here.</li>
</ul>
</li>
</ul>

	        			', THEMENAME);
        ?>
	        		</section>

	        		<section class='helpSection'>
	        			<?php 
        echo bsh_docs_shortcodes();
        ?>
		        	</section>
		        	<section class='helpSection'>
			        	<?php 
        echo bsh_docs_get_support();
        ?>
			   		</section>

	        	</div>
	        	<div class='clear'></div>
	        </div>

        <?php 
    }