/**************** Carousel Code ****************/
var mycarousel_itemList = [
    {href: 'http://www.negocios-marketing.com', url: 'othersLinksControl/images/NegociosMarketing.gif', title: 'Recursos web - Herramientas web', alt:'Negocios-Marketing'},
    {href: 'http://www.dominios-web.com', url: 'othersLinksControl/images/dominiosWeb.gif', title: 'Comprar Dominio - Dominios y Hospedaje', alt:'Dominios web'},
    {href: 'http://www.directorio-web.es', url: 'othersLinksControl/images/directorioWeb.gif', title: 'Directorio Empresarial - Directorio Web', alt:'Directorio web'},
    {href: 'http://www.buscalaweb.com.ar', url: 'othersLinksControl/images/buscasLaWeb.gif', title: 'Empresas Argentinas', alt:'Busca la web'},
    {href: 'http://www.buscasdeweb.com', url: 'othersLinksControl/images/buscasDeWeb.gif', title: 'Recursos y entretenimeinto', alt:'Buscas de web'},
    {href: 'http://www.paracuaro.org', url: 'othersLinksControl/images/Pacuaro.gif', title: 'Paracuaro Michoacan, Villa de los manantiales', alt:'Paracuaro Michoacan'},
    {href: 'http://www.bymsoft.com.ar', url: 'othersLinksControl/images/BymSoft.gif', title: 'Guia de Viajes', alt:'BymSoft'},
    {href: 'http://www.ganardinero.cc', url: 'othersLinksControl/images/Alta-url.png', title: 'Ganar Dinero', alt:'Alta-url'},
    {href: 'http://www.ibookings.es', url: 'othersLinksControl/images/iBookings.png', title: 'Hoteles Baratos', alt:'Hoteles Baratos'},
    {href: 'http://www.visitar.org/', url: 'othersLinksControl/images/visitarOrg.png', title: 'Qué visitar', alt:'Visitar.org'},
    {href: 'http://www.guiamoscow.es.tl/', url: 'othersLinksControl/images/guiasmoscow.jpg', title: 'Guia personal de turismo en Moscu', alt:'Guia personal de turismo en Moscu'},
    {href: 'http://www.costaricagreentrip.com/', url: 'othersLinksControl/images/CostaRicaGreenTrip.jpg', title: 'Costa Rica Green Trip', alt:'Costa Rica Green Trip'},
	{href: 'http://www.portal-seo.com/', url: 'othersLinksControl/images/firma_Portal-Seo.gif', title: 'Tutoriales SEO, herramientas SEO y foro SEO', alt:'Tutoriales SEO, herramientas SEO y foro SEO'},
	{href: 'http://www.paginas1.com/', url: 'othersLinksControl/images/alcuaderno.gif', title: 'Directorio de Paginas Web', alt:'Paginas Web 1'},
	{href: 'http://www.rutasyviajes.es/', url: 'othersLinksControl/images/Rutasyviajes.png', title: 'Rutas y Viajes .ES .NET', alt:'Rutas y Viajes .NET .ES Web con información detallada sobre rutas de senderismo, tracks y waypoints para GPS, además de viajes, utilidades, documentos, fotografías, etc.'},
	{href: 'http://www.tangol.com/eng/buenos_aires.aspx/', url: 'othersLinksControl/images/Tangol_160x70.gif', title: 'Tours and Travel in Argentina', alt:'Tours and Travel in Argentina'},
	{href: 'http://www.todoenlaces.com/2825/varios.html/', url: 'othersLinksControl/images/Variosagenciasdeviajes.png', title: 'Varios agencias de viajes', alt:'Varios agencias de viajes'},
	{href: 'http://www.vuelavia.com/', url: 'othersLinksControl/images/vuelavia.png', title: 'Líneas aéreas económicas', alt:'Líneas aéreas económicas'},
	{href: 'http://www.vaguemos.com/', url: 'othersLinksControl/images/vaguemos.png', title: 'Vaguemos Tours and Travel', alt:'- Reserva de Hoteles, Boletos de Avion, Tours, Traslados y Renta de Autos en todo MEXICO'},
	{href: 'http://www.destino-iguazu.com.ar/', url: 'othersLinksControl/images/iguazu.png', title: 'Guia de las Cataratas del Iguazú', alt:'Guia de las Cataratas del Iguazú'},
	{href: 'http://www.nuandalab.com/', url: 'othersLinksControl/images/LinksLab.png', title: 'Diseño de paginas web', alt:'Diseño web'},
	{href: 'http://www.discovercusco.com/', url: 'othersLinksControl/images/discovercusco.png', title: 'Discovercusco', alt:'Discovercusco'},
	{href: 'http://es.directoryweblink.com/', url: 'othersLinksControl/images/directoryweblink.png', title: 'Directorio de enlaces', alt:'Directorio de enlaces'},
	{href: 'http://www.balnearios.bz/ofertas/ofertas-semana-santa.php/', url: 'othersLinksControl/images/balnearios.gif', title: 'Ofertas Semana Santa', alt:'Ofertas Semana Santa'},
	{href: 'http://www.infolondres.es/', url: 'othersLinksControl/images/infolondres.png', title: 'Hoteles Londres', alt:'Reserva on line de hoteles en Londres'},
	{href: 'http://www.lanzarote.com/', url: 'othersLinksControl/images/logolanzacom02.jpg', title: 'Lanzarote', alt:'Lanzarote'},
	{href: 'http://www.tablon-inmobiliario.com/', url: 'othersLinksControl/images/Tablon.png', title: 'Tablon', alt:'Tablon'},
	{href: 'http://www.zonagratuita.com/', url: 'othersLinksControl/images/Boton88x31fdoBlancoZG.gif', title: 'zonagratuita', alt:'zonagratuita'},
	{href: 'http://www.thelivinglink.net/', url: 'othersLinksControl/images/thelivinglink.png', title: 'The Living Link Web Directory', alt:'The Living Link Web Directory'},
	{href: 'http://www.miriblack.com/', url: 'othersLinksControl/images/miriblack.png', title: 'MiriBlack Web Directory', alt:'MiriBlack Web Directory'},
	{href: 'http://www.freewebsitedirectory.com/', url: 'othersLinksControl/images/freewebsitedirectory.png', title: 'Free Website Directory', alt:'Free Website Directory'},
	{href: 'http://www.domaining.in/domains-for-sale/', url: 'othersLinksControl/images/domainingin.png', title: 'Domain name sales', alt:'Domain name sales'},
	{href: 'http://www.londovor.com/', url: 'othersLinksControl/images/londovor.png', title: 'Free Web Directory Londovor', alt:'Free Web Directory Londovor'},
	{href: 'http://www.directory.ldmstudio.com/', url: 'othersLinksControl/images/ldmstudio.png', title: 'Ldmstudio Directory', alt:'Ldmstudio Directory'},
	{href: 'http://www.theshoppings.com/', url: 'othersLinksControl/images/theshoppings.png', title: 'Free Web Directory - TheShoppings.Com', alt:'Free Web Directory - TheShoppings.Com'},
	{href: 'http://www.webtrafficgenie.com/', url: 'othersLinksControl/images/webtrafficgenie.png', title: 'WebTrafficGenie.com', alt:'WebTrafficGenie.com'},
	{href: 'http://www.dir-submission.com/', url: 'othersLinksControl/images/dir-submission.gif', title: 'Seo friendly directory', alt:'Seo friendly directory'},
	{href: 'http://www.123hitlinks.info/', url: 'othersLinksControl/images/123hitlinks.png', title: 'web directory', alt:'web directory'},
	{href: 'http://www.alistsites.com/', url: 'othersLinksControl/images/alistsites.png', title: 'A List Sites', alt:'A List Sites'},
	{href: 'http://www.thalesdirectory.com/', url: 'othersLinksControl/images/thalesdirectory.png', title: 'Thales Directory', alt:'Thales Directory'},
	{href: 'http://www.paraviajar.es/', url: 'othersLinksControl/images/paraviajar.png', title: 'ParaViajar', alt:'ParaViajar'},
	{href: 'http://www.directory-link.info/', url: 'othersLinksControl/images/DirectoryLink.png', title: 'Directory Link', alt:'Directory Link'},
	{href: 'http://www.xland.info/', url: 'othersLinksControl/images/xland.png', title: 'Xland Web Directory', alt:'Xland Web Directory'},
	{href: 'http://www.a-free-directory.info/', url: 'othersLinksControl/images/afreedirectory.png', title: 'A Free Directory', alt:'A Free Directory'},
	{href: 'http://directory.askbee.net/', url: 'othersLinksControl/images/askbee.png', title: 'Askbee directory', alt:'Askbee directory'},
	{href: 'http://www.monsterdirectory.com.ar/', url: 'othersLinksControl/images/monsterdirectory.png', title: 'Monster Directory', alt:'Monster Directory'},
	{href: 'http://www.linkdirectory.com.ar/', url: 'othersLinksControl/images/linkdirectory.png', title: 'Link Directory', alt:'Link Directory'},
	{href: 'http://www.fastdirectory.com.ar/', url: 'othersLinksControl/images/FastDirectory.png', title: 'FastDirectory', alt:'FastDirectory'},
	{href: 'http://www.exospy.com/', url: 'othersLinksControl/images/exoleft.gif', title: 'EXOspy.com - free web directory', alt:'EXOspy.com - free web directory'},
	{href: 'http://www.posicionatuweb.net/alta_en_buscadores.html/', url: 'othersLinksControl/images/posicionatuweb.png', title: 'Alta en Buscadores', alt:'Alta en Buscadores'}
];

function mycarousel_initCallback(carousel)
{
    // Pause autoscrolling if the user moves with the cursor over the clip.
	carousel.startAuto();
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });	
};

function mycarousel_itemVisibleInCallback(carousel, item, i, state, evt)
{
    // The index() method calculates the index from a
    // given index who is out of the actual item range.
	
    var idx = carousel.index(i, mycarousel_itemList.length);
    carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[idx - 1]));
};

function mycarousel_itemVisibleOutCallback(carousel, item, i, state, evt)
{
	carousel.startAuto();
    carousel.remove(i);
};

/**
 * Item html creation helper.
 */
function mycarousel_getItemHTML(item)
{
    return '<a target="_blank" href="' + item.href + '"><img src="' + item.url + '" width="140" height="52" title="' + item.title + '" alt="' + item.alt + '" /></a>';
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        wrap: 'circular',
		scroll: 1,
        auto: 2,
		animation: 500,
		initCallback: mycarousel_initCallback,
        itemVisibleInCallback: {onBeforeAnimation: mycarousel_itemVisibleInCallback},
        itemVisibleOutCallback: {onAfterAnimation: mycarousel_itemVisibleOutCallback}
    });
});
