						<div id="sidebar">

<script language="JavaScript" type="text/javascript" src="<?php bloginfo('template_directory'); ?>/jquery.form.js"></script>

		<script type="text/javascript">
		var $k = jQuery.noConflict();
		 $k(document).ready(function(){
			  $k('#contactForm').ajaxForm(function(data) {
				 if (data==1){
					 $k('#success').fadeIn("slow");
					 $k('#bademail').fadeOut("slow");
					 $k('#badserver').fadeOut("slow");
					 $k('#contact').resetForm();
					 }
				 else if (data==2){
					 $k('#badserver').fadeIn("slow");
					  }
				 else if (data==3){
					 $k('#bademail').fadeIn("slow");
					}
				 else if (data==4){
					 $k('#badcap').fadeIn("slow");
					}
				 });	
		});
		</script>
				
<?php
if (get_option('plg_form_add')=='') {
   $dispadd='Your Project';
} else {
   $dispadd=get_option('plg_form_add');
} 

$cap1=rand(1, 7);
$cap2=rand(1, 7);
$capval='What is '.$cap1.' + '.$cap2.'?';

?>

							<div class="widget_top">
								<h2><?php echo get_option('plg_form_heading') ?></h2>
							</div>
								<div class="widget_middle quote">
									<form action="<?php bloginfo('template_url'); ?>/sendmail.php" id="contactForm" method="post">
										<input type="text" onclick="clickclear(this, 'Your Name:')" onblur="clickrecall(this,'Your Name:')" alt="" name="name" id="name" value="Your Name:" class="input"/>
										<input type="text" onclick="clickclear(this, 'Your Email:')" onblur="clickrecall(this,'Your Email:')" alt="" name="email" id="email" value="Your Email:" class="input"/>
										<input type="text" onclick="clickclear(this, 'Your Phone Number:')" onblur="clickrecall(this,'Your Phone Number:')" alt="" name="number" id="number" value="Your Phone Number:" class="input"/>

										<?php if (get_option('plg_form_project') != 'true') { ?>
											<input type="text" onclick="clickclear(this, '<?php echo $dispadd; ?>:')" onblur="clickrecall(this,'<?php echo $dispadd; ?>:')" alt="" name="project" id="project" value="<?php echo $dispadd; ?>:" class="input"/>
										<?php } ?>

										<?php if (get_option('plg_form_message') != 'true') { ?>
											<div class="textareabg"><textarea onclick="clickclear(this, 'Your Message:')" onblur="clickrecall(this,'Your Message:')" name="comment">Your Message:</textarea></div>
										<?php } ?>

										<input type="text" onclick="clickclear(this, '<?php echo $capval; ?>')" onblur="clickrecall(this,'<?php echo $capval; ?>')" alt="" name="cap" id="cap" value="<?php echo $capval; ?>" class="input"/>

										<input type="submit" value="" class="submitnow" name="roofer-send" id="roofer-send" />
										<input type="hidden" name="site" value="<?php echo get_bloginfo('name') ?>" />
										<input type="hidden" name="submit" id="submitted" value="true" />
										<input type="hidden" id="formadd" name="formadd" value="<?php echo $dispadd; ?>"/>
										<input type="hidden" id="cap1" name="cap1" value="<?php echo strhex($cap1); ?>"/>
										<input type="hidden" id="cap2" name="cap2" value="<?php echo strhex($cap2); ?>"/>
										<input type="hidden" id="receiver" name="receiver" value="<?php echo strhex(get_option('plg_email_address')); ?>"/>
										<input type="hidden" id="ccreceiver" name="ccreceiver" value="<?php echo strhex(get_option('plg_ccemail_address')); ?>"/>
										<input type="hidden" id="formcode" name="formcode" value="<?php echo strhex(get_option('plg_form_code')); ?>"/>
									</form>

			<span id="success" class="successmsg" style="display:none;color:#fff;">Your email has been sent! Thank you!</span>
			<span id="bademail" class="errormsg" style="display:none;color:#fff;">Please enter your name and a valid email address.</span>
			<span id="badserver" class="errormsg" style="display:none;color:#fff;">Your email failed. Try again later.</span>
			<span id="badcap" class="errormsg" style="display:none;color:#fff;">Please check your math and resubmit :)</span>

								</div>

							<div class="widget_bottom"></div>

						<?php
						if (get_option('plg_contactimg_move') == '') {
						?>
						<?php if(function_exists('dynamic_sidebar') && dynamic_sidebar('Sidebar')):else: ?>
						<?php endif; ?>
						<?php
						}
						?>

						<?php if (get_option('plg_sidebar_contact_img_show') != 'true') { ?>

						<?php
						if (get_option('plg_sidebar_contact_img') == '') {
						   $contactimg='default.png';
						} else {
						   $contactimg=get_option('plg_sidebar_contact_img').'.png';
						}
						?>

						<?php if (get_option('plg_phone_number') != '' ) { ?>
							<div id="call_us_box" style="background: url('<?php bloginfo('template_url'); ?>/contactimg/<?php echo $contactimg; ?>') no-repeat;">
								CALL: <?php echo(stripslashes (get_option('plg_phone_number')));?>
							</div>
						<?php } ?>

						<?php } ?>



						<?php
						if (get_option('plg_contactimg_move') == 'true') {
						?>
						<?php if(function_exists('dynamic_sidebar') && dynamic_sidebar('Sidebar')):else: ?>
						<?php endif; ?>
						<?php
						}
						?>


						<?php if (get_option('plg_social_side') != 'true') { ?>

							<div class="socleft"><g:plusone href="<?php the_permalink(); ?>"></g:plusone></div>

							<div class="socmid"><a href="https://twitter.com/share" class="twitter-share-button" data-lang="en">Tweet</a>
							<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></div>

							<div class="socright"><iframe src="http://www.facebook.com/plugins/like.php?href=<?php the_permalink(); ?>&amp;layout=standard&amp;show_faces=false&amp;width=50&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:50px; height:60px;"></iframe></div><br class="clear" />

						<?php } ?>

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