/*
	codigo en plantilla jquery
*/

var $seeal = jQuery.noConflict();
$seeal(document).ready(function(){ 
	
        $seeal("ul.sf-menu").supersubs({ 
            minWidth:    12,   // minimum width of sub-menus in em units 
            maxWidth:    27,   // maximum width of sub-menus in em units 
            extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
                               // due to slight rounding differences and font-family 
        }).superfish();
		
		//iguala la altura de las columnas 
		$seeal('#content #primary,#content #secondary').equalHeight();
		
		//*variables globales*/
		var emailProtegido = '.emailprotegido';
		/*fin de variables globales*/
		$seeal(emailProtegido).hover(function(){
			$seeal(emailProtegido).attr('href','mailto:marketing@brildor.com');
			}, function(){
			$seeal(emailProtegido).attr('href','');
		 });
		//####TRADUCTOR MENU################
		//################################
		$seeal.translate(function(){  //when the Google Language API is loaded 
		function translateTo( destLang ){ //this can be declared in the global scope too if you need it somewhere else 
			$seeal('body').translate( 'Spanish', destLang, {   //translate from english to the selected language 
			  not: '.jq-translate-ui',  //by default the generated element has this className 
			  fromOriginal:true   //always translate from english (even after the page has been translated) 
			}); 
		} 
		$seeal('li.listado_idiomas a')
		  .click(function(){   //when selecting another language 
		   
			translateTo( $seeal(this).attr("title") ); 
			 
			$seeal.cookie('destLang', $seeal(this).attr("title") );  
			// set a cookie to remember the selected language 
			// see: http://plugins.jquery.com/project/Cookie 
			 
			return false; //prevent default browser action 
		  })
				
/* 		//you can generate other controls as well, not just a dropdown: 
		$seeal.translate.ui('ul', 'li', 'span')   
		  .appendTo('body')    //insert the element to the page 
		  .css({'color':'blue', 'background-color':'white'}) 
		  .find('span') 
		  .css('cursor','pointer') 
		  .click(function(){   //when selecting another language 
		   
			translateTo( $seeal(this).text() ); 
			 
			$seeal.cookie('destLang', $seeal(this).text() );  
			// set a cookie to remember the selected language 
			// see: http://plugins.jquery.com/project/Cookie 
			 
			return false; //prevent default browser action 
		  }) */
		  
		var destLang = $seeal.cookie('destLang'); //get previously translated language 
		if( destLang )  //if it was set then 
			translateTo( destLang ); 
	  }); //end of Google Language API loaded 
	  
	  //lightbox en jqeury
	  $seeal("a[rel^='prettyPhoto']").prettyPhoto({
				animationSpeed: 'normal', /* fast/slow/normal */
				padding: 40, /* padding for each side of the picture */
				opacity: 0, /* Value betwee 0 and 1 */
				showTitle: true, /* true/false */
				allowresize: true, /* true/false */
				counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
				theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
				callback: function(){}
			});
	// comentar wp-poll
	var ruta = $seeal('#comentar-encuesta').attr('href');
	
}); 