
jQuery(function(){
        jQuery('ul.sf-menu').superfish();
});

function showLoginFailure(){
$('<div>Fehlendes Login. Sie m&uuml;ssen sich zuerst anmelden!</div>').dialog({
                        title: 'Fehler !'

                });
}

function showUpdateSuccess() {
$('<div>Die &Auml;nderungen wurden erfolgreich durchgef&uuml;hrt.</div>').dialog({
                        title: 'Hinweis'

                });
}

function showBestellSuccess() {
$('<div>Ihre Bestellung wurde erfolgreich durchgef&uuml;hrt.</div>').dialog({
                        title: 'Hinweis'

                });
}

function displayError(fehler) {
$('<div>'+fehler+'</div>').dialog({
                        title: 'Fehler'

                });
}
//$(function() {
//               $("#bootsverwaltung").tabs();
// });

$(document).ready(function(){
    var bootid=$('input:hidden[name=bootid]').val(); 
	var rand = Math.floor(Math.random()*9999999);
    $(".boot-thumbnail").live('click',function(e){
	var removeboot = this.value;
	$.ajax({
	    type: 'GET',
		url: '/?type=5000&removeboot='+removeboot+'&bootid='+bootid+'&md='+rand,
		success: function(result) {
			$('#boot-thumbnails').replaceWith(result);
			},
		});
		//alert(removeboot);
	});
});

$(document).ready(function() {
$(".tip").tooltip();
var bootid=$('input:hidden[name=bootid]').val(); 
	$("#uploadify").uploadify({
		'uploader'       : '/uploadify.swf',
		'script'         : '/uploadify.php',
		'simUploadLimit' : 20, 
		'cancelImg'      : 'cancel.png',
		'scriptData'     : {'bootid':bootid}, 
		'fileExt'		 : '*.jpg,*.png,*.gif,*.jpeg',
		'buttonText'	 : 'Neues Bild',
		'folder'         : 'uploads',
		'queueID'        : 'fileQueue',
		'auto'           : true,
		'multi'          : true
	});

	
});
 jQuery(function($){ 
         $.datepicker.regional['de'] = { 
                 clearText: 'löschen', clearStatus: 'aktuelles Datum löschen', 
                 closeText: 'schließen', closeStatus: 'ohne Änderungen schließen', 
                 prevText: '&#x3c;zurück', prevStatus: 'letzten Monat zeigen', 
                 prevBigText: '&#x3c;&#x3c;', prevBigStatus: '', 
                 nextText: 'Vor&#x3e;', nextStatus: 'nächsten Monat zeigen', 
                 nextBigText: '&#x3e;&#x3e;', nextBigStatus: '', 
                 currentText: 'heute', currentStatus: '', 
                 monthNames: ['Januar','Februar','März','April','Mai','Juni', 
                 'Juli','August','September','Oktober','November','Dezember'], 
                 monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun', 
                 'Jul','Aug','Sep','Okt','Nov','Dez'], 
                 monthStatus: 'anderen Monat anzeigen', yearStatus: 'anderes Jahr anzeigen', 
                 weekHeader: 'Wo', weekStatus: 'Woche des Monats', 
                 dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], 
                 dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], 
                 dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'], 
                 dayStatus: 'Setze DD als ersten Wochentag', dateStatus: 'Wähle D, M d', 
                 dateFormat: 'dd.mm.yy', firstDay: 1,  
                 initStatus: 'Wähle ein Datum', isRTL: false}; 
         $.datepicker.setDefaults($.datepicker.regional['de']); 
 }); 

$(function() {
		$("#reisebeginn").datepicker($.datepicker.regional['de']);
		$("#sperrzeitbeginn").datepicker($.datepicker.regional['de']);
		$("#sperrzeitende").datepicker($.datepicker.regional['de']);
	});
	
function showdelete() {
    var bootid=$('input:hidden[name=bootid]').val(); 
	var rand = Math.floor(Math.random()*9999999);
	var bootaction=$('input:hidden[name=bootaction]').val(); 
	$("#deleteboot-confirm").html('<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>Yacht inkl. aller Daten entfernen?</p>');
	$("#deleteboot-confirm").dialog({
		resizable: false,
		height:140,
		modal: true,
		buttons: {
			'Ja entfernen': function() {
				$(this).dialog('close');
				$.ajax({
					type: 'GET',
					url: '/?type=5000&bootaction='+bootaction+'&bootid='+bootid+'&md='+rand,
					success: function(result) {
			 			$("#boot-"+bootid).css('display','none');
			 			}
				});
									
			},
			'Nein cancel': function() {
				$(this).dialog('close');
			}
		}
	});
}
	
$(document).ready(function (){
		$('a.lightbox').lightBox();
});


