var NSMain=NSMain||{};NSMain.urbanKey='NSMainUrbanContainer';NSMain.countryKey='NSMainCountryContainer';NSMain.switchUrban=function(type)
{if(type=='2'||type==2){$('#urbanLeftContainer').show();$('#urbanRightContainer').hide();$(".index_ins_m").equalHeights();this.setToStorage(this.urbanKey,'2');}else{$('#urbanLeftContainer').hide();$('#urbanRightContainer').show();$(".index_ins_m").equalHeights();this.setToStorage(this.urbanKey,'1');}}
NSMain.switchCountry=function(type)
{if(type=='2'||type==2){$('#countryLeftContainer').show();$('#countryRightContainer').hide();$(".index_ins_m").equalHeights();this.setToStorage(this.countryKey,'2');}else{$('#countryLeftContainer').hide();$('#countryRightContainer').show();$(".index_ins_m").equalHeights();this.setToStorage(this.countryKey,'1');}}
NSMain.getFromStorage=function(key){return NSStorage.getFromStorage(key);}
NSMain.setToStorage=function(key,val){return NSStorage.setToStorage(key,val);}
$(function(){$(".index_ins_m").equalHeights();});$(window).resize(function(){$(".index_ins_m").equalHeights();});NSStorage.addInitCallback(function(){NSMain.switchUrban(NSMain.getFromStorage(NSMain.urbanKey));NSMain.switchCountry(NSMain.getFromStorage(NSMain.countryKey));NSRealtyStorage.loadSettlementViewParams();NSRealtyStorage.loadNewBuildingViewParams();});