$(window).load(function() {
	$('#post-slider').nivoSlider({
		effect : 'sliceDown',
		controlNav : false,
		captionOpacity : 0.9,
		pauseOnHover : true,
		pauseTime: 10000
	});
});	
$(document).ready(function() {
	$("a#example1").fancybox();

	$("#sindica").fancybox({
		'modal' : false
	});
	$(".megamenu").megamenu({ 
		'justify' : 'left'
	});
	$('#foo1').carouFredSel({
		auto : {
			pauseOnHover: true
		},
		items: {
			visible: 3
		},
		prev : "#foo2_prev",
		next : "#foo2_next"
	});

	$('#reproductor').click(function() {
		nueva=window.open('/wp-content/themes/culiacan/externos/reproductor/radio-culiacan.html', 'popup','left=320, top=100, width=515, height=180', 'location=no');  
		return true; 
	});
	
	$('#canal').click(function() {
		nueva=window.open('/wp-content/themes/culiacan/externos/canal/tv.html', 'popup','left=320, top=100, width=500, height=315', 'location=no');  
		return true; 
	});
	
	$(".radioventana,#tvventana").fancybox({
		'hideOnContentClick': true
	});

	$("#programacioncompleta").fancybox({
		'width'				: 800,
		'height'			: 350,
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});
	
	
	$("#boletin").fancybox({
		'width'				: 500,
		'height'			: 235,
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});
	$("#chat").fancybox({
		'width'				: 500,
		'height'			: 235,
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});
	
	$("#convocatorias").fancybox({
		'width'				: 843,
		'height'			: 980,
		'titleShow'     : false,
		'autoScale': false,
		'onComplete': function() {
      $("#fancybox-wrap").css({'top':'20px', 'bottom':'auto'});
   }

	});
	
   $(".video").click(function() {
		$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'			: 640,
			'height'		: 385,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			'wmode'				: 'transparent',
			'allowfullscreen'	: 'true'
			}
		});

		return false;
	});

	$('#informe').click(function() {
		var left = (960 - screen.width) / 2;
		var top = (600 - screen.height) / 2;
		nueva=window.open('/wp-content/themes/culiacan/externos/informe/index.html', 'popup','left='+left+', top='+top+', width=960, height=600', 'location=no');  
		return true; 
	});
});
function recordOutboundLink(link, category, action) {
  try {
    var pageTracker=_gat._getTracker("UA-8014966-5");
    pageTracker._trackEvent(category, action);
    setTimeout('document.location = "' + link.href + '"', 100)
  }catch(err){}
}





