﻿function Real_fixPNG(element)
{
  if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent))
  {
    var src;

    if (element.tagName=='IMG')
    {
      if (/\.png$/.test(element.src))
      {
        src = element.src;
        element.src = "/media/i/p.gif";
      }
    }
    else
    {
      src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);
      if (src)
      {
        src = src[1];
        element.runtimeStyle.backgroundImage="none";
      }
    }
    if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
  }
}

function SetContentHeightAfterResize()
{
	SetContentHeight();
}

function SetContentHeight()
{
    // Растягивает контент
    //var document_height = $(document).height();
    // Берем из CSS высоты FOOTERa и HEADERa
    //content_height = document_height - 500;
    //$("#content").css("height", content_height+"px");
}

$(document).ready(function() {
    //SetContentHeight();
	
	$(".imgb").css("opacity", "0.8");
	
	$(".imgb").mouseover( function () {
		$(this).css("opacity", "1");
	}).mouseout( function () {
		$(this).css("opacity", "0.8");
	});
	
	$(".m_selected").corner("8px");
	$("#missiya").corner();
	
});

function ShowHideMailMe() {
	now_top = $("#id_mail_me").css("top");
	now_top = now_top.replace("px", "");
	if (now_top < 0) {
		be_top = ($(window).height() - 402) / 2;
		$("#id_mail_me").animate({
			"top": be_top + "px",
		}, {
			queue: false,
			duration: 500
		}, function(){
		});
	}
	else {
		$("#id_mail_me").animate({
			"top": "-1000px",
		}, {
			queue: false,
			duration: 500
		}, function(){
		});
	} 
}

