var myurl="Products/edrm.html";

$(document).ready(function() {

	
  $('#rotator').click(function(){
  
    $(location).attr('href',myurl);
  
  });

	$('#rotator').loopedSlider({
		autoStart: 7500,
		restart: 7500,
		typeofanimation:1
	});
	
	$('a.new-window').click(function(){
        window.open(this.href);
        return false;
    });


	$('#client-rotator').loopedSlider({
		autoStart: 3500,
		restart: 3500
	});


	// Activate Tabs

	//When page loads...
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs li").click(function() {

		$("ul.tabs li").removeClass("active"); //Remove any "active" class

		$("ul.tabs li").removeClass("activetab1"); //Remove any "active" class

		$("ul.tabs li").removeClass("activetab2"); //Remove any "active" class

		$("ul.tabs li").removeClass("activetab3"); //Remove any "active" class

		$("ul.tabs li").removeClass("activetab4"); //Remove any "active" class
		
		$("ul.tabs li").removeClass("activetab5"); //Remove any "active" class

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content

		$(this).addClass("active"+activeTab.replace("#","")); //Add "active" class to selected tab

		$(".tab_content").hide(); //Hide all tab content



		$(activeTab).fadeIn(); //Fade in the active ID content

		return false;
	});

	//language selector
	$('#languageselect').change(function(){
		window.location = $('#languageselect').val();
	})



	// IF IE6

	if ($.browser.msie && $.browser.version.substr(0,1)<7) {

		var sfEls = document.getElementById("main-menu").getElementsByTagName("LI");

		for (var i=0; i<sfEls.length; i++) {

			sfEls[i].onmouseover=function() {

				this.className+=" over";

			}

			sfEls[i].onmouseout=function() {

				this.className=this.className.replace(new RegExp(" over\\b"), "");

			}

		}

	}

});
