
$(document).ready(function(){
   
	
	//$("#edit-search-block-form-keys").val("Digite e tecle Enter").oneclick(function(){
	  //  $(this).val("");
  	//});
  	
  	//$("#webform-client-form-321").each(function(){
	  //  $("#edit-submitbutton").val("Submit");
  	//});
  	
  
   $(".view-data-node-data-field-imagem-field-imagem-fid").find("img").each(function(i) {
  		var str = $(this).title();
  		var url = str.replace(/_p/,"_g");
		var final = "http://www.datacom.ind.br/new/files/"+url;
		$(this).css("cursor","pointer");
		$(this).click(function(){
			var t = this.title || this.name || null;
  			var g = this.rel || false;
  			TB_show(t,final,g);
  			this.blur();
		})
	});

   $(".field-field-imagem").find("img").each(function(i) {
  		var str = $(this).title();
  		var url = str.replace(/_p/,"_g");
		var final = "http://www.datacom.ind.br/new/files/"+url;
		$(this).css("cursor","pointer");
		$(this).click(function(){
			var t = this.title || this.name || null;
  			var g = this.rel || false;
  			TB_show(t,final,g);
  			this.blur();
		})
	});
	
		
	
	$(".view-data-node-data-field-imagem-field-imagem-fid").each(function(u) {
		var hei1 = $(this).find("img").height();
		var hei2 = $(this).height();
		var marg = (hei2-hei1)/2;
		//alert (hei1+'px');
			$(this).find("img").css("margin-top", marg+"px");
		
	});
	$(".view-data-node-data-field-imagem-solucoes-field-imagem-solucoes-fid").each(function(u) {
		var hei1 = $(this).find("img").height();
		var hei2 = $(this).height();
		var marg = (hei2-hei1)/2;
		//alert (hei1+'px');
			$(this).find("img").css("margin-top", marg+"px");
		
	});
	$(".field-field-imagem").each(function(u) {
		var hei1 = $(this).find("img").height();
		var hei2 = $(this).height();
		var marg = (hei2-hei1)/2;
		//alert (marg+'px');
			$(this).find("img").css("margin-top", marg+"px");
		
	});

	$(".view-data-node-data-field-marcar-como-novo-para-hom-field-marcar-como-novo-para-hom-value").each(function() {
		if ($(this).is(":contains('Sim')")) {
			 $(this).addClass("marcado");
     		 }
		
	});	
	
	 $(".pagina-produtos ul li").each(function(i) {
       var valor = "'"+$(this).find("a").attr("href")+"'";    
       $(this).find("img").wrap("<a href="+valor+"></a>");
   });
   
   $(".view-Featured-Products ul li").each(function(i) {
       var valor = "'"+$(this).find("a").attr("href")+"'";    
       $(this).find(".view-data-node-data-field-english-title-field-english-title-value").wrap("<a href="+valor+"></a>");
   });

 $(".view-Ultimos-Productos ul li").each(function(i) {
       var valor = "'"+$(this).find("a").attr("href")+"'";    
       $(this).find(".view-data-node-data-field-ttulo-em-espanhol-field-ttulo-em-espanhol-value").wrap("<a href="+valor+"></a>");
   });


})


