var featuredcontentslider={ajaxloadingmsg:'
Fetching slider Contents. Please wait...
',bustajaxcache:!0,enablepersist:!0,settingcaches:{},jumpTo:function(a,b){this.turnpage(this.settingcaches[a],b)},ajaxconnect:function(a){var b=!1;if(window.ActiveXObject)try{b=new ActiveXObject("Msxml2.XMLHTTP")}catch(c){try{b=new ActiveXObject("Microsoft.XMLHTTP")}catch(d){}}else if(window.XMLHttpRequest)b=new XMLHttpRequest;else return!1;var e=a.contentsource[1]; b.onreadystatechange=function(){featuredcontentslider.ajaxpopulate(b,a)};document.getElementById(a.id).innerHTML=this.ajaxloadingmsg;var g=!this.bustajaxcache?"":-1!=e.indexOf("?")?"&"+(new Date).getTime():"?"+(new Date).getTime();b.open("GET",e+g,!0);b.send(null)},ajaxpopulate:function(a,b){if(4==a.readyState&&(200==a.status||-1==window.location.href.indexOf("http")))document.getElementById(b.id).innerHTML=a.responseText,this.buildpaginate(b)},buildcontentdivs:function(a){for(var b=document.getElementById(a.id).getElementsByTagName("div"), c=0;c'+("string"==typeof e?e.replace(/#increment/,f):e[f-1])+" ";d=(""!=g[0]?' ":"")+d+(""!=g[1]?'":"");c.innerHTML=d}d=c.getElementsByTagName("a");for(f=e=0;fa.contentdivs.length-1?d[f].style.display="none":(d[f].setAttribute("rel",++e),d[f][a.revealtype]=function(){featuredcontentslider.turnpage(a,this.getAttribute("rel"));return!1},a.toclinks.push(d[f]));else if(this.css(d[f],"prev","check")||this.css(d[f],"next","check"))d[f].onclick=function(){featuredcontentslider.turnpage(a, this.className);return!1};this.turnpage(a,a.currentpage,!0);a.autorotate[0]&&(c[a.revealtype]=function(){featuredcontentslider.cleartimer(a,window["fcsautorun"+a.id])},b.onclick=function(){featuredcontentslider.cleartimer(a,window["fcsautorun"+a.id])},a.autorotate[1]+=50*(1/a.enablefade[1]),this.autorotate(a))},urlparamselect:function(a){return null==window.location.search.match(RegExp(a+"=(\\d+)","i"))?null:parseInt(RegExp.$1)},turnpage:function(a,b,c){var d=a.currentpage,e=a.contentdivs.length, b=/prev/i.test(b)?d-1:/next/i.test(b)?d+1:parseInt(b),b=1>b?e:b>e?1:b;if(!(b==a.currentpage&&"undefined"==typeof c)){a.currentpage=b;if(1==b&&100a.curopacity?(this.setopacity(a,a.curopacity+a.enablefade[1]),window["fcsfade"+a.id]=setTimeout(function(){featuredcontentslider.fadeup(a)},50)):(a.cacheprevpage!=a.currentpage&&(a.contentdivs[a.cacheprevpage-1].style.display="none"),a.onChange(a.cacheprevpage,a.currentpage))},cleartimer:function(a,b){"undefined"!=typeof b&&(clearTimeout(b),clearInterval(b), a.cacheprevpage!=a.currentpage&&(a.contentdivs[a.cacheprevpage-1].style.display="none"))},css:function(a,b,c){var d=RegExp("(^|\\s+)"+b+"($|\\s+)","ig");if("check"==c)return d.test(a.className);"remove"==c?a.className=a.className.replace(d,""):"add"==c&&(a.className+=" "+b)},autorotate:function(a){window["fcsautorun"+a.id]=setInterval(function(){featuredcontentslider.turnpage(a,"next")},a.autorotate[1])},getCookie:function(a){a=RegExp(a+"=[^;]+","i");return document.cookie.match(a)?document.cookie.match(a)[0].split("=")[1]: null},setCookie:function(a,b){document.cookie=a+"="+b},init:function(a){var b=this.getCookie("fcspersist"+a.id)||1,c=this.urlparamselect(a.id);this.settingcaches[a.id]=a;a.contentdivs=[];a.toclinks=[];a.topzindex=0;a.currentpage=c||(this.enablepersist?b:1);a.prevpage=a.currentpage;a.revealtype="on"+(a.revealtype||"click");a.curopacity=0;a.onChange=a.onChange||function(){};"inline"==a.contentsource[0]&&this.buildpaginate(a);"ajax"==a.contentsource[0]&&this.ajaxconnect(a)}};