var IE6=(navigator.userAgent.indexOf("MSIE 6")>=0)?true:false;var e_pos=0,e_max=0,e_scrolls=[],e_info=[],eouter,edi,edic,_doc,_body;jQuery.extend(jQuery.easing,{easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;}});function disableSelect()
{$("*").each(function()
{if($.browser.mozilla)
{$(this).css('MozUserSelect','none');}
else if($.browser.msie)
{$(this).bind('selectstart',function(){return false;});}
else
{$(this).mousedown(function(){return false;});}});}
function e_prev()
{if(e_pos==0)
{e_pos=e_max;eouter.scrollLeft(e_scrolls[e_pos]);}
e_pos--;eouter.stop();eouter.animate({scrollLeft:e_scrolls[e_pos]},400,"easeInOutQuint");edic.html(e_info[e_pos]);}
function e_next()
{if(e_pos==e_max)
{e_pos=0;eouter.scrollLeft(e_scrolls[e_pos]);}
e_pos++;eouter.stop();eouter.animate({scrollLeft:e_scrolls[e_pos]},400,"easeInOutQuint");edic.html(e_info[e_pos]);}
function resetTimer()
{_doc.stopTime("slideshow");_doc.everyTime(4000,"slideshow",e_next);}
function stopTimer()
{_doc.stopTime("slideshow");}
function loading()
{var b=$(".backfade");if(b.size()==0)
{b=$(document.createElement('div')).addClass("backfade");}
var l=$(".loading");if(l.size()==0)
{l=$(document.createElement('div')).addClass("loading");}
l.html("<img src=\"images/loading2.gif\"/>");l.css({left:(_body.width()/2)-25,top:(_body.height()/2)-25});b.css('opacity','0.5');if(IE6)
{b.width(_body.width());b.height(_body.height());}
_body.append(b);_body.append(l);}
$(document).ready(function(){_doc=$(document);_body=$("body");if(IE6)
{document.execCommand("BackgroundImageCache",false,true);}
eouter=$("#e-outer");edi=$("#e-infodisplay");$("*").each(function(){$(this)[0].oncontextmenu=function()
{return false;}});});$(window).load(function(){var d=$(".ttext");var e=$(document.createElement('div')).addClass('titletextb');var f=$(document.createElement('div')).addClass('titletexti');d.wrapInner(f);e.css({opacity:0.5});d.prepend(e);if(IE6){d.each(function(){var j=$(this).find('.titletextb');j.height($(this).outerHeight());j.width($(this).outerWidth());});}
edic=edi.find(".titletexti");var _e=$(".e-box");if(_e)
{var id=0;var t;_e.each(function(){t=$(this);e_scrolls[id]=id*300;e_info[id]=t.find(".e-info").html();var l=id*300+17;t.css({left:l,display:'block'});id++;t.mouseenter(function(){edi.stop();edi.animate({bottom:'20px'},200,"swing");});t.mouseleave(function(){edi.stop();edi.animate({bottom:'-190px'},200,"swing");});});if(id>1)
{e_max=id-1;$("#e-next").css({display:'block'});$("#e-prev").css({display:'block'});$("#e-inner").width(id*340+400);$("#e-next").click(function(){resetTimer();e_next();return false;});$("#e-prev").click(function(){resetTimer();e_prev();return false;});if(IE6){eouter.css("left","-15px");}
resetTimer();edic.html(e_info[e_pos]);}}
eouter.mouseenter(function(){stopTimer();});eouter.mouseleave(function(){resetTimer();});var pcred=$("#pcredit");if(pcred)
{var pdrop=$("#pdrop");pcred.mouseenter(function(){pdrop.stop();pdrop.animate({top:501},200);});pcred.mouseleave(function(){pdrop.stop();pdrop.animate({top:0},200);});}});