//When the DOM tree is loaded
$(document).ready(function() {

    //This is for Sales Page
    $('input[name$="hdComplete"]').change(function() {
      alert("asda");
    });
    
    //Add pointer class to .photo .item
    $(".photo .item").addClass("pointer");

    //Hover over photo fade in hidden span
    $(".photo .item").hover(
        function() {
            $(this).find("span").fadeIn();
        },
        function() {
            $(this).find("span").fadeOut();
        }
    );
  
    //$("#ppy2").popeye();

    //Collapsible Panes
    //hide the all of the element with class msg_body
    $(".msg_body").hide();
    //toggle the componenet with class msg_body
    $(".msg_head").click(function(){
      $(this).next(".msg_body").slideToggle(600);
    });
    
  
    //Carousel
    $('.infiniteCarousel').infiniteCarousel();
  
    setInterval(function () {
      $('.infiniteCarousel').trigger('next');
    }, 2000);
  
  
  
    //jqtransform
    $(function(){
      $('form').jqTransform({imgPath:'/images/forms/'});
    });
  
  
    //Main page tab rotation
    $("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);  
  
    //LiveHelpNow Chat
  
    (function() {

    var lc_params = '';

    var lc_lang = 'en';

    var lc_skill = '0';

 

    var lc = document.createElement('script'); lc.type = 'text/javascript'; lc.async = true;

    var lc_src = ('https:' == document.location.protocol ? 'https://' : 'http://');

        lc_src += 'chat.livechatinc.net/licence/1041985/script.cgi?lang='+lc_lang+unescape('%26')+'groups='+lc_skill;

        lc_src += ((lc_params == '') ? '' : unescape('%26')+'params='+encodeURIComponent(encodeURIComponent(lc_params))); lc.src = lc_src;

    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s);

  })();

  
});


function popitup(url) {
  newwindow=window.open(url,'name','height=200,width=150');
  if (window.focus) {newwindow.focus()}
  return false;
}
  


