(function(a){var e={start:function(b){function e(a){(k=a)?($play.show(),$pause.hide()):(g(),$play.hide(),$pause.show())}function g(){k||(d++,d>=r&&(d=0),clearInterval(h),l())}function l(){var f=a(m[d]).find("a"),b=a("#bannerDesc #cont"),e=a("#bannerDesc #bck"),i=a("#bannerDesc #plus");f.attr("href")==""||f.attr("href")=="#"?i.hide():i.show();i.attr("href",f.attr("href"));b.html(f.html());f=b.height()+32;b=c.height-f;e.animate({height:f+"px"},900);n?(n=!1,a("#bannerDesc").css({top:b+"px"})):a("#bannerDesc").animate({top:b+"px"},900);a(j[o]).removeClass("activeBullet");a(j[d]).addClass("activeBullet");p.animate({left:-c.width*d+"px"},900,function(){h=setTimeout(g,c.speed)});o=d}var c={width:730,height:285,speed:1E3,banner:"#homebanner",contents:".tabContainer #tabContents .tabContent",tabContainer:".tabContainer #tabContents",playBtn:"#homebanner #playSlider",pauseBtn:"#homebanner #pauseSlider"};b&&a.extend(c,b);var d=-1,o,n=!0,k=!1,h,p=a(c.banner+" ul"),m=a(c.banner+" li"),j=[],r=a(c.banner+" ul li").length;p.css({position:"relative"});var q=a("<div class='bulletsCont' />");a(c.banner).append(q);c.playBtn&&($play=a(c.playBtn),$play.click(function(a){a.preventDefault();e(!1)}));c.pauseBtn&&($pause=a(c.pauseBtn),$pause.click(function(a){a.preventDefault();e(!0)}));$play.hide();$pause.show();m.each(function(b){a(this).css({position:"absolute",left:c.width*b+"px"});b=a("<a id='"+b+"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>").css({display:"none"}).bind("click",function(){d=a(this).attr("id");clearInterval(h);l()}).appendTo(q);j.push(b);b.fadeIn(500)});g()}};a.fn.gvahomebanner=function(b){if(e[b])return e[b].apply(this,Array.prototype.slice.call(arguments,1));else if(typeof b==="object"||!b)return e.init.apply(this,arguments);else a.error("Method "+b+" does not exist on jQuery.gva.ui")}})(jQuery);
