<?php echo $meta ?> 
<!--
Copyright (C) WebIndexer 2014 - <?php echo $year ?>. All Rights Reserved
Unauthorized copying, sharing, adaptation, source code changing, publishing, commercial usage, and/or distribution of this software, its parts, derivatives and/or successors, via any medium, is strictly prohibited.
Proprietary and confidential

Credits
Thanks for their excellent applications which are used in this CMS:
For the images enlarge www.highslide.com  https://mit-license.org
For the html editor https://www.tinymce.com/
For the color picker http://jscolor.com
-->
<link type="text/css" rel="stylesheet" href="styles.css">
<style type="text/css">
<?php echo $webadmincss ?>
</style>
<script src="js/jquery.js"></script>
<script src="js/jscolor.js"></script>
<script src="../sf/highslide/highslide-full.min.js"></script>
<link type="text/css" rel="stylesheet" href="../sf/highslide/highslide.css">
<link type="text/css" rel="stylesheet" href="../sf/calendar/jquery-ui.css">
<?php if ($editor>0) { ?>
<script src="tinymce/tinymce.min.js"></script>
<?php }?>

<script> 

$(document).ready(function(){
	
<!--toggle -->	
$("div.trigger").click(function(){
$(this).next(".toggle-container").slideToggle("slow");
});

$("div.navimenu").click(function(){
$(this).next(".navicontainer").slideToggle("slow");
});

<!--update priority -->

<!--item -->
	$(function() {
		$("#contentlistingitem ul").sortable({ opacity: 0.6, cursor: 'move', update: function() {
			var order = $(this).sortable("serialize") + '&action=updatelisting'; 
			$.post("updatepriorityitem.php", order, function(theResponse){
			}); 															 
		}								  
		});
	});
	
<!--photo -->
	$(function() {
		$("#contentlisting ul").sortable({ opacity: 0.6, cursor: 'move', update: function() {
			var order = $(this).sortable("serialize") + '&action=updatelisting'; 
			$.post("updatepriority.php", order, function(theResponse){
			}); 															 
		}								  
		});
	});
	
<!--lang -->
	$(function() {
		$("#contentlistinglang ul").sortable({ opacity: 0.6, cursor: 'move', update: function() {
			var order = $(this).sortable("serialize") + '&action=updatelisting'; 
			$.post("updateprioritylang.php", order, function(theResponse){
			}); 															 
		}								  
		});
	});

<!--end update priority -->

});

<!--calendar -->
 function onSelectCheckIn(selectedDate){
    var date = jQuery.datepicker.parseDate(
        jQuery(this).data("datepicker").settings.dateFormat ||
            jQuery.datepicker._defaults.dateFormat,
            selectedDate, jQuery(this).data("datepicker").settings
    );
    date = new Date(date.getFullYear(),date.getMonth(),date.getDate()+1);
    //document.title = date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();
    var maxdate = new Date(date.getFullYear(),date.getMonth(),date.getDate()+360);
    jQuery("#date1b").datepicker("option","minDate",date);
    jQuery("#date1b").datepicker("option","maxDate",maxdate);
    var cyear = date.getFullYear();
    var cmonth = date.getMonth()+1;
    var cday = date.getDate();
    if(cmonth<10){
        cmonth = "0"+cmonth;
    }
    if(cday<10){
        cday = "0"+cday;
    }
    setTimeout(function(){document.getElementById("date1b").value=cday+"-"+cmonth+"-"+cyear;},250);
    //document.title = year+"-"+month+"-"+day;
}
<!--calendar booking-->
 function onSelectCheckIn1(selectedDate){
    var date = jQuery.datepicker.parseDate(
        jQuery(this).data("datepicker").settings.dateFormat ||
            jQuery.datepicker._defaults.dateFormat,
            selectedDate, jQuery(this).data("datepicker").settings
    );
    date = new Date(date.getFullYear(),date.getMonth(),date.getDate()+1);
    //document.title = date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();
    var maxdate = new Date(date.getFullYear(),date.getMonth(),date.getDate()+360);
    jQuery("#date2b").datepicker("option","minDate",date);
    jQuery("#date2b").datepicker("option","maxDate",maxdate);
    var cyear = date.getFullYear();
    var cmonth = date.getMonth()+1;
    var cday = date.getDate();
    if(cmonth<10){
        cmonth = "0"+cmonth;
    }
    if(cday<10){
        cday = "0"+cday;
    }
    setTimeout(function(){document.getElementById("date2b").value=cday+"-"+cmonth+"-"+cyear;},250);
    //document.title = year+"-"+month+"-"+day;
}

 jQuery(document).ready(function(){
     var d = new Date();
     var curr_year = d.getFullYear();
     var curr_month = d.getMonth();
     var curr_day = d.getDate();
     jQuery("#date1").datepicker({
            onSelect:onSelectCheckIn,
            showOtherMonths: true,
            selectOtherMonths: true,
            numberOfMonths: 2,
            minDate: new Date(curr_year, curr_month, curr_day+1),
            dateFormat: 'dd-mm-yy'
        });

     jQuery("#date1b").datepicker({
        showOtherMonths: true,
        selectOtherMonths: true,
        numberOfMonths: 2,
        minDate: new Date(curr_year, curr_month, curr_day+2),
        dateFormat: 'dd-mm-yy',
    })

	jQuery("#date2").datepicker({
            onSelect:onSelectCheckIn1,
            showOtherMonths: true,
            selectOtherMonths: true,
            numberOfMonths: 2,
            minDate: new Date(curr_year, curr_month, curr_day+1),
            dateFormat: 'dd-mm-yy'
        });

     jQuery("#date2b").datepicker({
        showOtherMonths: true,
        selectOtherMonths: true,
        numberOfMonths: 2,
        minDate: new Date(curr_year, curr_month, curr_day+2),
        dateFormat: 'dd-mm-yy',
    })

});


<!--highslide -->
	hs.graphicsDir = '../sf/highslide/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.wrapperClassName = 'dark borderless floating-caption';
	hs.fadeInOut = true;
	hs.dimmingOpacity = .90;

	// Add the controlbar
	if (hs.addSlideshow) hs.addSlideshow({
		//slideshowGroup: 'group1',
		interval: 5000,
		repeat: false,
		useControls: true,
		fixedControls: 'fit',
		overlayOptions: {
			opacity: .6,
			position: 'bottom center',
			hideOnMouseOut: true
		}
	});
	

<!--EDITOR -->
<?php if ($editor>0) { ?>
tinymce.init({
	entity_encoding : "raw",
	mode : "specific_textareas",
    editor_selector : "mceEditor",
	extended_valid_elements: "[class],div[*],span[*]",   
	forced_root_block: false,
	force_p_newlines: true,
	browser_spellcheck: true,
	paste_as_text: true,
    theme: "modern",
    width: "100%",
    height: 200,
	content_css: ["../sf/editor.css", "../sf/font-awesome.min.css"],
    plugins: [
         "advlist autolink link image lists charmap print preview hr anchor pagebreak",
         "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
         "save table contextmenu directionality emoticons template paste textcolor fontawesome"
   ],
   toolbar: "insertfile undo redo | styleselect | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons fontawesome", 
   style_formats: [
        {title: 'Titles', inline: 'span', classes: 'titles'},
		{title: 'Example 1', inline: 'span', classes: 'example1'},
        {title: 'Example 2', inline: 'span', classes: 'example2'},
		{title: 'Example 2 color1', inline: 'span', classes: 'example2a'},
		{title: 'Example 2 italic', inline: 'span', classes: 'example2b'},
        {title: 'Example 3 color1', inline: 'span', classes: 'example3'},
		{title: 'Example 3 color3', inline: 'span', classes: 'example3b'},
		{title: 'Example 4', inline: 'span', classes: 'example4a'},
		{title: 'Example 4 color1', inline: 'span', classes: 'example4'},
		{title: 'Example 5', inline: 'span', classes: 'example5'},
		{title: 'Color 1', inline: 'span', classes: 'color1'},
		{title: 'Color 2', inline: 'span', classes: 'color2'},
		{title: 'Color 3', inline: 'span', classes: 'color3'},
    ]
 });
<?php } ?>

</script>
