
$.ajaxSetup({
  timeout: 3000,
  cache:true
});

function inithistory()
{
$("a[@rel='history']").click(function(){
			            var hash = this.href;
			            hash = hash.replace(/^.*#/, '');
			     		$.history.load(hash);
			            return false;
		                    });	
}
	
	
function vewCategory(CategoryID)
{

if(CategoryID==1) title="Градостроительство";
if(CategoryID==2) title="Жилые";
if(CategoryID==3) title="Общественные";
if(CategoryID==4) title="Промышленные";
if(CategoryID==5) title="Интерьер";
if(CategoryID==6) title="Дизайн";

$.ajax({
   type: "POST",
   url: "/moduls/osn_content.php",
   data: {vewCategory:CategoryID},
   success: function(responce){
						if(responce)
						{
						
						$("#load").html(responce);
						$(".title").html(title);
						img_effect();

						
						
						}
   }
  
 });
 
}	
	
	
	
function vewItems(CategoryID)
{
//$("#spinner").show();	 
$.ajax({
   type: "POST",
   url: "/moduls/osn_content.php",
   data: {vewAllItems:CategoryID},
   success: function(responce){
						if(responce)
						{
						
						$("#items").html(responce);
						$(".title").html($('#item'+CategoryID).text());
						img_effect();
						}
   }
  
 });
}

function vewFotos(ItemID)
{
//$("#spinner").show();	 
$.ajax({
   type: "POST",
   url: "/moduls/osn_content.php",
   data: {vewAllFotoFromItem:ItemID},
   success: function(responce){
						if(responce)
						{
						
						$("#fotos").html(responce);
						
						}
   }
  
 });
}

function vewBuild()
{
$.ajax({
   type: "POST",
   url: "/moduls/osn_content.php",
   data: {vewBuilds:1},
   success: function(responce){
						if(responce)
						{
						$("#load").html(responce);
						$(".title").html($('#build').attr('ALT'));
						//$(".back").attr('href','\/\#build');
						}
   }
  
 });
}


function vewArchive(god)
{
$.ajax({
   type: "POST",
   url: "/moduls/osn_content.php",
   data: {archive:god},
   success: function(responce){
						if(responce)
						{
						$("#load").html(responce);
						$(".title").html($('#archive').attr('ALT'));
						inithistory();
						
						}
   }
  
 });
}

function vewNews(page)
{
$.ajax({
   type: "POST",
   url: "/moduls/osn_content.php",
   data: {news:page},
   success: function(responce){
						if(responce)
						{
						$("#load").html(responce);
						$(".title").html($('#news').attr('ALT'));
						
						}
   }
  
 });
}

function vewPublications(page)
{
$.ajax({
   type: "POST",
   url: "/moduls/osn_content.php",
   data: {publications:page},
   success: function(responce){
						if(responce)
						{
						$("#load").html(responce);
						$(".title").html($('#publications').attr('ALT'));
						
						}
   }
  
 });
}

function vewStatik(idpage)
{
$.ajax({
   type: "POST",
   url: "/moduls/osn_content.php",
   data: {Statik:idpage},
   success: function(responce){
						if(responce)
						{
						$("#load").html(responce);
											
						}
   }
  
 });
}

function vewLinks()
{
$.ajax({
   type: "POST",
   url: "/moduls/osn_content.php",
   data: {links:1},
   success: function(responce){
						if(responce)
						{
						$("#load").html(responce);
						$(".title").html($('#links').attr('ALT'));
						
						}
   }
  
 });

}

function selNews(newsID)
{
$.ajax({
   type: "POST",
   url: "/moduls/osn_content.php",
   data: {doselNews:newsID},
   success: function(responce){
						if(responce)
						{
						$("#load").html(responce);
												
						}
   }
  
 });

}


function img_effect()
{
  

  $(".tumbnailmini").css({ opacity: 0.8});
  $(".tumbnailmini").hover(
  function () {$(this).animate({opacity: 1}, 150 ); },
  function () {$(this).animate({opacity: 0.8}, 150 );}
  );
  
 
  
}

	
	


	
	
	
	
