yd = YAHOO.util;
$ = function(id){return document.getElementById(id);}
var Site = {
	
	//shortcuts
	h:document.location.host,
	p:document.location.protocol,
	ie:yd.Event.isIE,	
	
	//musca y video
	actualSong:undefined,

	showVideo:function(show, hide){
		yd.Dom.removeClass(show, 'none');
		yd.Dom.addClass(hide, 'none');
		yd.Dom.addClass('vBuke', 'none');		
	},
	
	select:function(el){
		//debugger;
		if(el.value!='Medios' && el.value!='Empresarios'){
			
			var selects = yd.Dom.getElementsByClassName('medios', 'p', 'formContact')
			yd.Dom.addClass(selects, 'none');
			
		}else{
			var selects = yd.Dom.getElementsByClassName('medios', 'p', 'formContact')
			yd.Dom.removeClass(selects, 'none');
			
		}
	},
	
	popup:function(url, width, height){
		var wnd = window.open(url, 'Browser', 'status=no, modal=yes, width='+width+', height='+height);
	},
	
	playSong:function (el)
	{
		if(this.actualSong!=undefined){
			if(!this.ie){
				yd.Dom.removeClass('play_'+this.actualSong, 'none');
			 	yd.Dom.addClass('swf_'+this.actualSong, 'none');				
			}
		}
		
		this.actualSong = el.parentNode.id.substr(el.parentNode.id.lastIndexOf('_')+1);

		yd.Dom.addClass('play_'+this.actualSong, 'none');
		yd.Dom.removeClass('swf_'+this.actualSong, 'none');			
	},
	
	onImg:function(el){
		el.src = this.p+'//'+this.h+'/img/playOn.jpg';
	},
	
	offImg:function(el){
		el.src = this.p+'//'+this.h+'/img/playOff.jpg';
	}	
		
}