jQuery.noConflict(); var Logger = function() { this.debug = function(object) { if ( window.console && window.console.debug ) { window.console.debug(object); } } } var logger = new Logger(); jQuery(document).ready(function() { jQuery("li2.sub-menu").hover( function() { jQuery("ul", this).show(); }, function() { jQuery("ul", this).hide(); } ); jQuery.fn.hoverClass = function(c) { return this.each(function(){ jQuery(this).hover( function() { jQuery(this).addClass(c); }, function() { jQuery(this).removeClass(c); } ); }); }; if (document.all) { jQuery("#nav-one li").hoverClass("sub-menu-hover"); } // -- Textareas para FCKeditor jQuery("textarea._fckeditor").each(function(index){ var $this = jQuery(this), oFCKeditor = new FCKeditor( $this.attr("id"), 800, 700 ) ; oFCKeditor.BasePath = "/js/fckeditor/" ; oFCKeditor.Config["CustomConfigurationsPath"] = '/js/fck_config.js?' + ( new Date() * 1 ) ; oFCKeditor.ReplaceTextarea() ; }); jQuery("input.imagePicker").each(function(index) { var $this = jQuery(this), $button = jQuery(''); $button.val('Seleccionar Imagen...'); $button.bind('click', BrowseServer ); $button.data('relatedField', $this ); $this.parent().append($button); }); }); function ckFinderSelectFunction(fileUrl, data) { jQuery("#" + data.selectFunctionData).val(fileUrl); } function BrowseServer() { var $button = jQuery(this), $inputField = $button.data("relatedField"), $finder = new CKFinder(); $finder.BasePath = '/ckfinder/'; $finder.SelectFunction = ckFinderSelectFunction; $finder.SelectFunctionData = $inputField.attr("id"); $finder.Popup(); }