﻿/**
 * TOG
 * LastChangedDate: 2008-6-6 
 */
//ie6 ImageCache
try {     
document.execCommand("BackgroundImageCache", false, true);     
} catch(err) {} 

//addFav
function myAddPanel(title,url,desc)
{
	if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function'))//Gecko
	{window.sidebar.addPanel(title,url,desc);}
	else//IE
	{window.external.AddFavorite(url,title);}
}
//carousel
function mycarousel_initCallback(carousel)
{
	// Disable autoscrolling if the user clicks the prev or next button.
	carousel.buttonNext.bind('click', function() {
	    carousel.startAuto(0);
	});

	carousel.buttonPrev.bind('click', function() {
	    carousel.startAuto(0);
	});

	// Pause autoscrolling if the user moves with the cursor over the clip.
	carousel.clip.hover(function() {
	    carousel.stopAuto();
	}, function() {
	carousel.startAuto();
	});
}
//require jquery
$(document).ready(function(){
   if ( $.browser.msie ){
		$('#main').corner(
   			{
          tl: { radius: 5 },
          tr: { radius: 5 },
          bl: { radius: 5 },
          br: { radius: 5 },
          antiAlias: true,
          autoPad: true,
          validTags: ["div"] }
   		);	
	};
	
	//change img
	$("ul.chlist li a").each(function(i){
		$(this).mouseover(function(){
			$("div#chimg img").attr("src",$(this).attr("href")); 
			$("div#chimg h5").html($(this).attr("title"));
			return false;
		});
	});
	
	
});