<?php global $themeple_config; ?>


<?
global $b_webPath;
global $b_gPath;
global $b_D;
$dGrandpa_en_name=$dGrandpa_id=$dFather_id=$dFather_en_name=false;
$clockTZone='';
$ClockTState='';
$clockTKey='KLMNNN61ZWTW';
/* BASHRO EDIT*/
$pVal= get_post_custom( $post->ID );
$dType=$pVal['bash_dest_type'][0];
$dEN=$pVal['bash_dest_en_name'][0];
$dFather_id=$pVal['bash_dest_father'][0];
$full_add=$b_D->cleanName($dEN);

	if($dType==0){}
	else if($dType==1 || $dType==2){
	$dFather_cust=get_post_custom($dFather_id);
//	echo $dFather_cust['bash_dest_en_name'][0];
	$dFather_en_name=$dFather_cust['bash_dest_en_name'][0];
	$full_add.=', '.$b_D->cleanName($dFather_en_name);

		if($dType==2){
			$dGrandpa_id=$dFather_cust['bash_dest_father'][0];
			$dGrandpa_cust=get_post_custom($dGrandpa_id);
			$dGrandpa_en_name=$dGrandpa_cust['bash_dest_en_name'][0];
			$full_add.=', '.$b_D->cleanName($dGrandpa_en_name);
			}
	}
	else{ header('location:http://www.itla.org.il');}
?>


<!DOCTYPE html>

<html <?php language_attributes(); ?> class="css3transitions">
 <?
date_default_timezone_set('Europe/Nicosia');
//$script_tz = date_default_timezone_get();
 ?>
<head>
<? if ( is_user_logged_in() ) { ?>	 <?		 }	else{ ?><style> #menu-item-204{ display:none;}		</style>	 <? }?>
<script src="https://timezonedb.googlecode.com/files/timezonedb.js" type="text/javascript"></script> <!-- in bash-xtra -->
<?='<script src="'.$b_webPath.'bash-xtra/bash_img_ajax.js"></script>';?>

    <meta charset="<?php bloginfo( 'charset' ); ?>" />

    <?php  if (function_exists('themeple_favicon'))    { echo themeple_favicon(themeple_get_option('favicon')); } ?>

    <!-- Title -->

    <title> <?php bloginfo('name'); ?> | <?php is_home() ? bloginfo('description') : wp_title(''); ?></title>

    <!-- Responsive Meta -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> 

    <!-- Pingback URL -->
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->

	<!--[if lt IE 9]>

	<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>

	<![endif]-->

    <?php
    
    //Generated css from options
    include(THEMEPLE_BASE.'/template_inc/admin/register_styles.php'); 
    
    // Loaded all others styles and scripts.
    wp_head(); 	

    ?>

<?php 
// Google analytics
$google_analytics = themeple_get_option('googlecode');
echo $google_analytics;
 
if (is_page(3989)){ ?>
<!--<link rel="stylesheet" href="http://www.itla.org.il/bash-xtra/jq-ui.css">-->
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<? } ?>
<script src="https://maps.googleapis.com/maps/api/js"></script>
<script>
//BashrO ADD

function gmap_proce() {
	if (jQuery('#gmap_canvas').length) {
	var fullAddress='<?=$full_add?>';
	var dType='<?=$dType?>';
	if(dType=='0'){mapFocuse=3;}
	else if (dType=='1'){mapFocuse=6;}
	else if(dType=='2'){mapFocuse=10;}
	else{mapFocuse=9;}
	var geocoder;
	geocoder = new google.maps.Geocoder();
		geocoder.geocode( {'address' : fullAddress}, function(results, status) {
    		if (status == google.maps.GeocoderStatus.OK) {
			aziMe=String(results[0].geometry.location).replace('(','').replace(')','');
			aziMe=aziMe.split(',');
				if(dType>0){displayZone(Number(aziMe[0]),Number(aziMe[1]));}
			var gmapCanvas = document.getElementById('gmap_canvas');
				var gmapOptions = {
				center: new google.maps.LatLng(Number(aziMe[0]),Number(aziMe[1])),
				zoom: mapFocuse,
				mapTypeId: google.maps.MapTypeId.ROADMAP
				}
			var map = new google.maps.Map(gmapCanvas, gmapOptions);
		    }
		});
	}
}

jQuery(document).ready(function(){
gmap_proce();	
	<? if (is_page(3989)){ ?>	jQuery(function() {	jQuery("#robash_s_sD,#robash_s_fD").datepicker();	jQuery("#robash_s_execute").button();	}); <? } ?>

	//if(jQuery('#bash_display_the_res').length){startGenSearch('bash_display_the_res');}
	
/*	var bashS_ID=decodeURIComponent(jQuery.urlParam('bash_id'));
	var bashS_PP=decodeURIComponent(jQuery.urlParam('bash_pp'));	
	var bashS_ID=decodeURIComponent(jQuery.urlParam('bash_sD'));
	var bashS_ID=decodeURIComponent(jQuery.urlParam('bash_fD'));	
	var bashS_ID=decodeURIComponent(jQuery.urlParam('bash_type'));	
	var bashS_ID=decodeURIComponent(jQuery.urlParam('bash_ob'));			
	if(dID!='null'){alert(dID);}
*/	

	if(jQuery('#thumbGrid').length){jQuery("[data-thumbgrid]").thumbGrid();}
	if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
	
	
	cssURL_link='http://www.itla.org.il/bash-xtra/bashMobStyle.css';
	cssLink = $("<link rel='stylesheet' type='text/css' href='"+cssURL_link+"'>");
	$("head").append(cssLink);
	$("#gmap_canvas").prepend('<div id="showBigMap" onclick="fullMapMob(\'on\') ">הצג מפה</div>');
	$('#gmap_canvas div:last').hide();
	
		$( ".container" ).each(function( index ) {
		$(this).addClass('bashMob_marg_r');
		});
	}
	else{}
});

function get_s_array(){

}

function startGenSearch(tID){
$('#'+tID).html('תוצאת חיפוש');
}

function fullMapMob(dw){
	gMAP=$("#gmap_canvas").html();
	//fullWinMap
	
	txt='<div class="screenGray" style="z-index:100000" onclick="clearMe(\'fullWinMap\');" ></div><div class="afterPrceNote" id="afterPrceNote" style="z-index:100001"><br />'+ gMAP+'<input class="butUI" type="button" value="סגירה" id="closeButton" onclick="clearMe(\'mainNoteDiv\');" /></div>';

jQuery('#fullWinMap').html(txt);
jQuery('#fullWinMap').fadeIn(700);
	
}





	if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
	
	}

	
</script>



<link href='<?=$b_webPath?>bashStyle.css' rel='stylesheet' type='text/css' />

   <!-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>-->
</head>

<!-- End of Header -->

<body  <?php body_class(); ?>>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-55014437-1', 'auto');
  ga('send', 'pageview');

</script>
<input type="hidden" id="bash_clock_Key" value="<?=$clockTKey?>">
<input type="hidden" id="latlng2">
<?php get_template_part('template_inc/menu', 'sticky'); ?>
<!-- Used for boxed layout -->
    <?php  
        $layout = themeple_get_option('overall_layout'); 
        if(( $layout == 'boxed' && !isset($_COOKIE['themeple_layout'])) || (isset($_COOKIE['themeple_layout']) && $_COOKIE['themeple_layout'] == 'boxed' )) { 
    ?>
<!-- Boxed Layout Wrapper -->
<div class="boxed_layout">

    <?php }  ?>
    

    <!-- Start Top Navigation -->
    <?php if( (themeple_get_option('top_widget') == 'yes' && !isset($_COOKIE['themeple_top_widget'])) || (isset($_COOKIE['themeple_top_widget']) && $_COOKIE['themeple_top_widget'] == 'yes') ): ?>
    <div class="top_nav">
        
        <div class="container">
            <div class="row-fluid">
                <div class="span4">
                    <div class="pull-left">
                        <?php dynamic_sidebar( "Top Header Left" ); ?>
                    </div>
                </div>
                <div class="span8">
                    <div class="pull-right">
                        <?php dynamic_sidebar( "Top Header Right" ); ?>
                    </div>
                </div>
               
            </div>
        </div>

    </div>
    <?php endif; ?>

    <!-- End of Top Navigation -->

    

    <!-- Page Background used for background images -->
    <div id="page-bg"><?php $bg_your_img = themeple_get_option('bg_your_img'); if(isset($bg_your_img) && $bg_your_img != '' && ($bg_type=='fixed' || isset($_COOKIE['themeple_background']))) echo '<img src="'.$bg_your_img.'" alt="" />' ?></div>
    
    <?php $header_class = themeple_get_option('header_types');?>
    <?php if(isset($_COOKIE['themeple_header'])):
    	       $header_class = 'header_'.$_COOKIE['themeple_header'];
          endif; 
    ?>

    <!-- Header BEGIN -->
    <div  class="header_wrapper <?php echo $header_class ?>">
        <header id="header" class="">

            <div class="container">
        	   <div class="row-fluid">
                    <div class="span12" >
                        
                        <!-- Logo -->
                        <?php if(!isset($css_class)) $css_class=''; ?>
                        <div id="logo" class="<?php echo $css_class ?>">
                            <?php //echo themeple_logo() ?>
                            <a href="http://www.itla.org.il" title='הארגון הישראלי למדריכי טיולים בחו"ל'><img src="http://www.itla.org.il/wp-content/themes/fortis7/img/skins/blue/logo.png" alt="Israel Tour Leaders Association"></a>
                            <span class="logo_desc"><?php echo themeple_get_option('desc_logo') ?></span>   
                        </div>
                        <!-- #logo END -->
    			         
                         
                        <?php if($header_class == 'header_3'): ?>
                        <!-- Header 3 -->
                        <div class="pull-right header_right_widgetized">
                            <?php dynamic_sidebar('Header Right Widgetized'); ?>
                        </div>
                        <!-- Header 3 Right Widgetts -->
                        <?php endif; ?>
                         


                        <!-- Woocommerce Cart -->
                        <?php if(class_exists('Woocommerce')): ?>
                                    <?php get_template_part('template_inc/woocommerce','cart'); ?>
                        <?php endif; ?>
                        <!-- End Woocommerce Cart -->


                        <!-- Search -->

                        <?php $right_search = themeple_get_option('right_search');

                            if($right_search == 'yes'): ?>

                                <div class="header_search">
                                    <div class="right_search">
                                        <i class="moon-search-2"></i>
                                    </div>
                                    <div class="right_search_container"><?php get_search_form(); ?> </div> 
                                </div>
                            <?php endif; ?>
                        <!-- End Search-->


                        <!-- Show for all header expect header 4 -->
    			         <?php if($header_class != 'header_3' && $header_class != 'header_7' && $header_class != 'header_9' && $header_class != 'header_10'): ?>
            			         
                                 <div id="navigation" class="nav_top pull-right  <?php echo $css_class ?>">
                                    <nav>
                                    <?php 
                                            $args = array("theme_location" => "main", "container" => false, "fallback_cb" => 'themeple_fallback_menu');
                                            wp_nav_menu($args);  
                                    ?>
                                    </nav>
                                </div><!-- #navigation -->
    		    	     <a href="#" class="mobile_small_menu open"></a>
                                
                                <div id="cSearch_topDiv">
                                חיפוש יעד:
	                                <div style="display:inline-block">
    	                         <input style="margin-bottom:0;" type="text" autocomplete="off" class="fSearch" name="cSearch_goToDest" id="cSearch_goToDest" value="" placeholder="הקלידו את שם היעד ובחרו מהרשימה שתופיעה" onkeyup="bashSearch_global(this.id,'goToDest');"><br>
<div id="showMyLike_goToDest"></div>                                  
        	                        </div>
                                
                                
                                
                                </div>
                                
    			         <?php endif; ?>
                         <!-- End custom menu here -->
                    </div>
                </div>

                
              
            </div>
            

        </header>

         

        <?php if($header_class == 'header_3' || $header_class == 'header_7' || $header_class == 'header_9'): ?>
                            
                                 <div id="navigation" class="nav_top pull-right  <?php echo $css_class ?>">
                                    <div class="container"><div class="row-fluid"><div class="span12">
                                    <nav>
                                    <?php 
                                            $args = array("theme_location" => "main", "container" => false, "fallback_cb" => 'themeple_fallback_menu');
                                            wp_nav_menu($args);  
                                    ?>
                                    </nav>
                                </div></div></div></div><!-- #navigation -->
                         
                <?php endif; ?>
        <?php if(!(themeple_post_meta(themeple_get_post_id(), 'padding_slide') == 'yes' && themeple_post_meta(themeple_get_post_id(), 'section_or_no') == 'no') && themeple_get_option('header_shadow') != 'shadow_none' ): ?>
        <div class="header_shadow"><span class="<?php echo themeple_get_option('header_shadow'); ?>"></span></div>
        <?php endif; ?>
        <!-- Responsive Menu -->
        <?php get_template_part('template_inc/menu', 'small'); ?>
        <!-- End Responsive Menu -->
    </div>
    <div class="top_wrapper">
    <?php if(themeple_post_meta(themeple_get_post_id(), 'page_creative_bool') == 'yes' && themeple_post_meta(themeple_get_post_id(), 'page_header_bool') == 'no'): ?>
    <!-- CREATIVE HEADER START -->
    <div class="creative_header">
        <div class="container">
                <div class="row-fluid">
                    <div class="span6"><h1><?php echo themeple_post_meta(themeple_get_post_id(), 'page_creative_big') ?></h1></div>
                    <div class="span6"><p><?php echo themeple_post_meta(themeple_get_post_id(), 'page_creative_desc') ?></p></div>
                </div>
        </div>
    </div>
    <!-- CREATIVE HEADER END -->
    <?php endif; ?>
    <?php get_template_part('template_inc/sliders_output'); ?>

<!-- .header -->