/***** CLOSE MAIN NAV ******/

$('ul.dd_nav').hide();

/***** LEFT-SIDE RESIZE ******/

function page_resize() {
  var total_page_height = $('.container').height();
  var left_side_height = $('.left_side_container').height();
  if(left_side_height < total_page_height){
    $('.left_side_container').height(total_page_height);
  }
}
$(document).ready(function(){
	
	page_resize();
	$('form p label').inFieldLabels();
	
	/****** MAIN NAV *******/

	$('li.dd_li h2').click(function(){
	  if($(this).parent('li.dd_li').hasClass('active')){
	    $(this).next('ul.dd_nav').slideUp('slow','easeOutExpo');
	    $(this).parent('li.dd_li').removeClass('active');
	  } else {
	    $('ul.dd_nav').slideUp('slow','easeOutExpo');
	    $('li.dd_li').removeClass('active');
	    $(this).next('ul.dd_nav').slideDown('slow','easeOutExpo');
	    $(this).parent('li.dd_li').addClass('active');
    }
	});




	
});

/**** ANALYTIC REPORTING *****/

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21819411-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
