// JavaScript Document
function addLoadEvent(func)
{
  var oldonload = window.onload;
  if (typeof window.onload != 'function')
  {
    window.onload = func;
  }
  else
  {
    window.onload = function()
	{
    	if (oldonload) {
        oldonload();
    }
	func();
   }
  }
}

function roundCorners()
{
	$(".rounded").corner();	
	/*
	var settings1 = {
      tl: { radius: 7 },
      tr: { radius: 7 },
      bl: { radius: 7 },
      br: { radius: 7 },
      antiAlias: true
    }
	var settings2 = {
      tl: { radius: 7 },
      tr: { radius: 7 },
      bl: { radius: 0 },
      br: { radius: 0 },
      antiAlias: true
    }
	var settings3 = {
      tl: { radius: 0 },
      tr: { radius: 7 },
      bl: { radius: 7 },
      br: { radius: 7 },
      antiAlias: true
    }
	curvyCorners(settings1, ".rnd1");
	curvyCorners(settings2, ".rnd2");
	curvyCorners(settings3, ".rnd3");
	*/

}

addLoadEvent(function() {

	roundCorners();

});

function toggleshit()
{
	
}

function switchTabs(prnt,trig)
{

	$("div#"+prnt+" > ul > li > a.tab").removeClass("selected");
	$("div#"+prnt+" > div.titem").addClass("hidden");
	$("div#"+$(trig).attr("href")).removeClass("hidden");
	$(trig).addClass("selected");
	//alert();
}


function changeLogo(trig)
{
	imgs = trig.getElementsByTagName("img");
	src = imgs[0].getAttribute("src");
	if(src.indexOf("_off")!=-1)
	{
		
		nsrc = src.replace("_off","_on");
	}
	else
	{
		
		nsrc = src.replace("_on","_off");
	}

	imgs[0].setAttribute("src",nsrc)
	//alert(nsrc);
}




