LoadJs();
$(document).ready(function(){
						   
	$('.anythingSlider').anythingSlider({
    	easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
        autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
        delay: 3000,                    // How long between slide transitions in AutoPlay mode
       	startStopped: false,            // If autoPlay is on, this can force it to start stopped
        animationTime: 2400,             // How long the slide transition takes
        hashTags: true,                 // Should links change the hashtag in the URL?
       	buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
        pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
        startText: "Go",             // Start text
		stopText: "Stop",               // Stop text
		navigationFormatter: formatText  // Details at the top of the file on this use (advanced use)
    });
	
	$("#n_name").keyup(function() {
		$("#firstname").html($(this).val());
	});
						   
	$("#contactForm").validate({
	errorLabelContainer: $("div#errors")
	});
	
	var act_id = $(".menu li a.selected").attr("id");
	$("#"+act_id+"submenu").css("display", "inline");
	
	$("#slider").easySlider({auto: true});
	$(".menu li a").each(function() {
	var id = $(this).attr("id");
	$(this).mouseover(function () {
		$(".menu li a.selected").removeAttr("class");
		$(this).addClass("selected");
		$(".submenu ul").css("display", "none");
		$("#"+id+"submenu").css("display", "inline");
	});
		
	});
	
$(".faq_header").click(function() {
	var id = $(this).attr("id");
	var cont = $("#a_"+id);
	if( cont.css("display") == "none" )
	cont.slideDown('fast');
	else
	cont.slideUp('fast');
	return false;
});

$("a#iframe").fancybox({
	'width'			:	630, 
	'height'		:	430
});

$("a#iframe2").fancybox({
	width			:	1005, 
	height			:	490,
	type			: 'iframe',
	scrolling		: 'no',
	padding			: 0
});

$("a#iframe3").fancybox({
	width			:	1005, 
	height			:	570,
	type			: 'iframe',
	scrolling		: 'no',
	padding			: 0
});


$("a.group").fancybox();


});

function formatText(index, panel) {
		  return index + "";
}

function LoadJs() {
document.write('<script type="text/javascript" src="/js/easySlider1.5.js"></script>');
document.write('<script type="text/javascript" src="/js/jquery.accordion.js"></script>');
document.write('<script type="text/javascript" src="/js/jquery.fancybox.js"></script>');
document.write('<script type="text/javascript" src="/js/jquery.validate.js"></script>');
document.write('<script type="text/javascript" src="/js/jquery.easing.1.2.js"></script>');
document.write('<script type="text/javascript" src="/js/jquery.anythingslider.js"></script>');
}

function closeFancy() {
$.fn.fancybox.close();
}
