// default

$(function(){

	try{
		if(form_values != null){
			for(var i in form_values){
				$('input[name='+i+']').val(form_values[i]);
				$('textarea[name='+i+']').val(form_values[i]);
			}
		}
	}catch(err){
		
	}
	
	if($('.leftnav').height() + 40 > $('.internal').height()){
		$('.internal').height($('.leftnav').height() + 40);
	}
	
	$('#profiles').cycle({
        fx:      	'fade',
        timeout:  	10000,
        prev:    	'#prev',
        next:    	'#next',
		pause:		true,
		random:		true
	});
	
	// event tracker for file downloads
	$('a').each(function(){
		var path = $(this).attr('href');
		var ext = /[^/].(?:doc|eps|jpg|png|svg|xls|ppt|pdf|xls|zip|txt|vsd|vxd|js|css|rar|exe|wma|mov|avi|wmv|mp3|mp4)/i;
		if(path.match(ext)){
			$(this).click(function(){
				//pageTracker._trackEvent('File', 'Download', $(this).attr('href'));
				_gaq.push(['_trackEvent', 'File', 'Download', $(this).attr('href')]);
			});	
		}
	});

	
});