<?php
if($_POST['sendact']=='send_inqury')
{
	require_once (TEMPLATEPATH . '/library/includes/send_inquiry_frm.php');exit;	
}elseif($_POST['sendact']=='email_frnd')
{
	require_once (TEMPLATEPATH . '/library/includes/email_friend_frm.php');exit;
}
?>
<?php get_header(); ?>
<script src="<?php bloginfo('template_directory'); ?>/library/js/add_to_cal.js" type="text/javascript"></script>
<div id="wrapper" class="clearfix">
     <div id="content" class="clearfix" >
        <?php if ( get_option( 'ptthemes_breadcrumbs' )) {  ?>
        <div class="breadcrumb clearfix">
            <div class="breadcrumb_in"><?php yoast_breadcrumb('','');  ?></div>
        </div>
    <?php } ?>
    
      <h1 class="acenter"><?php the_title(); ?></h1>  
      
      <div class="event_information">      	
    <?php if($_REQUEST['send_inquiry']=='success'){?>
        <p class="sucess_msg"><?php echo SEND_INQUIRY_SUCCESS;?></p>
        <?php }elseif($_REQUEST['sendtofrnd']=='success'){?>
        <p class="sucess_msg"><?php echo SEND_FRIEND_SUCCESS;;?></p>
        <?php }?>
        <div class="date_info">
         <p>
         <?php if(get_post_meta($post->ID,'st_date',true)){?>
         <span><?php _e('Start Date');?> :</span> <?php echo get_formated_date(get_post_meta($post->ID,'st_date',true));?> <br />
         <?php }?>
         <?php if(get_post_meta($post->ID,'end_date',true)){?>
        <span><?php _e('End Date');?>  :</span> <?php echo get_formated_date(get_post_meta($post->ID,'end_date',true));?>  <br />
        <?php }?>
        <span><?php _e('Time');?>  : </span> <?php 
		echo get_formated_time(get_post_meta($post->ID,'st_time',true))?>
		<?php
        if(get_post_meta($post->ID,'st_time',true) && get_post_meta($post->ID,'end_time',true))
		{
			_e('to');
		}
		?><?php echo get_formated_time(get_post_meta($post->ID,'end_time',true))?> </p>
		 <p> 
          <?php if(get_post_meta($post->ID,'phone',true)){ ?>
         <span><?php _e('Phone');?> :</span> <?php echo get_post_meta($post->ID,'phone',true);?>  <br /> 
         <?php }?>  
         <?php if(get_post_meta($post->ID,'email',true) && get_option('ptthemes_event_email_on_detailpage')=='Yes'){ ?>           
		<span><?php _e('Email');?> :</span> <?php echo get_post_meta($post->ID,'email',true);?></p>	
         <?php }?>
          </div> 

          <div class="location">
          	<?php if(get_post_meta($post->ID,'address',true)){ ?>
            <p> 
            <span><?php _e('Location');?>  : </span>   <br />
           <?php echo get_post_meta($post->ID,'address',true);?></p>
            <?php }?>
            <?php if(get_post_meta($post->ID,'website',true)){ ?>
            <p><a href="<?php echo get_post_meta($post->ID,'website',true);?>"><?php _e('Website');?></a></p>
             <?php }?>
             
            <?php get_add_to_calender();?>
            
            
          </div>
      </div>
<?php
include_once (TEMPLATEPATH . '/library/includes/event_detail_content.php');
?>
                 
<?php if(get_the_content())
{
?>
<h3><?php _e('Description');?></h3>
<?php
the_content();	
}else
{
?>

 



<h3><?php _e('Description');?></h3>
<?php
	echo '<p>'. nl2br($post->post_content).'</p>';	
}?>

<?php $author_info = get_author_info($post->post_author);?>

 <?php echo get_post_meta($post->ID,'video',true);?>         

<h3><?php _e('Organized by');?></h3>
         <?php if(get_post_meta($post->ID,'organizer_logo',true))
		 {?>
         <img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo get_post_meta($post->ID,'organizer_logo',true);?>&amp;w=105&amp;h=105&amp;zc=1&amp;q=80<?php echo $thumb_url1;?>" alt="" class="organized_logo"  title=""  />
       <?php }?>
        	<div class="organized_content" >
              <p> <?php _e('Organized by');?>  <a href="<?php echo get_author_link($echo = false, $post->post_author);?>"><?php echo $author_info->display_name;?></a></p> 
              <p>
			 
			  <?php echo get_post_meta($post->ID,'organizer_name',true);?>
               <?php if(get_post_meta($post->ID,'organizer_address',true)){?>
               , <br />
              <?php }?>
<?php echo get_post_meta($post->ID,'organizer_address',true);?> </p>
<p>
<?php echo get_post_meta($post->ID,'organizer_desc',true);?>
<?php if(get_post_meta($post->ID,'organizer_contact',true)  && get_option('ptthemes_contact_on_detailpage')=='Yes'){?>
<?php _e('Tel');?>: <?php echo get_post_meta($post->ID,'organizer_contact',true);?> <br />
<?php }?>
<?php if(get_post_meta($post->ID,'organizer_mobile',true)){?>
<?php _e('Mobile');?>: <?php echo get_post_meta($post->ID,'organizer_mobile',true);?><br />
<?php }?>
<?php if(get_post_meta($post->ID,'organizer_email',true) && get_option('ptthemes_email_on_detailpage')=='Yes'){?>
<?php _e('Email');?>: <?php echo get_post_meta($post->ID,'organizer_email',true);?><br />
<?php }?>
<?php if(get_post_meta($post->ID,'organizer_website',true)){?>
<?php _e('Website');?>: <a href=" <?php echo get_post_meta($post->ID,'organizer_website',true);?>"><?php echo get_post_meta($post->ID,'organizer_website',true);?></a>
<?php }?>
</p> <br />
<a class="b_contact b_send_inquiry" href="javascript:void(0);" onclick="show_hide_popup('basic-modal-content2');" ><?php _e('Contact the Organizer');?></a>

</div>
<?php if(get_post_meta($post->ID,'reg_desc',true)){?>
	<div class="register_msg clearfix" ><?php echo get_post_meta($post->ID,'reg_desc',true);?></div>
<?php }?>
        <div class="event_social_media"> 
        <div class="addthis_toolbox addthis_default_style">
<a href="http://www.addthis.com/bookmark.php?v=250&amp;username=xa-4c873bb26489d97f" class="addthis_button_compact sharethis">
<img src="<?php bloginfo('template_directory'); ?>/images/i_share.png" alt=""  /></a>
</div>
        <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4c873bb26489d97f"></script>
		<?php if(get_post_meta($post->ID,'facebook',true)){?>
        <a href="<?php echo get_post_meta($post->ID,'facebook',true);?>"><img src="<?php bloginfo('template_directory'); ?>/images/i_facebook2.png" alt="facebook"  /></a>
        <?php }?>
        <?php if(get_post_meta($post->ID,'twitter',true)){?>
        <a href="<?php echo get_post_meta($post->ID,'twitter',true);?>"><img src="<?php bloginfo('template_directory'); ?>/images/i_twitter2.png" alt="twitter"  /></a>
        <?php }?>
        <a href="javascript:void(0);" onclick="show_hide_popup('basic-modal-content');" class="b_sendtofriend"><img src="<?php bloginfo('template_directory'); ?>/images/i_emailtofriend.png" alt="email to friend"  /> </a>
        
        
        
      </div>        
        <?php the_taxonomies(array('before'=>'<p class="bottom_line"><span class="i_category">','sep'=>'</span><span class="i_tag">','after'=>'</span></p>')); ?>
        
        
        
        <div class="event_bookmark">
        	<?php if ( get_option('ptthemes_tweet_button') ) { ?>
               <a href="http://twitter.com/share" class="twitter-share-button"><?php _e('Tweet');?></a>
             <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>                     
            <?php } ?>             
             <?php if ( get_option('ptthemes_facebook_button') ) { ?>                     
            <iframe class="facebook" src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=standard&amp;show_faces=false&amp;width=290&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0"  style="border:none; overflow:hidden; width:290px; height:24px"></iframe> 
              <?php } ?>
        </div> 
        
        <div class="pos_navigation clearfix">
			<div class="post_left fl"><?php previous_post_link('%link',''.__('Previous')) ?></div>
			<div class="post_right fr"><?php next_post_link('%link',__('Next').'') ?></div>
	</div>
    
     <div class="single_post_advt"><?php dynamic_sidebar(8);  ?> </div>
    
    
<?php if(get_option('default_comment_status')){?>        
 <div id="comments" class="clearfix"> <?php comments_template(); ?></div>
 <?php }?>
</div> <!-- content #end -->


<?php get_sidebar(); ?>
</div> <!-- wrapper #end -->
<div id="bottom"></div>
<?php include_once (TEMPLATEPATH . '/library/includes/popup_frms.php');?>    
<?php get_footer(); ?>