// JavaScript Document

//GET TAG NAME OF AN JQUERY OBJECT
(function($){ 
$.fn.tagName = function() {	return this.get(0).tagName;	}
})(jQuery);  


//FOCUS AND BLUR INPUTS
  (function($){ 
		$.fn.focusBlurInputs = function(){
			inputs=$(this).filter('input[type=text],input[type=password]');;
			
			 return this.each(function(i,item){
					
					input=$(item);
					
					title=input.attr('title');
					
					input.focus(function(){
						input=$(this);
						title=input.attr('title');				 
						value=input.attr('value');
						if(value==title)
						input.attr('value','');				   
					});
					
					input.blur(function(){
						input=$(this);
						title=input.attr('title');	
						value=input.attr('value');
						if(value=='')
						input.attr('value',title);				   
					});
					
					
			 });
		}
			
	})(jQuery);  
  
  
  
	//ODD EVEN
  (function($){ 
		$.fn.oddEven = function(){
			group=$(this);
			odd_items=group.filter(':odd');
			even_items=group.filter(':even');
			
			odd_items.addClass('odd');
			even_items.addClass('even');
			return $(this);
		}
			
	})(jQuery);
  
  //equalHeights
 (function($){ 
	$.fn.equalHeights = function(options) {	
		var defaultOptions={children:null,min_height:300}
		var options=$.extend(defaultOptions,options);
		var $group=$(this);
		var height=options.min_height;
		$group.each(function(i){
					 
			if($(this).height()>height)
					height=$(this).height();
			
		});
		
		
		if(options.children){
			$group.find(options.children).css({minHeight:height});
			 if (!window.XMLHttpRequest)
				  	$group.find(options.children).css({height:height});
		}
		else{
			
		$group.each(function(){
			
				$(this).css({minHeight:height});	
				  if (!window.XMLHttpRequest)
				  	$(this).css({height:height});	
						
				  
				});
		}
	
	}
	})(jQuery);  

  //////////////////////////////////////////////////////////////IE 6 PLUGINS
   if (!window.XMLHttpRequest) {
	/*   
	(function($){ 
		$.fn.ie6Hover = function(){
			group=$(this);
			
			return group.each(function(index,item){
				
				$(this).hover(function(){$(this).addClass('hover');}
						,function(){$(this).removeClass('hover');}
						);
									   
			 });
			
		}
			
	})(jQuery); */
	   
	   
	   
	
	   
	   
   }
  /////////////////////////////////////////////////////////END IE 6 PLUGINS