contains = function (input, arrayData) {
           for (i=0; i<arrayData.length; i++) {
             if (arrayData[i] == input) {return true;}
           }
           return false;
           };


jQuery.fn.attrList = function( strAttribute, strDelimiter ){
			// Create an array to store the attribute values of
			// the jQuery stack items.
			var arrValues = new Array();
 
			// Check to see if we were given a delimiter.
			// By default, we will use the comma.
			strDelimiter = (strDelimiter ? strDelimiter : ",");
 
			// Loop over each element in the jQuery stack and
			// add the given attribute to the value array.
			this.each(
				function( intI ){
					// Get a jQuery version of the current
					// stack element.
					var jNode = jQuery( this );
 
					// Add the given attribute value to our
					// values array.
					arrValues[ arrValues.length ] = jNode.attr(
						strAttribute
						);
 
				}
				);
 
			// Return the value list by joining the array.
			return(
				arrValues.join( strDelimiter )
				);
		}
		
// FULL FLY:
		jQuery.fn.hoverfullfly= function(){
			// Loop 
			this.each(
				function( intI ){
				        // Generar una instancia.
				        var jNode = jQuery( this );
                var titulo = jNode.attr("title");
                
                var print = function(){
                               jNode.append("<span class='centrado'>"+titulo+"</span>");
                }

					      var reset = function(){
                               jNode.bind('mouseover', sube);
					      }

			          var sube = function(){
                               jNode.unbind().bind('mouseout', sale ).dequeue().stop().animate({"top":"-20px","opacity": "1"}, 100, "linear", print);
                }	

			          var sale = function(){                 
                               jNode.dequeue().stop().animate({"top":"0px","opacity": ".75"}, 150, "linear", reset);
                               jNode.unbind().bind('mouseover',sube);
                               jNode.children("span").remove();                   
			       }

					   // ejecuta al inicio
					   jNode.bind('mouseenter',sube);
				}

				);

			// FIN: each()

			// Encadenamiento
			return( this );
		}
		
// FLY:
		jQuery.fn.hoverfly= function(){
			// Loop 
			this.each(
				function( intI ){
				        // Generar una instancia.
				        var jNode = jQuery( this );

					      var reset = function(){
                               jNode.bind('mouseover', sube);
					      }

			          var sube = function(){
                               jNode.unbind().bind('mouseout', sale ).dequeue().stop().animate({"top":"-20px","opacity": "1"}, 100, "linear");
                }	

			          var sale = function(){                 
                               jNode.dequeue().stop().animate({"top":"0px","opacity": ".75"}, 150, "linear", reset);
                               jNode.unbind().bind('mouseover',sube);                
			       }
					   // ejecuta al inicio
					   jNode.bind('mouseenter',sube);
				}
				);

			// FIN: each()

			// Encadenamiento
			return( this );
		}


// MEZCLA DE FONDOS
// <div class="xxx"> (este div debe tener el fondo a mezclar)
// <span>hey</span>
// </div> 
 
		jQuery.fn.hovermerger= function(){

			// Loop 
			this.each(
				function( intI ){
				     // Generar una instancia.
			       var jNode = jQuery( this );
             var bgurl =  jNode.css("background-image");
             var bgheight = jNode.css("height");
             var bgdiv = jQuery("<div>").attr('class','bgmerge');
             bgdiv.css({ position:"absolute",top:"0",backgroundImage:bgurl,width:"100%",height:bgheight,backgroundPosition:"0 -"+bgheight,opacity:"0"});
             var handler = jNode.children(":first");
             handler.css({lineHeight:bgheight,textAlign:"center",position:"absolute",zIndex:"10",width:"100%"}) ;
             jNode.append( bgdiv );

		         var reset = function(){
                               handler.bind('mouseenter', sube);
  		       }

			      var sube = function(){
                               handler.unbind().bind('mouseout', sale );
                               bgdiv.dequeue().stop().animate({"opacity": "1"}, 100, "linear");                      
			       }	
			       var sale = function(){
                               bgdiv.stop().animate({"opacity": "0"}, 500, "linear", reset);
                               handler.unbind().bind('mouseenter',sube);
			       }

			       // ejecuta al inicio
			       handler.bind('mouseenter',sube);
			       }

				);

			// FIN: each()

			// Encadenamiento
			return( this );

		}
		
// MENU ACORDION
// <div class="xxx"> 
// texto
// </div> 
 
		jQuery.fn.hoveraccordion= function(){

			// Loop 
			this.each(
				function( intI ){
				     // Generar una instancia.
			       var jNode = jQuery( this );

		         var reset = function(){
                               jNode.bind('mouseenter', sube);
  		       }

			       var sube = function(){
                               jNode.unbind().bind('mouseout', sale );
                               jNode.dequeue().stop().animate({backgroundColor: "#101010"}, 100, "linear");                      
			       }	
			       var sale = function(){
                               jNode.stop().animate({backgroundColor: "#000"}, 50, "linear", reset);
                               jNode.unbind().bind('mouseenter',sube);
			       }

			       // ejecuta al inicio
			       jNode.bind('mouseenter',sube);
			       }

				);

			// FIN: each()

			// Encadenamiento
			return( this );

		}
		
		
		
		// OPACITY IMG NAVS
    // <img class="xxx"> 

 
		jQuery.fn.hoveropacity= function(){

			// Loop 
			this.each(
				function( intI ){
				     // Generar una instancia.
			       var jNode = jQuery( this );
		         var reset = function(){
                               jNode.bind('mouseenter', sube);
  		       }

			       var sube = function(){
                               jNode.unbind().bind('mouseout', sale );
                               jNode.dequeue().stop().animate({"opacity": "1"}, 100, "linear");                      
			       }	
			       var sale = function(){
                               jNode.stop().animate({"opacity": ".5"}, 500, "linear", reset);
                               jNode.unbind().bind('mouseenter',sube);
			       }

			       // ejecuta al inicio
			       jNode.bind('mouseenter',sube);
			       jNode.animate({"opacity": ".5"}, 500, "linear", reset);
			       }

				);

			// FIN: each()

			// Encadenamiento
			return( this );

		}
		
		
		
		
		
		
		
// LINKS ILUMINADOS
 
		jQuery.fn.hoverlinks= function(){

			// Loop 
			this.each(
				function( intI ){
				     // Generar una instancia.
			       var jNode = jQuery( this );

		         var reset = function(){
                               jNode.bind('mouseenter', sube);
  		       }

			       var sube = function(){
                               jNode.unbind().bind('mouseout', sale );
                               jNode.dequeue().stop().animate({backgroundColor: "#FF9C08", color:"#000"}, 100, "linear");                      
			       }	
			       var sale = function(){
                               jNode.stop().animate({backgroundColor: "#000", color: "#fff"}, 500, "linear", reset);
                               jNode.unbind().bind('mouseenter',sube);
			       }

			       // ejecuta al inicio
			       jNode.bind('mouseenter',sube);
			       }

				);

			// FIN: each()

			// Encadenamiento
			return( this );

		}


// LINKS OJOS DE PEZ
 
		jQuery.fn.fishlinks= function(options){
    options = jQuery.extend({
    maxSize : "25px"
    }, options);


			// Loop 
			this.each(
				function(){
				     // Generar una instancia.
			       var jNode = jQuery( this );

		         var reset = function(){
                               jNode.bind('mouseenter', sube);
  		       }

			       var sube = function(){
                               jNode.unbind().bind('mouseout', sale );
                               jNode.dequeue().stop().animate({fontSize: options.maxSize}, 100, "linear");                      
			       }	
			       var sale = function(){
                               jNode.stop().animate({fontSize: "11px"}, 500, "linear", reset);
                               jNode.unbind().bind('mouseenter',sube);
			       }

			       // ejecuta al inicio
			       jNode.bind('mouseenter',sube);
			       }

				);

			// FIN: each()

			// Encadenamiento
			return( this );

		}


// MEZCLA DE FONDOS
// <div class="xxx"> (este div debe tener el fondo a mezclar)
// <span>hey</span>
// </div> 
 
		jQuery.fn.hoverbuttons= function(){

			// Loop 
			this.each(
				function( intI ){
				     // Generar una instancia.
			       var jNode = jQuery( this );
             var bgurl =  jNode.css("background-image"); 
             var temp = bgurl.substring(0,bgurl.length-6);
             bgurl = temp + '-on.png)'
             var bgheight = jNode.css("height");
             var bgwidth = jNode.css("width");
             var bgdiv = jQuery("<div>").attr('class','bgmerge');
             bgdiv.css({position:"absolute",top:"0",backgroundImage:bgurl,height:bgheight,width:bgwidth,opacity:"0"});
             jNode.append( bgdiv );

		         var reset = function(){
                               jNode.bind('mouseenter', sube);
  		       }

			      var sube = function(){
                               jNode.unbind().bind('mouseout', sale );
                               bgdiv.dequeue().stop().animate({"opacity": "1"}, 100, "linear");                      
			       }	
			       var sale = function(){
                               bgdiv.stop().animate({"opacity": "0"}, 500, "linear", reset);
                               jNode.unbind().bind('mouseenter',sube);
			       }

			       // ejecuta al inicio
			       jNode.bind('mouseenter',sube);
			       }

				);

			// FIN: each()

			// Encadenamiento
			return( this );

		}

