$(document).ready(function(){
$("#content_icon").css("background","url(img/site_bg.png)");
function loading(){
 $("div.content_icon").html('<span class="loading_icon"><img src="img/loading.gif"/></span>');	
};

navigation();
$("div#menu_top div").hover(
      function () {
		var nazva = $(this).attr("id");
        $(this).css("background","url(img/folio_"+nazva+"1.png)");
      }, 
      function () {
		var nazva = $(this).attr("id");
        $(this).css("background","url(img/folio_"+nazva+".png)");
      }
	  );
$("div#menu_top div#site").click(
      function () {
		var nazva = $(this).attr("id");
		$("#content_icon").css("background","url(img/"+nazva+"_bg.png)");
		$("#content_icon").html("<div id=img1><img src=img/"+nazva+"/img1.png /></div> <div id=img2><img src=img/"+nazva+"/img2.png /></div> <div id=img3><img src=img/"+nazva+"/img3.png /></div> <div id=img4><img src=img/"+nazva+"/img4.png /></div> <div class='more'></div>");
		navigation();
		});
$("div#menu_top div#flash").click(
      function () {
		$("#content_icon").html('<div style="margin-left:10px; margin-top:160px;" align="center"><img src="img/logo_serv.png" width="200" height="68"/></br><div style="font-size: 16px; color: red; font-family: Verdana, Geneva, sans-serif  ">&#1053;&#1072;&#1087;&#1086;&#1083;&#1085;&#1103;&#1077;&#1090;&#1089;&#1103;...</div></div>');
		});
$("div#menu_top div#max").click(
      function () {
		$("#content_icon").html('<div style="margin-left:10px; margin-top:160px;" align="center"><img src="img/logo_serv.png" width="200" height="68"/></br><div style="font-size: 16px; color: red; font-family: Verdana, Geneva, sans-serif  ">&#1053;&#1072;&#1087;&#1086;&#1083;&#1085;&#1103;&#1077;&#1090;&#1089;&#1103;...</div></div>');
		});
		function navigation(){
$('#content_icon img').hover(
			  function(){
				  $(this).animate({height: '+=2', width: '+=2'}, "fast");
			  }, function(){
				  $(this).animate({height: '-=2', width: '-=2'}, "fast");
			  });
$("div.more").hover(
			  function () {
				  $("div.more").css("background", "url(img/more_hov.png)");
			  },
			  function () {
				  $("div.more").css("background", "url(img/more.png)");
			  }	 
									 );
$("div.more").click(
	function(){
	$("div#img1 img").attr('src', 'img/site/img5.png');
	$("div#img1").attr('id', 'img5');
	$("div#img2 img").attr('src', 'img/site/img6.png');
	$("div#img2").attr('id', 'img6');
	$("div#img3 img").attr('src', 'img/site/img7.png');
	$("div#img3").attr('id', 'img7');
	$("div#img4 img").attr('src', 'img/site/img8.png');
	$("div#img4").attr('id', 'img8');
	});
	$('#content_icon img').click(
    function(){
	var big = $(this).parents('div').attr('id');
	var way = $(this).attr('src');
	var way1 = $(this).attr('src');
	way = way.slice(0, -8);
	way1 = way1.slice(4, -9);
	$("div#content").html("<div align = center></div><img src="+way+big+"_big.jpg />");
	var big1 = big+'_'
	$("div#content div").load('folio_'+way1+'.html #'+big1);
	});

	};
});

















