

$(document).ready(function(){
/* var:
initialWidth - each block has its own, pre-defined in css
expandedWidth - same for all blocks, pre-defined in js
collapsedWidth - same for all blocks, pre-defined in js

initialHeight - each block has its own, pre-calculated
expandedHeight - each block has its own, pre-defined in js
collapsedHeight - each block has its own, calculated on the fly

initialMarginTop - each block has its own, pre-defined in css
displayMarginTop - each block has its own, pre-defined in js

*/

  var expandedWidth = 820; /**** need to set ****/
  var collapsedWidth = 53; /**** need to set ****/
  var displayMarginTopOffset_about = 50;
  var displayMarginTopOffset_services = 0;
  var displayMarginTopOffset_portals = 80;

  function block(blockName, expandedHeight, displayMarginTop) {
    this.blockName = blockName;
    this.jqueryObject = $('#' + this.blockName);
    this.initialMarginTop =  parseInt(this.jqueryObject.css('marginTop'));
    this.initialWidth = this.jqueryObject.width();
    this.initialHeight = $('#content').height() - this.initialMarginTop - 18;
    this.expandedHeight = expandedHeight;
    this.displayMarginTop = displayMarginTop;

    this.jqueryObject.height(this.initialHeight);

    this.resetPosition = function(){
      this.jqueryObject.animate({width: this.initialWidth, height: this.initialHeight, marginTop: this.initialMarginTop}, 200, function(){
        if(!$('#background img.base').hasClass('active'))
          backgroundSwitch('base');
      }).removeClass('expanded').removeClass('collapsed').children('.sectionContent').hide().siblings('.sectionOverview').show();
    }
  }

  /* BOD */
   $('#directors .content div').click(function(){ var director = 
  $(this).attr('class'); $(director).show('fast').siblings().hide('fast'); }); 
  });
  

/* Project for rent*/
		$(function () {
			var tabContainers = $('#main_tabNavigation div.propertyContent');
			tabContainers.hide().filter(':first').show();
			
			$('#main_tabNavigation ul.tabNavigation a').click(function () {
				tabContainers.hide();
				tabContainers.filter(this.hash).show();
				$('#main_tabNavigation ul.tabNavigation a').removeClass('selected');
				$(this).addClass('selected');
				return false;
			}).filter(':first').click();
		});
		
		
$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
});		
