function ShowAllRelatedDocuments(iItemTypeID, iItemID, sLanguageCode)
{
	$.ajax({
		type: 'GET',
		url: '../main/fetch_related_documents.php?it=' + iItemTypeID + '&i=' + iItemID + '&l=' + sLanguageCode,
		success: function (response) {
			$('#related_docs').html(response);
		}
	});
}

function ShowAllOtherProducts(iItemTypeID, iItemID, sLanguageCode)
{
	$.ajax({
		type: 'GET',
		url: '../main/fetch_other_products.php?it=' + iItemTypeID + '&i=' + iItemID + '&l=' + sLanguageCode,
		success: function (response) {
			$('#other_products').html(response);
		}
	});
}

function ShowAllRelatedProducts(iItemID, sLanguageCode)
{
	$.ajax({
		type: 'GET',
		url: '../main/fetch_related_products.php?i=' + iItemID + '&l=' + sLanguageCode,
		success: function (response) {
			$('#related_products').html(response);
		}
	});
}

function ShowAllIndustryDocuments(iIndustryID, sLanguageCode)
{
	$.ajax({
		type: 'GET',
		url: '../main/fetch_industry_documents.php?in=' + iIndustryID + '&l=' + sLanguageCode,
		success: function (response) {
			$('#industry_docs').html(response);
		}
	});
}

function ShowAllIndustryProducts(iIndustryID, sLanguageCode)
{
	$.ajax({
		type: 'GET',
		url: '../main/fetch_industry_products.php?in=' + iIndustryID + '&l=' + sLanguageCode,
		success: function (response) {
			$('#industry_products').html(response);
		}
	});
}

jQuery.fn.hint = function (blurClass)
{
  if (!blurClass) { 
    blurClass = 'blur';
  }

  return this.each(function () {
    var $input = jQuery(this),

	title = $input.attr('title'),
	$form = jQuery(this.form),
	$win = jQuery(window);

    function remove() {
      if ($input.val() === title && $input.hasClass(blurClass)) {
        $input.val('').removeClass(blurClass);
      }
    }

    if (title) { 
      $input.blur(function () {
        if (this.value === '') {
          $input.val(title).addClass(blurClass);
        }
      }).focus(remove).blur(); // now change all inputs to title

      $form.submit(remove);
      $win.unload(remove);
    }
  });
};
