jQuery(document).ready(

	/*
	This function gets loaded when all the HTML, not including the portlets, is
	loaded.
	*/

	function() {
        if(typeof sIFR == "function"){

        // This is the preferred "named argument" syntax
            var swf = Liferay.ThemeDisplay.getPathThemeImages() + "/sifr/sifr.swf";

            //sIFR.replaceElement(named({sSelector:"body h1", sFlashSrc:swf, sColor:"#000000", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:20, nPaddingBottom:20, sFlashVars:"textalign=center&offsetTop=6"}));
            sIFR.replaceElement(named({sSelector:".portlet-title", sFlashSrc:swf, sColor:"#7cc34d", sBgColor:"#FFFFFF", sWmode: "transparent"}));
        }
    }
);

Liferay.Portlet.ready(

	/*
	This function gets loaded after each and every portlet on the page.

	portletId: the current portlet's id
	jQueryObj: the jQuery wrapped object of the current portlet
	*/

	function(portletId, jQueryObj) {
	
	        if(typeof sIFR == "function" && portletId.indexOf("NOTICIAS_RSS") == 0){
	
	        // This is the preferred "named argument" syntax
	            var swf = Liferay.ThemeDisplay.getPathThemeImages() + "/sifr/sifr.swf";
	
	            //sIFR.replaceElement(named({sSelector:"body h1", sFlashSrc:swf, sColor:"#000000", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:20, nPaddingBottom:20, sFlashVars:"textalign=center&offsetTop=6"}));
	            sIFR.replaceElement(named({sSelector:".portlet-title", sFlashSrc:swf, sColor:"#7cc34d", sBgColor:"#FFFFFF", sWmode: "transparent"}));
	        }
	}
);

jQuery(document).last(

	/*
	This function gets loaded when everything, including the portlets, is on
	the page.
	*/

	function() {
	}
);