<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
	<title><?php wp_title() ?></title>
	<?php global $template; $template_directory = get_bloginfo('template_directory'); ?>
	<link href="<?php bloginfo('stylesheet_url') ?>?v=3" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $template_directory ?>/styles/default.css" />

    <?php wp_head(); ?>
	
	<script type="text/javascript" src="<?php echo $template_directory ?>/js/jquery.min.js"></script>
    
       
    
	<script type="text/javascript">
		 
		
		$(function(){
			$(".widget_recent_entries li:even").addClass("even");
	  		$(".table-price tbody tr:odd").addClass("odd");
			 
		});
		 
 
	 
	
	 
 </script>
<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-45274267-1', 'auto');
  ga('send', 'pageview');

</script>
	</script>
	<link rel="stylesheet" type="text/css" href="<?php echo $template_directory ?>/css/wi-theme/jquery-ui-1.8.9.custom.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo $template_directory ?>/css/ui.selectmenu.css" />
	<script type="text/javascript" language="javascript" src="<?php echo $template_directory ?>/js/jquery-ui-1.8.9.custom.min.js"></script>
	<script type="text/javascript" language="javascript" src="<?php echo $template_directory ?>/js/ui.selectmenu.js"></script>
	<script type="text/javascript" language="javascript" src="<?php echo $template_directory ?>/js/styled.selectmenu.js"></script>
	<script type="text/javascript" src="<?php echo $template_directory ?>/js/slides.jquery.js"></script>
	<link rel="stylesheet" href="<?php echo $template_directory ?>/css/prettyPhoto.css" type="text/css" media="screen" charset="utf-8" />
    
  

	<script src="<?php echo $template_directory ?>/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript" charset="utf-8">
			$(document).ready(function(){
				$("a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'slow', slideshow:3000, autoplay_slideshow: true});
			});
	</script>
	<link rel="stylesheet" type="text/css" href="<?php echo $template_directory ?>/css/slides.css" />
	<script type="text/javascript">
			$(function(){
				$('#slides').slides({
					width: 960,
					height: 379,
					preload: true,
					preloadImage: '<?php echo $template_directory ?>/images/loading.gif',
					play: 5000,
					pause: 2500,
					effect: 'fade, fade',
					hoverPause: true,
					animationStart: function(){
						$('.caption').animate({
							bottom:-96
						},100);
					},
					animationComplete: function(current){
						$('.caption').animate({
							bottom:0
						},200);
					}
				});
				
			});
	</script>
	
	<script type="text/javascript" language="javascript" src="<?php echo $template_directory ?>/js/jcarousellite_1.3.min.js"></script>
	<script type="text/javascript" language="javascript" src="<?php echo $template_directory ?>/js/jquery.easing.1.3.js"></script>
	<script type="text/javascript" language="javascript" src="<?php echo $template_directory ?>/js/custom.js"></script>
	<script type="text/javascript" language="javascript" src="<?php echo $template_directory ?>/js/general.js"></script>
	
	<script type="text/javascript" language="javascript" src="<?php echo $template_directory ?>/js/jquery.nivo.slider.js"></script>
	<script type="text/javascript" src="<?php echo $template_directory ?>/js/anythingSlider.js"></script>
	<script type="text/javascript" charset="utf-8">
	$(document).ready(function(){

    	$('.slideshow').anythingSlider({
    	        easing: "easeInOutExpo",
    	        autoPlay: false,
    	        startStopped: false,
    	        animationTime: 600,
    	        hashTags: false,
    	        buildNavigation: true,
    	        buildArrows: false,
    			pauseOnHover: true,
    			startText: "Go",
    	        stopText: "Stop"
    	    });
    	 
	});

		
		$(document).ready(function() {
			$(".minigallery").jCarouselLite({
				btnNext: ".next",
				btnPrev: ".prev",
				scroll: 2,
				<?php if ($template=='full_width')  { ?>
				visible: 6,
				<?php } else { ?>
				visible: 4,
				<?php } ?>
				speed: 400,
				mouseWheel: true,
				circular:false,
				easing: "easeInOutCubic"
			});
		
			$(".minigallery a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook',overlay_gallery: false});
		});
	</script>
	

    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php if ( get_option(PREFIX.'_feedburner_url') <> "" ) { echo get_option(PREFIX.'_feedburner_url'); } else { echo get_bloginfo_rss('rss2_url'); } ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

</head>
<body>
<div class="head">
  <div class="container">
  	<div class="logo"><a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('description'); ?>"><?php $logo = get_option(PREFIX.'_logo');  if ( $logo == '' ) { $logo = $template_directory . '/images/Sokha-Angkor-logo.png'; } ?><img src="<?php echo $logo ?>" alt="<?php bloginfo('name'); ?>" /></a></div>                                                                                                        
	<div class="head_right">
	<?php 
		$header_shortcodes = html_entity_decode(get_option(PREFIX.'_header_shortcodes'), ENT_QUOTES, 'UTF-8'); 
		echo $header_shortcodes = apply_filters('themefuse_shortcodes',$header_shortcodes);
	?>
	</div>
  </div>
</div>
<!-- topmenu -->
<?php
function retrieveYahooWeather($zipCode="cbxx0001") {
    $yahooUrl = "http://weather.yahooapis.com/forecastrss";
    $yahooZip = "?p=$zipCode&u=c";
    //$yahooFullUrl="http://xml.weather.yahoo.com/forecastrss/cbxx0001_f.xml";
    $yahooFullUrl="http://xml.weather.yahoo.com/forecastrss/cbxx0001_c.xml";
    $curlObject = curl_init();
    curl_setopt($curlObject,CURLOPT_URL,$yahooFullUrl);
    curl_setopt($curlObject,CURLOPT_HEADER,false);
    curl_setopt($curlObject,CURLOPT_RETURNTRANSFER,true);
    $returnYahooWeather = curl_exec($curlObject);
    curl_close($curlObject);
    return $returnYahooWeather;
}
$localZipCode = "cbxx0001"; // Clearfield, UT
$weatherXmlString = retrieveYahooWeather($localZipCode);
$weatherXmlObject = new SimpleXMLElement($weatherXmlString);
$currentCondition = $weatherXmlObject->xpath("//yweather:condition");
$currentTemperature = $currentCondition[0]["temp"];
$currentDescription = $currentCondition[0]["text"];

$data = $weatherXmlObject->xpath("//yweather:forecast");


?>
<div class="menu-header">
  <div class="container">
	<?php include( THEME_MODULES . '/page-nav.php' ); ?>
     <!--<div style="position:absolute;width:50px;left:905px;top:10px;color:#ff0066;"><?=$currentTemperature;?>&deg;C &nbsp;&nbsp;</div>-->
     <!--<div style="position:absolute;width:50px;left:915px;top:0px;color:#ff0066;"><img src="<?=$template_directory;?>/images/Red-Santa-Claus-hat.png" /></div>-->
  </div>
  

</div>

<div style="position:relative;z-index:99;top:381px;background:#F9F9F9;width:962px;margin:0 auto;">
<table border="0" cellpadding="0" cellspacing="0" width="960">
    <tbody>
        <tr>
            
            <td><label>Arrival</label></td>
            <td><input style="background:#f3f0f0" type="text" name="date_of_arrival" id="date_of_arrival" class="date-picker" value="<?php echo date('Y-m-d'); ?>" /></td>
            <td><label>Departure</label></td>
            <td>
				<?php $date = strtotime(date("Y-m-d", strtotime(date("Y-m-d"))) . " +3 day") ?>
                <input style="background:#f3f0f0" type="text" name="date_of_departure" id="date_of_departure" class="date-picker" value="<?php echo date('Y-m-d',$date); ?>" /></td>
            <td><label>Adults</label></td>
            <td>
                <select style="border: 0 none;height: 22px;padding: 2px 3px;text-align: center;width: 63px;background:#f3f0f0" name="number_of_aldult" id="number_of_aldult" class="cbo-adult">
                    <!--<option value="0">0</option>-->
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                </select>
            </td>
            <td><label>Children</label></td>
            <td>
                <select style="border: 0 none;height: 22px;padding: 2px 3px;text-align: center;width: 63px;background:#f3f0f0" name="number_of_kid" id="number_of_kid" >
                    <option value="0">0</option>
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                </select>
            </td>
           
            <td class="last-child">
                <input style="background:none;width:154px;" type="button" name="btn_check_avialability" id="btn_check_avialability" value="Check Availability" class="btn-check-availability" onclick="checkAvailable()" />
            </td>
        </tr>
    </tbody>
</table>
</div>  
       
<script type="text/javascript">
		$("#date_of_arrival").datepicker({
			minDate: 2,			
			dateFormat: 'yy-mm-dd',
	        numberOfMonths: 1,
	        onSelect: function(selected) {
				
		var d = $.datepicker.parseDate('yy-mm-dd', $("#date_of_arrival").val());
			 
             d.setDate(d.getDate() + 3);
			
             $("#date_of_departure").val($.datepicker.formatDate('yy-mm-dd', d));
				
	          //$("#date_of_departure").datepicker("option","minDate", selected)
	        }
	    });
	    $("#date_of_departure").datepicker({
			minDate: 1,
			dateFormat: 'yy-mm-dd',
	        numberOfMonths: 1,
	        onSelect: function(selected) {
	           $("#date_of_arrival").datepicker("option","maxDate", selected)
	        }
	    });
		
	function checkAvailable(){
	if($('#date_of_arrival').val() == "" && $('#date_of_departure').val() == ""){
		$('#date_of_arrival').addClass('outline-required');
		$('#date_of_departure').addClass('outline-required');
		//$('#date_of_arrival').focus();
	}else if($('#date_of_arrival').val() != "" && $('#date_of_departure').val() == ""){
		$('#date_of_arrival').removeClass('outline-required');
		$('#date_of_departure').addClass('outline-required');
		//$('#date_of_departure').focus();		
	}else if($('#date_of_arrival').val() == "" && $('#date_of_departure').val() != ""){
		$('#date_of_arrival').addClass('outline-required');
		$('#date_of_departure').removeClass('outline-required');
		//$('#date_of_departure').focus();		
	}else{
		$('#date_of_arrival').removeClass('outline-required');
		$('#date_of_departure').removeClass('outline-required');
		var url;
		var arrivaldate = $('#date_of_arrival').val();
		var departuredate = $('#date_of_departure').val();
		var children = $('#number_of_kid').val();
		var adult = $('#number_of_aldult').val();
		
		var promotionCode = "";
		
		url = 'https://www.yourreservation.net/tb3/index.cfm?bf=HAREPSAN' + '&arrivaldate=' + arrivaldate + '&departuredate=' +
			departuredate + '&adults=' + adult + "&children=" + children ;			 		 
		window.open(url,'_blank'); 
		 
	}
}
</script>
<!--/ topmenu -->
