jQuery.fn.prevWeather = function(){
	this.click(function(){
		var $current = $(this).parents('li');
		var $prev = $current.prev('li');
		var prevCount = $prev.size();
		if(prevCount==0)
			$prev = $('div ul#weather_box li:last-child');

		$current.removeClass();
		$current.addClass('weather_region_info closed');
		$prev.removeClass();
		$prev.addClass('weather_region_info open');
		
	});
}

jQuery.fn.nextWeather = function(){
	this.click(function(){
		var $current = $(this).parents('li');
		var $next = $current.next('li');
		var nextCount = $next.size();
		
		if(nextCount==0)
			$next = $('div ul#weather_box li:first-child');
		
		$current.removeClass();
		$current.addClass('weather_region_info closed');
		$next.removeClass();
		$next.addClass('weather_region_info open');
	});
}

jQuery.fn.mapChange = function(){
	this.change(function(){
		var opt = $(this).find(':selected');
		var opt_id = opt.attr('id');
		var imgsrc = opt_id=='tourmap_00'?'/images/new/main/tourmap/tourmap_01.gif':'/images/new/main/tourmap/'+opt.attr('id')+'.gif';
		var altmsg = opt_id=='tourmap_00'?'청주시 여행 지역별 관광지':opt.text()+' 여행 지역별 관광지';
		$('#tourmap_image').attr('src',imgsrc);
		$('#tourmap_image').attr('alt',altmsg);
		$('#tourmap_image').attr('title',altmsg);
		$('#tourmap_go').attr('href',opt.val());
		
	});
}

function goUrl(opt){	
	var url=$(opt).val();
	if(url!='')
		window.open($(opt).val(),'_blank');
	else{
		alert('이동할 사이트를 선택하세요!');
		return false;
	}
	
}