﻿/*<![CDATA[*/
//======= Window on load ==========//

$(window).load(function () {
// jCarouselLite
$("#Slide").jCarouselLite({
	 btnNext: ".btnNext",
	 btnPrev: ".btnPrev",
	 easing:"easeinout",
	 visible:1
});
// END jCarouselLite
});
//=======END Window on load ==========//

//=======Init Jquery (on page load) ==========//

$(function () {

if(!($.browser.msie && parseInt(jQuery.browser.version) == 6)){	// if  NOT IE6 do menu animation
	$('div.sidenav:eq(0) div.subnav').show();
	$('div.sidenav:eq(0) span.navbullet').click(function() {
		//console.log(this);
		$(this).parent().next().toggle("blind");
	});
}
$("table#cart tbody tr.product-line:odd").css("background-color", "#FFFFFF");

// Init Links with _blank target
function externalLinks() {
	if (!document.getElementsByTagName) return;
		var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
	if (anchor.getAttribute("href") &&
		anchor.getAttribute("rel") == "external")
		anchor.target = "_blank";
	}
}
	//$("ul#products-list li:even").css({ backgroundColor: "#FFFFFF" });

// Init site_bottom_extras links Animation
	$("ul#products-list li").hover(function() {
		$(this).animate({ backgroundColor: "#EFEFEF"}, "fast");
		},function() {
		$(this).animate({ backgroundColor: "#DFDFDF"}, "fast");
	});
// END site_bottom_extras links Animation
/*
	$('ul#products-list li').hover(function() { //mouse in
		$(this).animate({ paddingLeft: '5px' }, "fast");
		}, function() { //mouse out
		$(this).animate({ paddingLeft: 0 }, "fast");
	});
*/



});

//=======END Init Jquery (on page load) ==========//

//=======Start Assorted Functions==========//

function SendOrder(limit)
{
	 if (limit < 300)
	{
		alert ('Minimum orders - $ 300 USD');
		return false;
	}
		return true;

}


function checkContactForm(){
	if (document.getElementById("contact_form").name.value == ""){
		alert("Please fill in Your name!");
		document.getElementById("contact_form").name.focus();
		return false;
	}

	if (document.getElementById("contact_form").email.value == ""){
		alert("Please fill in Your E-mail!");
		document.getElementById("contact_form").email.focus();
		return false;
	}
	if(!/^[\w\.\-]+@[\w\-]+(\.\w+)+$/.test(document.getElementById("contact_form").email.value)){
		alert("Invalid E-mail!");
		document.getElementById("contact_form").email.value = ""
		document.getElementById("contact_form").email.focus();
		return false;
	}
	return true;
}

  function CheckPhoneNumber(TheNumber) {
      //alert(TheNumber);
      var valid = 1
      var GoodChars = "0123456789()- " //"+"
      var i = 0
      if (TheNumber=="") {
          // Return false if number is empty
          valid = 0
      }
      for (i =0; i <= TheNumber.length -1; i++) {
          if (GoodChars.indexOf(TheNumber.charAt(i)) == -1) {
  // Note: Remove the comments from the following line to see this
  // for loop in action.
  // alert(TheNumber.charAt(i) + " is no good.")
              valid = 0
          } // End if statement
      } // End for loop
      return valid
  }


  function CheckNumber(TheNumber) {
      //alert(TheNumber);
      var valid = 1
      var GoodChars = "0123456789 " //"+"
      var i = 0
      if (TheNumber=="") {
          // Return false if number is empty
          valid = 0
      }
      for (i =0; i <= TheNumber.length -1; i++) {
          if (GoodChars.indexOf(TheNumber.charAt(i)) == -1) {
  // Note: Remove the comments from the following line to see this
  // for loop in action.
  // alert(TheNumber.charAt(i) + " is no good.")
              valid = 0
          } // End if statement
      } // End for loop
      return valid
  }

//=======END Assorted Functions==========//


/*]]>*/
