/*### INICIALIZAR ###*/
var $count = 1;
var $a_patro_height = new Array();
var $a_patro_posy = new Array();
$a_patro_height = ["150","188","160","78"];
$a_patro_posy = ["0","150","338","498"];
function CallAjax( $page ){ //alert( $page )
	_gaq.push(['_trackPageview', $page]);
}
function Patrocinadores() {
	var navegador = navigator.appName
	if (navegador == "Microsoft Internet Explorer"){ //Si es un Eplorador IE
		$("#patrocinadores .image").hide();
		$("#patrocinadores .image").css("background-position", "0px -"+ $a_patro_posy[$count] +"px" );
		$("#patrocinadores .image").css("height", $a_patro_height[$count] +"px" );
		$("#patrocinadores .image").show();
		$count = ( $count >= 3 ) ? 0 : $count+1;
	}else{ // Todos los demas
		$("#patrocinadores .image").fadeOut( 500, function() {
			$("#patrocinadores .image").css("background-position", "0px -"+ $a_patro_posy[$count] +"px" );
			$("#patrocinadores .image").css("height", $a_patro_height[$count] +"px" );
			$("#patrocinadores .image").delay(200).fadeIn( 1500, function(){
				$count = ( $count >= 3 ) ? 0 : $count+1;
			} );
			
		});	
	}
}
function Build( $type ){ //alert("hello");
	$("a[rel^='prettyPhoto']").prettyPhoto({
			animationSpeed: 'normal', /* fast/slow/normal */
			opacity: 0.90, /* Value between 0 and 1 */
			showTitle: false, /* true/false */
			allowresize: false, /* true/false */
			default_width: 820,
			default_height: 604,
			counter_separator_label: ' / ', /* The separator for the gallery counter 1 "of" 2 */
			theme: 'light_square' /* light_rounded / dark_rounded / light_square / dark_square / facebook */
		});
	if( $type == "page" ){ //alert($type);
		setInterval("Patrocinadores()",4000);
	}
	return;
	$('#acces-main').slideUp("fast");
	$('.button.close').click(function(event){ //alert(this);
		$('#acces-main').slideUp("slow");
	});
	$('.button.open').click(function(event){ //alert(this);
		$('#acces-main').slideDown("slow");
	});
	
	//-- Boton Boletos --//
	$('.button.tickets').click(function(event){ //alert(this);
		//pageTracker._trackPageview("/adquiere-tu-boleto.html");
		$('#dialog-user').dialog('open');
	});
	//- block user add/edit/del
	$('#dialog-user').dialog({
		bgiframe: true, autoOpen: false, width:796, height:490, modal:true, resizable:false, draggable:false,
		open: function(event, ui) { var $URL = "v2010/popTickets.html"; 
			$("#dialog-user .dialog-content").empty();
			$.ajax({ url: $URL,
				success: function(html_input){
					$("#dialog-user .dialog-content").html(html_input);
				}
			});
		},
		buttons: {
				'cerrar x': function() {
					$(this).dialog('close');
				}
			},
		close: function() {
			$("#dialog-user .dialog-content").empty();
		}
	});
	//--aplicamos estilos css al boton cancelar
	$(".ui-dialog-buttonpane button:contains('cerrar x')").css({'background' : '#4B271C', 'color' : '#FFFFCC', 'border' : 'none' });
	$(".ui-dialog-buttonpane button:contains('cerrar x')").hover(
		function () { $(this).css({'background' : '#733A2B'}); }, 
		function () { $(this).css({'background' : '#4B271C'}); }
	);
}
