
$(document).ready(function() {

	/*-------- global vars --------*/

	/*-------- global functions --------*/




	/*-------- global processes --------*/

	// add local forecast clicks
	$('.wx-col > ul.sec > li > a').click(function(e){
		var ref = $(this).attr('id').replace(/(\w+)-link/, "$1");


		if ($(this).attr('id').match(/(\w+)-link/) ) {
			var ref = $(this).attr('id').replace(/(\w+)-link/, "$1");
			var refType = $(this).attr('id').replace(/^(\w+)-.+$/, "$1");

			$('.gen-' + refType).hide();
			$('#' + ref).show(500);
			$('#' + ref + '-img').show();

 		 	$('.wx-col > ul.sec > li > a').removeClass('sel');
			$(this).addClass('sel');


		}


 		return false;
 	});


	// local tooltips
	$('.gen-local-tooltip').each(function(e){

		  $(this).cluetip({

			arrows: true,
			width: '300px',
			dropShadow: false,
			local: true

		});

 	});




});