var w3c = false;
var ie = false;
var ns = false;
var sa = false;
if (document.getElementById) {
	var w3c = true;
}
if (document.all) {
	var ie = true;
}
if (document.layers) {
	var ns = true;
}
if ((navigator.userAgent).indexOf("Safari")!=-1) {
	var sa = true;
}

//self-submitting select
function selectBrowse(frameName,formName,selectName) {
	var temp = "document." + formName + "." + selectName + ".options[document." + formName + "." + selectName + ".options.selectedIndex].value";
	if (eval (temp) != "do_nothing") {
		if (frameName=="") {
			location.href = eval (temp);
		} else if (frameName=="new") {
			window.open(eval (temp))
		} else {
			temp = frameName + ".location.href = " + temp;
			eval (temp);
		}
	}
}


$(function() {
	
	
	$( ".datepicker" ).datepicker({});
	
	if ($('#poz')[0]) {
			$('#poz .accordionButton').toggle(function () {
					$(this).next('.accordionContent').slideDown();
			},
			function () {
					$(this).next('.accordionContent').slideUp();
			});
	}
	if ($('#wyjazdy')[0]) {
			$('#wyjazdy .accordionButton').toggle(function () {
					$(this).next('.accordionContent').slideDown();
			},
			function () {
					$(this).next('.accordionContent').slideUp();
			});
	}
	
	$("#cloudclick").click(function () {$("#linkcloud").addClass("linkcloudshow");}).mouseout(function () {$("#linkcloud").removeClass("linkcloudshow");});

	$(".scrollable").scrollable({circular: true, mousewheel: true}).autoscroll({ autoplay: false });	
	$("#wyjazdy .accordionButton").click(function(){
		$(this).text($(this).text() == 'Pokaż szczegóły' ? 'Ukryj szczegóły' : 'Pokaż szczegóły');
		
	
	});	
	
	$("#panoshow").click(function() {
		var src = "http://www.panocity.pl/player/panocity_wycieczka_start.php?id=0-22 ";
		$.modal('<iframe src="' + src + '" height="660" width="900" style="border:0">', {
			//closeHTML:"",
			containerCss:{
				height:660,
				padding:0,
				width:900
			},
			//overlayClose:true
		});
		
	});
	
	//$("#aktualnosci_padding")
});



