(function(b,a){a.carousel=function(f){var d={container:".globalbanner",htmlready:false,speed:500,width:960,auto:false,cssimage:".gbanner",csslist:".glist",cssnavigation:".gpager",items:[{source:"/images/homepage/img_globalbanner_1.gif",url:"/products/webextending.aspx",alt:""},{source:"/images/homepage/img_globalbanner_3.gif",url:"#",alt:""},{source:"/images/homepage/img_globalbanner_4.gif",url:"#",alt:""}],language:{next:"NEXT",prev:"PREV"},before:function(n){},after:function(n){},cssnext:".next",cssprev:".prev",cssactive:".active",referenceattr:"rel",unit:"px",easing:"swing",queue:false,startfrom:0,minspeed:5000,interval:5000};var h={max:0,last:0,next:0,speed:0,timer:0,playing:false};var c=b.extend(d,f||{});var l=b(c.container);String.prototype.getCSSName=function(){return this.replace(".","")};var k=c.htmlready?l.find(c.cssimage):b("<div></div>").addClass(c.cssimage.getCSSName());var i=c.htmlready?l.find(c.csslist):b("<ul></ul>").addClass(c.csslist.getCSSName());var g=c.htmlready?l.find(c.cssnavigation):b("<ul></ul>").addClass(c.cssnavigation.getCSSName());var j=(c.htmlready?l.find(c.cssnext):b("<a></a>").addClass(c.cssnext.getCSSName()).text(c.language.next)).attr("rel","+1");var e=(c.htmlready?l.find(c.cssprev):b("<a></a>").addClass(c.cssprev.getCSSName()).text(c.language.prev)).attr("rel","-1");return{utils:{stop:function(){window.clearTimeout(h.timer);h.timer=0},animate:function(p,o,q){var n=this;if(c.auto){n.stop()}if(h.playing){return false}h.playing=true;if(c.before){c.before(h.last)}if(o<=0){h.speed=o=c.speed}if(o>c.minspeed){h.speed=o=c.minspeed}i.animate({left:(-p*c.width)+c.unit},{queue:c.queue,duration:o,easing:c.easing,complete:function(){h.last=h.next;q();h.playing=false;g.children().not(c.cssprev+","+c.cssnext).removeClass(c.cssactive.getCSSName()).eq(h.last).addClass(c.cssactive.getCSSName());if(c.auto){h.timer=window.setTimeout(function(){n.next()},c.interval)}if(c.after){c.after(h.last)}}});return true},numeric:function(n){if(h.playing){return false}h.next=n;return this.animate(n,c.speed,function(){})},next:function(){if(h.playing){return false}h.next=(h.next>=h.max?0:h.next+1);if(h.next==0&&m.ie6==false){var n=i.children().first().clone();i.append(n);return this.animate(h.max+1,h.speed,function(){var o=0;i.css("left",o+c.unit);n.remove()})}return this.numeric(h.next)},prev:function(){if(h.playing){return false}h.next=(h.next<=0?h.max:h.next-1);if(h.next==h.max&&m.ie6==false){var n=i.children().last().clone();i.prepend(n).css("left",-c.width+c.unit);return this.animate(0,h.speed,function(){var o=-(h.max)*c.width;i.css("left",o+c.unit);n.remove()})}return this.numeric(h.next)},go:function(n){if(n.indexOf("+")===0){this.next()}else{if(n.indexOf("-")===0){this.prev()}else{this.numeric(Number(n))}}}},create:function(){if(c.htmlready){return false}b(c.items).each(function(o){var n=b("<img />").attr("src",c.items[o].source).attr("alt",c.items[o].alt);var q=b("<li></li>").attr(c.referenceattr,o);if(c.items[o].url==""||c.items[o].url=="#"){q.append(n)}else{var r=b("<a></a>").attr("href",c.items[o].url);r.append(n);q.append(r)}i.append(q);var p=b("<a></a>");g.append(p)});g.prepend(e).append(j);k.append(i);l.empty().append(k).append(g);return true},init:function(){var n=this;i.css("width",(k.width()*i.children().length*2).toString()+"px");k.parent().bind("dragstart",function(p){h.speed=new Date().getTime()});k.parent().bind("dragend",function(p){h.speed=new Date().getTime()-h.speed});j.unbind("click");j.bind("click",function(p){p.preventDefault();n.utils.go(b(this).attr(c.referenceattr))});e.unbind("click");e.bind("click",function(p){p.preventDefault();n.utils.go(b(this).attr(c.referenceattr))});var o=g.children().not(c.cssprev+","+c.cssnext);h.max=o.length-1;o.each(function(p){b(this).unbind();b(this).bind("click",function(q){q.preventDefault();n.utils.go(b(this).attr(c.referenceattr))}).attr(c.referenceattr,p)});return n},start:function(){this.create();this.init().utils.numeric(c.startfrom)}}}})(jQuery,BTN);m.initpoint=function(a){var d="."+a+"tab li";var b="."+a+"content";var e="#"+a+"-";$(d).each(function(c){var f=$(this).attr("class");$(this).mouseover(function(){$(this).parent().find("li").each(function(g){$(this).find("a").removeClass("on")});$(b).parent().find(".newslister").each(function(g){$(this).addClass("hidden")});$(this).find("a").addClass("on");$(e+f).removeClass("hidden")})})};m.togglelinks=function(c,b,a){$(".hotlist").toggleClass("on");if($(c).text()==b){$(c).text(a)}else{$(c).text(b)}};$(document).ready(function(){m.initpoint("hot");m.initpoint("faq");m.initpoint("products");$(".home").remove()});
