/* Comenzi carusel newsticker start */

function mycarousel_initCallback(carousel)
	{
		// Disable autoscrolling if the user clicks the prev or next button.
		carousel.buttonNext.bind('click', function() {
			carousel.startAuto(0);
		});
	
		carousel.buttonPrev.bind('click', function() {
			carousel.startAuto(0);
		});
	
		// Pause autoscrolling if the user moves with the cursor over the clip.
		carousel.clip.hover(function() {
			carousel.stopAuto();
		}, function() {
			carousel.startAuto();
		});
	};
	
	jQuery(document).ready(function() {
		jQuery('#mycarousel').jcarousel({
			auto: 3,
			wrap: 'last',
			scroll:1,
			animation: 3000,
			initCallback: mycarousel_initCallback
		});
	});

/* Comenzi carusel newsticker end */


/* Comenzi jcarousel-skin-oneitem start */
function mycarousel_2_initCallback(carousel)
	{
		// Disable autoscrolling if the user clicks the prev or next button.
		carousel.buttonNext.bind('click', function() {
			carousel.startAuto(0);
		});
	
		carousel.buttonPrev.bind('click', function() {
			carousel.startAuto(0);
		});
	
		// Pause autoscrolling if the user moves with the cursor over the clip.
		carousel.clip.hover(function() {
			carousel.stopAuto();
		}, function() {
			carousel.startAuto();
		});
	};


jQuery(document).ready(function() {
    jQuery('#mycarousel_2').jcarousel({
			auto: 3,
			wrap: 'last',
			scroll: 1,
			animation: 3000,
			initCallback: mycarousel_2_initCallback
			});
});

/* Comenzi jcarousel-skin-oneitem end */


/* Comenzi jcarousel-skin-centerbig start */
function mycarousel_3_initCallback(carousel)
	{
		// Disable autoscrolling if the user clicks the prev or next button.
		carousel.buttonNext.bind('click', function() {
			carousel.startAuto(0);
		});
	
		carousel.buttonPrev.bind('click', function() {
			carousel.startAuto(0);
		});
	
		// Pause autoscrolling if the user moves with the cursor over the clip.
		carousel.clip.hover(function() {
			carousel.stopAuto();
		}, function() {
			carousel.startAuto();
		});
	};


jQuery(document).ready(function() {
    jQuery('#mycarousel_3').jcarousel({
			auto: 3,
			wrap: 'last',
			scroll: 1,
			animation: 3000,
			initCallback: mycarousel_3_initCallback
			});
});
/* Comenzi jcarousel-skin-centerbig end */


function mycarousel_4_initCallback(carousel)
	{
		// Disable autoscrolling if the user clicks the prev or next button.
		carousel.buttonNext.bind('click', function() {
			carousel.startAuto(0);
		});
	
		carousel.buttonPrev.bind('click', function() {
			carousel.startAuto(0);
		});
	
		// Pause autoscrolling if the user moves with the cursor over the clip.
		carousel.clip.hover(function() {
			carousel.stopAuto();
		}, function() {
			carousel.startAuto();
		});
	};


jQuery(document).ready(function() {
    jQuery('#mycarousel_4').jcarousel({
			auto: 3,
			wrap: 'last',
			scroll: 3,
			animation: 3000,
			initCallback: mycarousel_4_initCallback
			});
});



/* Menu slider start */
	
function initMenu() {
  $('#menu_slide ul').hide();
  //$('#menu ul:first').show();
  $('#menu_slide li a[class^="categ"]').click(
    function() {
		$('a.categ2').attr('class','categ1');
		$(this).attr('class','categ2');
      var checkElement = $(this).next();
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
		checkElement.slideToggle('normal');
		$(this).attr('class','categ1');
        return false;
        }
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('#menu_slide ul:visible').slideUp('normal');
        checkElement.slideDown('normal');
        return false;
        }
      }
    );
  }
$(document).ready(function() {initMenu();});

/* Menu slider end */


/*FORMULAR*/

function ask() { 
	var sw = 0;
	var mesaj = '';
	
	
	if ((document.getElementById('name_01').value.length == 0) && (sw==0)) {
		alert('Va rugam sa va introduceti numele! \n');
		sw = 1;
	}
	
			
	if (isEmail(document.getElementById('email_01').value) == false&& (sw==0)) {
		alert('Va rugam sa introduceti o adresa de email valida! \n');
		sw = 1;
	}
	

	if ((document.getElementById('question').value.length == 0) && (sw==0)) {
		alert('Va rugam sa scrieti mesajul! \n');
		sw = 1;
	}
	



			
	if (sw == 0) {
   window.location.href='/Util/SendEmail.aspx?redirect=http://houseofguides.ro/ro-ro/footer/contact-mesaj.aspx&from='+document.getElementById('email_01').value+'&to=office@houseofguides.ro&subiect=Contact%20HoG&mesaj=Nume: '+document.getElementById('name_01').value+'<br /> Email: '+document.getElementById('email_01').value+'<br /><br /> Mesaj: '+document.getElementById('question').value;
	}
} 





function validateInt(productId)
   {
      var o = document.getElementById('_cart_nr');
	  
	  
	
	  
	  document.getElementById('_cart_pid').value = productId;
	  
	  pageTracker._trackPageview('/adauga-in-cos-primul-produs');
		
	  document.forms[0].action="/ro-ro/cart.aspx";
	  document.forms[0].submit();
}


function validateIntSecond(productId)
   {
      var o = document.getElementById('_cart_nr');
	   
	  document.getElementById('_cart_pid').value = productId;
	  
	  pageTracker._trackPageview('/adauga-in-cos-produs-suplimentar');
		
	  document.forms[0].action="/ro-ro/cart.aspx";
	  document.forms[0].submit();
}







/*END*/
