 $(document).ready(function(){
  //***MAP funcs***
  $('#tempton_map_ext').addClass('hidden');
  
  //**show/hide map container funcs
  $('.open_map').live( "click", function() {
     $('#tempton_map_ext').fadeIn(1000);
     $('html, body').animate({scrollTop:0}, 'slow');
       return false;
  });
  $('.close_map').live( "click", function() {
     $('#tempton_map_ext').fadeOut(500);
  });
  $('[title]').removeAttr('title');
   
   
  //alert("$.cookie('fontSize'); > " + $.cookie("fontSize"));
   
  var fontSizeCookieValue = $.cookie("fontSize");
  //alert("fontSizeCookieValue" + fontSizeCookieValue);
	
  var fontSizeValue = fontSizeCookieValue*1.454545454546;
  //alert("fontSizeValue" + fontSizeValue);




  $("#content").css("font-size", fontSizeCookieValue + "%");
  
  if ($(".atta.two")) {
	  	$(".atta.two").css("display", "none");
	  	$(".atta.three").css("display", "none");
	  	$(".atta.four").css("display", "none");
	  	
	  	$('.atta.ext.one').live("click", function(){
	  		$(".atta.two").slideDown();
	  		$('.atta.ext.one').fadeOut();
	  	});
	  	$('.atta.ext.two').live("click", function(){
	  		$(".atta.three").slideDown();
	  		$('.atta.ext.two').fadeOut();
	  	});
	  	$('.atta.ext.three').live("click", function(){
	  		$(".atta.four").slideDown();
	  		$('.atta.ext.three').fadeOut();
	  	});
  }
 
 });

  //**show address blocks
  $('.address_link').live( "click", function() {
    var address_rel = $(this).attr('rel');
    $('.address_item').addClass('hidden').removeAttr('style');
    $('.address_block_item').addClass('hidden').removeAttr('style');
    $('#' + address_rel).fadeIn(500);
  });
  
  //**show address items
  $('.address_header ul li a').live( "click", function() {
    var business_rel = $(this).attr('rel');
    var wrappa = $(this).closest('.address_block_item');
    
    $(wrappa).children(".address_item").addClass('hidden').removeAttr('style');
    $(wrappa).children("div." + business_rel).fadeIn(500);
  });
  
$(window).resize(function() {
  $('body').width($(window).width());
});

