$(document).ready(function () {

var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

if ((version >= 5.5) && (document.body.filters)) 
{
   for(var i=0; i<document.images.length; i++)
   {
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	  {
		 var imgID = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText 
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
		 var strNewHTML = "<span " + imgID + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
		 + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
		 img.outerHTML = strNewHTML
		 i = i-1
	  }
   }
}


	$('.tablePrices a').click(function(){
	    var room = $(this).parent().parent().find("td:first").text();
	    $(this).attr("title", "Nr. Rooms: "+room);
	});
	$(".tablePrices a").each(function(){
	    if($(this).attr("href")=="") $(this).hide();
	});
	$('div#big_img a').lightBox();
	$('div#my_center a').lightBox();
	$('.imgList a').lightBox();
	$('div#small_img a').removeAttr('href');

			/*if ($(this).hasClass("active") != true) {
			$("ul#search_menu ul.show").removeClass("show").addClass("close");
			$("ul#search_menu .active").removeClass("active");*/
cl = "";
	$("#leftmenu .fade").click(function() {
		$("#leftmenu .fade").removeClass("arrOp").addClass("arrCl");
		$(this).removeClass("arrCl").addClass("arrOp");
		$("#leftmenu ul").removeClass("opened").addClass("closed");
		$(this).siblings('ul').addClass("opened");
	});
	$("a.edit").removeAttr("href");
	$("a.edit").click(function() {
		$("div#change").css("display","none");
		$("a.edit").css("display","none");
		$("div.closed").removeClass("closed").addClass("opened");
	});
	$("div#small_img img").css("cursor:pointer");
	$("div#small_img div a").css("cursor:pointer");
	$("div#small_img div").click(function () {
		var id;
		id = $(this).attr('class');
		$("div.my_description div.opened").removeClass('opened').addClass('closed');
		$("div.my_description div." + id).removeClass('closed').addClass('opened');
		
		$("div#small_img a").removeClass('active');
		$("div." + id + " a").addClass('active');
		$("div#big_img img.opened").removeClass("opened").addClass("closed");
		$("div#big_img img#" + id).removeClass("closed").addClass("opened");
	});
	
		var id;
		id = $("form select[name='block']").attr('value');
		$("form#horikus div.showen").removeClass('showen').addClass('hidden');
		$("form#horikus div." + id).removeClass('hidden').addClass('showen');
		
	$("form#horikus select[name='block']").change(function() {
		var id;
		id = $(this).attr('value');
		$("form div.showen").removeClass('showen').addClass('hidden');
		$("form div." + id).removeClass('hidden').addClass('showen');
	});



			
		


});
var form="";
$(document).ready(function(){
$(".tablePrices tr").bind("mouseenter mouseleave", function(e){
        $(this).toggleClass("TRover");
    });


$(".tablePrices tr:even").css("background-color", "#EEE");
$(".tablePrices tr:first").css("background-color", "transparent");
$(".tablePrices tr:has(b)").css("background-color", "transparent");
	$("#change .partnerList a").each(function(){
		$($(this).attr("href")).hide();
	});
	$("#change .partnerList a").click(function(){
		$("#change .partnerList a").each(function(){
			$(this).css("color", "#FFF");
			$($(this).attr("href")).hide();
		});
		$(this).css("color", "#CCC");
		$($(this).attr("href")).show().css("clear", "both");
		return false;
	});	
	$("#REHAU").show().css("clear", "both");
$(".btnSubmit").click(function(){
   id = $("input[@name='poll']:checked").attr("value");
   $.post("/survey/ru/", { poll:id },
   function(data){
     $("#tmp").html($(".vote").html());
     $(".vote").html(data);
   });
   return false;
});

$(".results").click(function(){
   $.post("/survey/ru/",
   function(data){
     $("#tmp").html($(".vote").html());
     $(".vote").html(data);
   });
   return false;
});

$(".returnVote").click(function(){
     $(".vote").html($("#tmp").html());
return false;
});

$(".lb").find("a").lightBox();
$("area").click(function(){return false;});
});
