 
 
 $(document).ready(function(){

$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 8000, true);
$(".tamil-main .menu-list").hover(function(){
btn_mouseOver(this);
},function(){
btn_mouseOut(this); 
});

$("a").hover(function(){
btn_mouseOver(this);
},function(){
btn_mouseOut(this);  
});



});
 
 function btn_mouseOver(imageName)
   {  
        imageName.style.opacity=0.5;
		//imageName.filters.alpha.opacity=50
     }  
function btn_mouseOut(imageName)       
     {  
        imageName.style.opacity=1;
		//imageName.filters.alpha.opacity=100
           
     }  

var arr_sri_lanka=new Array()
var root_sri_lanka = "images/"+"sri-lanka";
arr_sri_lanka[0]=[root_sri_lanka+ "/sri-lanka-1.jpg", "sri_lanka/", "Sri Lanka business directory", "Sri Lanka business Directory"] 
arr_sri_lanka[1]=[root_sri_lanka+ "/sri-lanka-2.jpg", "sri_lanka/", "Sri Lanka Tamil business directory", "Sri Lanka Tamil Business"] 
arr_sri_lanka[2]=[root_sri_lanka+ "/sri-lanka-3.jpg", "sri_lanka/", "Sri Lanka Tamil", "Sri Lanka directory"] 
arr_sri_lanka[3]=[root_sri_lanka+ "/sri-lanka-4.jpg", "sri_lanka/", "Tamil in Sri Lanka", "Sri Lanka business"] 
arr_sri_lanka[4]=[root_sri_lanka+ "/sri-lanka-5.jpg", "sri_lanka/", "jaffna business", "Business in Sri Lanka"] 

 var arr_uk=new Array()
var root_uk = "images/"+"uk";
arr_uk[0]=[root_uk+ "/uk-1.jpg", "uk/", "uk business directory","uk tamil business"] 
arr_uk[1]=[root_uk+ "/uk-2.jpg", "uk/", "london tamil business directory","london tamils"] 
arr_uk[2]=[root_uk+ "/uk-3.jpg", "uk/", "uk tamil listing","London Tamil Business"] 
arr_uk[3]=[root_uk+ "/uk-4.jpg", "uk/", "london tamil","United Kingdom"] 
arr_uk[4]=[root_uk+ "/uk-5.jpg", "uk/", "tamil business in london","United Kingdom"] 

 var arr_canada=new Array() 
var root_canada = "images/"+"canada";
arr_canada[0]=[root_canada+ "/canada-1.jpg", "canada/", "canada tamil business directory","Canada"] 
arr_canada[1]=[root_canada+ "/canada-2.jpg", "canada/", "canada tamil","Canada"] 
arr_canada[2]=[root_canada+ "/canada-3.jpg", "canada/", "canada business directory","Canada"] 
arr_canada[3]=[root_canada+ "/canada-4.jpg", "canada/", "tamil business in canada","Canada"] 
arr_canada[4]=[root_canada+ "/canada-5.jpg", "canada/", "canada yellow pages","Canada"] 

 var arr_australia=new Array() 
var root_australia = "images/"+"australia";
arr_australia[0]=[root_australia+ "/australia-1.jpg", "australia/", "australia tamil business directory", "Australia"] 
arr_australia[1]=[root_australia+ "/australia-2.jpg", "australia/", "australia business directory", "Australia"] 
arr_australia[2]=[root_australia+ "/australia-3.jpg", "australia/", "australian tamil", "Australia"] 
arr_australia[3]=[root_australia+ "/australia-4.jpg", "australia/", "tamil in australia", "Australia"] 
arr_australia[4]=[root_australia+ "/australia-5.jpg", "australia/", "australia yellow pages", "Australia"] 

 var arr_denmark=new Array() 
var root_denmark = "images/"+"denmark";
arr_denmark[0]=[root_denmark+ "/denmark-1.jpg","denmark/", "denmark tamil yellow pages", "Denmark"] 
arr_denmark[1]=[root_denmark+ "/denmark-2.jpg","denmark/", "denmark tamil business directory", "Denmark"] 
arr_denmark[2]=[root_denmark+ "/denmark-3.jpg","denmark/", "denmark business directory", "Denmark"] 
arr_denmark[3]=[root_denmark+ "/denmark-4.jpg","denmark/", "tamil in denmark", "Denmark"] 
arr_denmark[4]=[root_denmark+ "/denmark-5.jpg","denmark/", "tamil business denmark", "Denmark"] 

var arr_france=new Array() 
var root_france = "images/"+"france";
arr_france[0]=[root_france+ "/france-1.jpg", "france/", "france tamil business directory"] 
arr_france[1]=[root_france+ "/france-2.jpg", "france/", "france tamil"] 
arr_france[2]=[root_france+ "/france-3.jpg", "france/", "france business listing"] 
arr_france[3]=[root_france+ "/france-4.jpg", "france/", "tamil business in france"] 
arr_france[4]=[root_france+ "/france-5.jpg", "france/", "france yellow pages"] 

var arr_germany=new Array() 
var root_germany = "images/"+"germany";
arr_germany[0]=[root_germany+ "/germany-1.jpg", "germany/", "tamil in germany","Germany"] 
arr_germany[1]=[root_germany+ "/germany-2.jpg", "germany/", "germany tamil business directory","Germany"] 
arr_germany[2]=[root_germany+ "/germany-3.jpg", "germany/", "germany business directory","Germany"] 
arr_germany[3]=[root_germany+ "/germany-4.jpg", "germany/", "germany business listing","Germany"] 
arr_germany[4]=[root_germany+ "/germany-5.jpg", "germany/", "tamil listing","Germany"] 

var arr_india=new Array() 
var root_india = "images/"+"india";
arr_india[0]=[root_india+ "/india-1.jpg", "/india", "india tamil business directory","India"] 
arr_india[1]=[root_india+ "/india-2.jpg", "/india", "india tamil","India"] 
arr_india[2]=[root_india+ "/india-3.jpg", "/india", "tamilnadu business directory","India"] 
arr_india[3]=[root_india+ "/india-4.jpg", "/india", "business in tamilnadu","India"] 
arr_india[4]=[root_india+ "/india-5.jpg", "/india", "tamilnadu business listing","India"] 

var arr_new_zealand=new Array() 
var root_new_zealand = "images/"+"new-zealand";
arr_new_zealand[0]=[root_new_zealand+ "/new-zealand-1.jpg","/new-zealand", "new zealand tamil directory", "New Zealand"] 
arr_new_zealand[1]=[root_new_zealand+ "/new-zealand-2.jpg","/new-zealand", "tamil in new zealand", "New Zealand"] 
arr_new_zealand[2]=[root_new_zealand+ "/new-zealand-3.jpg","/new-zealand", "new zealand directory", "New Zealand"] 
arr_new_zealand[3]=[root_new_zealand+ "/new-zealand-4.jpg","/new-zealand", "business in new zealand", "New Zealand"] 
arr_new_zealand[4]=[root_new_zealand+ "/new-zealand-5.jpg","/new-zealand", "tamil business", "New Zealand"] 




var arr_norway=new Array() 
var root_norway = "images/"+"norway";
arr_norway[0]=[root_norway+ "/norway-1.jpg", "/norway", "norway tamil business directory","Norway"] 
arr_norway[1]=[root_norway+ "/norway-2.jpg", "/norway", "norway directory","Norway"] 
arr_norway[2]=[root_norway+ "/norway-3.jpg", "/norway", "tamil yellow pages","Norway"] 
arr_norway[3]=[root_norway+ "/norway-4.jpg", "/norway", "norway tamil","Norway"] 
arr_norway[4]=[root_norway+ "/norway-5.jpg", "/norway", "tamil in norway","Norway"] 


var arr_switzerland=new Array() 
var root_switzerland = "images/"+"switzerland";
arr_switzerland[0]=[root_switzerland+ "/switzerland-1.jpg", "/switzerland", "tamil in switzerland","Switzerland"] 
arr_switzerland[1]=[root_switzerland+ "/switzerland-2.jpg", "/switzerland", "swiss tamil dirctory","Switzerland"] 
arr_switzerland[2]=[root_switzerland+ "/switzerland-3.jpg", "/switzerland", "switzerland tamil business directory","Switzerland"] 
arr_switzerland[3]=[root_switzerland+ "/switzerland-4.jpg", "/switzerland", "switzerland business directory","Switzerland"] 
arr_switzerland[4]=[root_switzerland+ "/switzerland-5.jpg", "/switzerland", "swiss tamil yellow page","Switzerland"] 

var arr_usa=new Array() 
var root_usa = "images/"+"usa";
arr_usa[0]=[root_usa+ "/usa-1.jpg", "/usa", "tamils in united state of america", "United State of America"] 
arr_usa[1]=[root_usa+ "/usa-2.jpg", "/usa", "usa tamil business directory", "United State of America"] 
arr_usa[2]=[root_usa+ "/usa-3.jpg", "/usa", "usa tamil yellow page", "United State of America"] 
arr_usa[3]=[root_usa+ "/usa-4.jpg", "/usa", "tamil yellow page", "United State of America"] 
arr_usa[4]=[root_usa+ "/usa-5.jpg", "/usa", "world tamil yellow page", "United State of America"] 


var fadebgcolor=""

////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=0 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) 
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" alt="'+this.theimages[picindex][2]+'" title="'+this.theimages[picindex][3]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}

/*scrool div */
var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);

function toTop(id){
document.getElementById(id).scrollTop=0
}

defaultStep=1
step=defaultStep

function scrollDivDown(id)
{	document.getElementById(id).scrollLeft+=step;
	timerDown=setTimeout("scrollDivDown('"+id+"')",10)}
function scrollDivUp(id)
{	document.getElementById(id).scrollLeft-=step;
	timerUp=setTimeout("scrollDivUp('"+id+"')",10)}

function toBottom(id){
document.getElementById(id).scrollLeft=document.getElementById(id).scrollHeight}

function toPoint(id){document.getElementById(id).scrollLeft=100}


