$(document).ready(function() {

	var $v_iframe = $('iframe');
	$v_iframe.load(sizeIFrame);
	
	function sizeIFrame() {
		var innerDoc = ($v_iframe.get(0).contentDocument) ? $v_iframe.get(0).contentDocument : $v_iframe.get(0).contentWindow.document;
		$v_iframe.height(innerDoc.body.scrollHeight + 35);
		//alert($v_iframe.get(0).contentDocument.get(0).clientHeight);
		//v_iframe.get(0).contentDocument.get(0).clientHeight
	} 
  	
  	// hides the slickbox as soon as the DOM is ready
  	// (a little sooner than page load)
  	$('#profile-bucket').show();
  	// shows the slickbox on clicking the noted link
  	$('a#slick-show').click(function() {
  		$('#profile-bucket').show('slow');
  		return false;
  	});
  	// hides the slickbox on clicking the noted link
  	$('a#slick-hide').click(function() {
  		$('#profile-bucket').hide('fast');
  		return false;
  	});
  	// toggles the slickbox on clicking the noted link
  	$('a#slick-toggle').click(function() {
  		$('#profile-bucket').toggle(400);
  		return false;
  	});
  	//------------------
  	$('a').click(function() {
  	  var $a = $(this);
  	  var href = $a.attr('href');

  	  // see if the link is a mailto
  	  if ( (href.match(/^mailto/)) ) {
	//  		alert('Mailto Click Event');
  	    // if so, register an event
  	    var category = 'mailto'; // not used yet
  	    var event = 'click'; // 
  	    var label = href; // using to label custom link report

  		//pageTracker._trackEvent(category, event, href);
  		//var s=s_gi('REPORT SUITE ID HERE'); //set in s_code already
  		s.linkTrackVars='events';
  		s.linkTrackEvents='event14';

  		s.events=s.apl(s.events, 'event14', ',', 1);

//  		s.tl(this,'o','Test Email Us Link');
  		s.tl(this,'o', label);
  	  }
  	});
  	
  	
  	//------------------
});


