/**
 * @package WordPress
 */

jQuery(document).ready(function(){
	// ---------------- fix hover for IE 6 -------------------->
	jQuery('.hover-class').mouseover(function(){
		jQuery(this).addClass('hover');
	});
	jQuery('.hover-class').mouseout(function(){
		jQuery(this).removeClass('hover');
	});
	jQuery('.child-class:last-child').addClass('last-child');
	jQuery('.child-class:first-child').addClass('first-child');
	
	// ------------------ auto clear fields --------------------
	jQuery('.auto-clear').clearField();
	
	
	
	jQuery('iframe#gadget').load(function() { 
		alert(jQuery('iframe#gadget').attr('src'));
		
		
		jQuery('head', jQuery('iframe#gadget')).attr('class', 'some');

	});
	
	jQuery('iframe#gadget');
	
	// ------------------ Ajax newsletter --------------------
	count=2;
	jQuery('.sign_up_cloud').click(function(){
		count++;
		if(!(count%2)) {
			jQuery('.sign_up').animate({"top": "-=85px"}, "slow");
		} else {
			jQuery('.sign_up').animate({"top": "+=85px"}, "slow");
		}
		return false;
	});
	
	// ------------------ Wrap input --------------------
	
	jQuery('input').each(function () {
	type=jQuery(this).attr("type");
		if(type=='text') jQuery(this).wrap("<p></p>");
	});
	jQuery('textarea').wrap("<p></p>");
});
