(function(a){a.fn.intelislide=function(n){var f={width:400,height:200,timeout:6000,transitionSpeed:1000,tagType:"div"};var b=a.extend(f,n);var i=a(this);var d="#"+i.attr("id");var m=a(d+" "+b.tagType+".caption");var k=i.children("a:first");var j=k.attr("rel");var h=i.next(b.tagType+".content");var l=0;i.css({position:"relative",display:"block",width:b.width,height:b.height,overflow:"hidden"});m.css({padding:"8px",position:"absolute","z-index":600}).hide();i.children(d+" a").css({"float":"left",position:"absolute"}).hide();i.children(d+" a:first").fadeIn(400,function(){if(k.attr("title").length>0){e(k);m.slideDown().html(k.attr("title"))}});i.children("a").each(function(){if(a(this).attr("href").length<=1){a(this).click(function(){return false});a(this).mouseover(function(){a(this).css({cursor:"default"})})}});var c=g();function g(){var o=setInterval(function(){var r=i.children("a").eq(l);var q=((r.index()+1)==i.children("a").length)?i.children("a").eq(0):i.children("a").eq((l+1));var p=(q.attr("title").length>0)?q.attr("title"):false;if(m.is(":visible")){m.slideUp((b.transitionSpeed/2),function(){r.css("z-index","").fadeOut(b.transitionSpeed)})}else{r.css("z-index","").fadeOut(b.transitionSpeed)}q.css("z-index",500).fadeIn(b.transitionSpeed,function(){if(p){e(q);m.slideDown().html(p)}l=q.index()})},b.timeout);return o}function e(s){var o=new Array();o[0]="#000";o[1]="#FFF";o[2]=0.7;o[3]="bottom";if(s.attr("rel")!="undefined"){var q=s.attr("rel").split(";");for(var p=0;p<q.length;p++){var r=q[p].split(":");switch(r[0]){case"bg":o[0]=r[1];break;case"txt":o[1]=r[1];break;case"opacity":o[2]=r[1];break;case"pos":o[3]=r[1];break}}}m.css({"background-color":o[0],color:o[1],opacity:o[2]});if(o[3]=="top"){m.css({width:(b.width-16),height:"",top:0,left:0,bottom:"",right:""})}else{if(o[3]=="right"){m.css({width:Math.round(b.width/4),height:(b.height-16),top:0,left:"",bottom:"",right:0})}else{if(o[3]=="left"){m.css({width:Math.round(b.width/4),height:(b.height-16),top:0,left:0,bottom:"",right:""})}else{m.css({width:(b.width-16),height:"",top:"",left:"",bottom:0,right:""})}}}}}})(jQuery);