$(function() {
$('#bg img,#bg2 img').fadeIn(3000);
var loc = window.location.toString().split("/")
loc = loc[loc.length - 1]
$("#nav a[href=\""+loc+"\"],#index #nav li :first").addClass("selected");
$('a[href^=http://]').attr('target', '_blank');
$('#bg img:gt(0),#info h6:gt(0)').hide();
setInterval(function(){$('#bg :first-child').fadeOut(3000).next('img').fadeIn(3000).end().appendTo('#bg');},6000);
setInterval(function(){$('#info :first-child').fadeOut(0).next('h6').fadeIn(0).end().appendTo('#info');},6000);
$("li.hover a").hover(function() {
if ($("li.hover span").css("display") == "block") { return false; }
if ($.browser.msie) {$("li.hover span").hide();}	else $("li.hover span").css({top: -120+"px"}).animate({top: -110+"px", opacity: "show"}, 300);
},
function() {
$("li.hover span").animate({opacity: "hide"}, 250);
});
});
$.fn.fadeIn=function(speed,callback){return this.animate({opacity:'show'},speed,function(){if($.browser.msie) this.style.removeAttribute('filter');if($.isFunction(callback)) callback();});};$.fn.fadeOut=function(speed,callback){return this.animate({opacity:'hide'},speed,function(){if($.browser.msie) this.style.removeAttribute('filter');if($.isFunction(callback)) callback();});};$.fn.fadeTo=function(speed,to,callback){return this.animate({opacity:to},speed,function(){if(to==1 && $.browser.msie) this.style.removeAttribute('filter');if($.isFunction(callback)) callback();});};
$(window).load(function() {
var eLoc=$(window).width()-480-$('#bg img').width();$('#info').css("right",eLoc).fadeIn();
});