$(document).ready(function () {
	

	$('.cart_remove').live('click', function () {
		if (!confirm('Are you sure you want to delete this product ?')) {
			return false;
		}
		$(this).removeClass('cart_remove').addClass('cart_remove_loading');
		$.ajax({
			type: 'post',
			url: 'index.php?route=module/cart/callback',
			dataType: 'html',
			data: 'remove=' + this.id,
			success: function (html) {
				$('#module_cart .holder').html(html);
				if (getUrlParam('route').indexOf('checkout') != -1) {
					window.location.reload();
				}
			}
		});
	});
        
        $('#popup').jqm();

       //

        $(".product-list li").hover(
              function () {

                   $('#product_id').replaceWith('<input type="hidden" name="product_id" \n\
                                 id="product_id" value='+ $(this).attr('title') +'  />');

                   var product = $(this).find('.clone').clone();
                   $('#product-clo').empty().append(product);

              }
        );

$('#faqfade').innerfade({
    animationtype: 'slide',
    speed: 750,
    timeout: 9000,
    containerheight: '220px' ,
    type: 'random' });




		//$("#proffesional").hide();

});

function getChooseCountry(){
	
	var urlNow = window.location.href
	if(urlNow=='http://www.blixz.com.au/'){
		$.colorbox({width:"30%", inline:true, href:"#country"});

	}
	//$('#country').jqm();
	
}

function getUrlParam(name) {
  var name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp(regexS);
  var results = regex.exec(window.location.href);
  if (results == null)
    return "";
  else
    return results[1];
}

function getBox(){
	if($('#typeA').val()=="professional")
	{
		$("#professional").css("display", "block");			
	}else{
		$("#professional").css("display", "none");	
	}
}
