$(function(){
	$('.slider').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: 5000,                    // How long between slide transitions in AutoPlay mode
		startStopped: false,            // If autoPlay is on, this can force it to start stopped
		animationTime: 600,             // How long the slide transition takes
		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
		navigationFormatter:function(){return '&nbsp;';},
		hashTags:false
	});
});

var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-2760221-10']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

var GB_ANIMATION = true;
      $(document).ready(function(){
        $("a.greybox").click(function(){
          var t = this.title || $(this).text() || this.href;
          GB_show(t,this.href,550,730);
          return false;
        });
      });

function validate_email(contact,ContactEmail) {
   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   var address = document.forms.contact.ContactEmail.value;
   if(reg.test(address) == false) {

      return false;
   }
}

function subscribe_email(subscribe,NewsEmail) {
   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   var address = document.forms.subscribe.NewsEmail.value;
   if(reg.test(address) == false) {

      return false;
   }
}

function validate(contact)
{
	if (document.forms.contact.ContactName.value.length == 0)
	{
		alert ('Please enter Your name.');
		document.forms.contact.ContactName.focus();
		return false ;
	} else if (document.forms.contact.ContactEmail.value.length == 0)
	{
		alert('Please enter your Email.');
		document.forms.contact.ContactEmail.focus();
		return false;
	} 	else if (validate_email('contact', 'ContactEmail') == false)
	{
		alert('Please enter valid Email Address');
		document.forms.contact.ContactEmail.focus();
		return false;
	} else if (document.forms.contact.Message.value.length == 0)
	{
		alert('Please enter Message.');
		document.forms.contact.Message.focus();
		return false;
	}else 
	{
		document.getElementById('contact').submit();
	}
}

function test(testimonials)
{
	if (document.forms.testimonials.Name.value.length == 0)
	{
		alert ('Please enter Your name.');
		document.forms.testimonials.Name.focus();
		return false ;
	} else if (document.forms.testimonials.Title.value.length == 0)
	{
		alert('Please enter your position in the company.');
		document.forms.testimonials.Title.focus();
		return false;
	} 	else if (document.forms.testimonials.Company.value.length == 0)
	{
		alert('Please enter your company name.');
		document.forms.testimonials.Company.focus();
		return false;
	} else if (document.forms.testimonials.Testimonial.value.length == 0)
	{
		alert('Please provide your testimonial.');
		document.forms.testimonials.Testimonial.focus();
		return false;
	}else 
	{
		document.getElementById('testimonials').submit();
	}
}

function subscription(subscribe)
{
	if (document.forms.subscribe.NewsName.value.length == 0)
	{
		alert ('Please enter Your name.');
		document.forms.subscribe.NewsName.focus();
		return false ;
	} else if (document.forms.subscribe.NewsEmail.value.length == 0)
	{
		alert('Please enter your Email.');
		document.forms.subscribe.NewsEmail.focus();
		return false;
	} 	else if (subscribe_email('subscribe', 'NewsEmail') == false)
	{
		alert('Please enter valid Email Address');
		document.forms.subscribe.NewsEmail.focus();
		return false;
	}else 
	{
		document.getElementById('subscribe').submit();
	}
}
