
Galleria.loadTheme(base_url+'public/js/jquery/galleria/themes/classic/galleria.classic.js');

$(document).ready(function(){
	
	
	// TOOLTIP PLANTILLA
	$('table.plantilla tbody tr').each(function() {
		$(this).qtip({
			content: {
				text: 'Cargando...',
				url: 'persona/ajax_tooltip/',
				method: 'post',
				data: {
					id: $(this).attr('rel')
				}            
			},
			position: {
				target: 'mouse',
				corner: {
					target: 'bottomRight',
					tooltip: 'topLeft'
				},
			   adjust: { x: 30, y: -250 }
			},
			
			style: { 
				width: 650
			}
		});
	});
	$('table.plantilla tbody tr').click(function() {
		url = $(this).find('a').attr('href');
		document.location = base_url + url;
	});
		
	$('.lightbox').lightbox();
	 
	$('.galeria').galleria({
		width: 708,
		height:600,
		max_scale_ratio: 1,
		preload: 2,
		transition: 'fade'
	});
	
	$f("a.himno",  base_url+'public/js/flowplayer/flowplayer-3.2.5.swf', {

		plugins: {
			controls: {
				fullscreen: false,
				height: 20,
				autoHide: false
			}
		},
		clip: {
			autoPlay: false,
			// optional: when playback starts close the first audio playback
			onBeforeBegin: function () {
				// iterate over all players and stop them
				flowplayer("*").each(function () {
					this.stop();
				});
			}
		},
		onLoad: function() {
			// set volume to MAX!
			this.setVolume(100);
		}

	});
	
	$f("a.flowplayer", base_url+'public/js/flowplayer/flowplayer-3.2.5.swf', { 
		// The controlbar plugin is loaded by specifying it in the plugins section of the configuration. 
		plugins: { 

			// The controlbar is called "controls". By tweaking this, you can modify its look and feel 
			controls: { 
		 
				// location of the controlbar plugin 
				url: base_url+'public/js/flowplayer/flowplayer.controls-3.2.3.swf', 
				
				all:false,
				scrubber:true,
				play:true,
				mute:true,
				fullscreen:true,
				progressColor: '#6d9e6b',
				bufferColor: '#333333',
				autoHide: false,
		 
				 // custom colors 
				backgroundColor: "transparent",
				backgroundGradient: "none",
				sliderColor: '#FFFFFF',
				sliderBorder: '1.5px solid rgba(160,160,160,0.7)',
				volumeSliderColor: '#FFFFFF',
				volumeBorder: '1.5px solid rgba(160,160,160,0.7)',

				timeColor: '#ffffff',
				durationColor: '#535353',

				tooltipColor: 'rgba(255, 255, 255, 0.7)',
				tooltipTextColor: '#000000',
				
				// custom height 
				height: 30, 
				 
				// setup auto hide 
				autoHide: 'always',  
				hideDelay: 1000,
						
				tooltips:  { 
					// a shortcut for enabling tooltips for buttons (English) 
					buttons: false
				} 
		 
			}
					
		}
	});
	
	/*var seccion = document.location.pathname.substring(4,8);
	if( seccion == ""){ seccion = "noti"}
	$("#menu").flashembed(
		{ 
		src: base_url+'public/flash/menu.swf?seccion='+menu_main+'&base_url='+base_url, 
		width: 980,
		height: 40,
		wmode: 'transparent'
		}
	);
	*/
	
	$('#patrocinadores').cycle({ 
		fx: 'fade', 
		speed: 1500,
		delay: -1500
	});
	

});


