// JavaScript Document
$(document).ready(function(){       
// BROWSER Detection //						   
var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);

// Using browser detection to disable the jQuery Blend effect on the main menu in IE6 and Opera - z-index issues //

	String.prototype.linkify = function() {
		return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+/, function(m) {
			return m.link(m);
		});
	};
function ticker_tweets() {
	$("#wrap_tweets").jCarouselLite({
		vertical: true,
		hoverPause:true,
		visible:1,
		auto:2000,
		speed:1000
	});
};

function activities() {
	$("#generalactivities").jCarouselLite({
		vertical: true,
		hoverPause:true,
		visible:15,
		auto:2000,
		speed:1000
	});
};
activities();
$.getJSON('http://search.twitter.com/search.json?q=yonococino&callback=?', function(data){
		$.each(data.results, function(i, item){
			$('#ticker_tweets').append("<li class='tweet'><a href='http://twitter.com/" + item.from_user + "' target='_blank'><img src='" + item.profile_image_url + "' alt='TW' width='48' height='48' align='left'></a><p>" + item.text.linkify() + "</p></li>");
			if ( i == 10 ) return false;

		});
		ticker_tweets();
	});

$("a#enlace_legal, a#enlace_promover,a#enlace_opinion").fancybox({
	'overlayShow'			: false,
	'hideOnContentClick'    : false,
	'frameWidth'			: 600,
	'frameHeight'			: 400,
	'zoomSpeedIn'			: 600,
	'zoomSpeedOut'			: 500,
	'easingIn'				: 'easeOutBack',
	'easingOut'				: 'easeInBack'
});

});

