﻿// wait until document is fully scriptable
    jQuery(function() {
        // initialize content
	    cargarNoticiasControl("NoticiasItemsDiv", "/noticiasslider/noticias.xml");
    
	    // select #flowplanes and make it scrollable. use circular and navigator plugins
	    jQuery("#flowpanes").scrollable({ circular: true, mousewheel: true }).autoscroll({ autoplay: true, interval: 5000 }).navigator({
		    // select #flowtabs to be used as navigator
		    navi: "#flowtabs",
		    // select A tags inside the navigator to work as items (not direct children)
		    naviItem: 'a',
		    // assign "current" class name for the active A tag inside navigator
		    activeClass: 'current',
		    // make browser's back button work
		    history: true
	    });
    	
    });
    
    var noticiasXslFile = "/noticiasslider/noticias.xsl";
    function cargarNoticiasControl(control, xmlFile)
    {
        xml = loadXMLDoc(xmlFile);
        xsl = loadXMLDoc(noticiasXslFile);
        transform(xml, xsl, control);
    }
