$(document).ready(function() {
	
		
	var sc_toLoad = '#news-overview11';
	$('#windows-content').hide('fast',sc_loadContent);


	function sc_loadContent() {	
		var content = $(sc_toLoad).html();
		$('#windows-content').html(content);
		sc_showNewContent();
	}

	
	function sc_showNewContent() {
		$('#windows-content').show('normal');
	}
	
	reset_sc(); 
	  
});


function reset_sc() {
	$('.sc_show').click(function(){
		//$("a[rel^='prettyPhoto']").prettyPhoto();
								  
		var sc_toLoad = ''+$(this).attr('href');
		//var sc_toLoad = news;
		$('#windows-content').hide('fast',sc_loadContent);
		window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length);
		function sc_loadContent() {	
			var content = $(sc_toLoad).html();
			$('#windows-content').children().remove();
			$('#windows-content').html(content);
			//sc_showNewContent();
			
			$('#windows-content').show('normal');
			sc_showNewContent();
		}
		function sc_showNewContent() {
			//2011.05.10 mod by Alex for prettyPhoto套件初始化
			$("a[rel^='prettyPhoto']").prettyPhoto({social_tools:false,show_title: true,theme: 'dark_rounded',autoplay:true});
			//$("a[rel^='prettyPhoto']").prettyPhoto();
			$('#windows-content').show('normal');
		}
		/*function sc_showNewContent() {
			
			if(sc_toLoad == '#overview')
				$('#bg-inner-inner-center-content').show('normal',DoTags);
			else 
				$('#bg-inner-inner-center-content').show('normal');
			//bindThickBoxEvents();
		}*/
		return false;
		
	});
}




