jQuery(function() {
	var searchform = jQuery('#searchform');
	
	/*
	jQuery('#searchform #s').change(function(){
		var s = jQuery(this).val();
		jQuery('#searchform .searchbox').val('')
		searchform.attr('action', searchform.attr('action')+'tag/'+s);
	});
	*/
	
	jQuery('#previous_post_link').hover(
		function () {
			jQuery(this).attr('src', jQuery(this).attr('src').replace('arrow_left.png', 'arrow_left_hover.png'));
		},
		function () {
			jQuery(this).attr('src', jQuery(this).attr('src').replace('arrow_left_hover.png', 'arrow_left.png'));
		}
	);
	
	jQuery('#next_post_link').hover(
		function () {
			jQuery(this).attr('src', jQuery(this).attr('src').replace('arrow_right.png', 'arrow_right_hover.png'));
		},
		function () {
			jQuery(this).attr('src', jQuery(this).attr('src').replace('arrow_right_hover.png', 'arrow_right.png'));
		}
	);
	
	jQuery('#botton_rss').hover(
		function () {
			var img = jQuery(this).find('img');
			jQuery(this).attr('target', '_blank');
			img.attr('src', img.attr('src').replace('rss.png', 'rss_hover.png'));
		},
		function () {
			var img = jQuery(this).find('img');
			img.attr('src', img.attr('src').replace('rss_hover.png', 'rss.png'));
		}
	);
	
	jQuery('#botton_facebook').hover(
		function () {
			var img = jQuery(this).find('img');
			jQuery(this).attr('target', '_blank');
			img.attr('src', img.attr('src').replace('feiss.png', 'feiss_hover.png'));
		},
		function () {
			var img = jQuery(this).find('img');
			img.attr('src', img.attr('src').replace('feiss_hover.png', 'feiss.png'));
		}
	);

	jQuery('#botton_twitter').hover(
		function () {
			var img = jQuery(this).find('img');
			jQuery(this).attr('target', '_blank');
			img.attr('src', img.attr('src').replace('twitter.png', 'twitter_hover.png'));
		},
		function () {
			var img = jQuery(this).find('img');
			img.attr('src', img.attr('src').replace('twitter_hover.png', 'twitter.png'));
		}
	);
		
	jQuery('#botton_cart').hover(
		function () {
			var img = jQuery(this).find('img');
			img.attr('src', img.attr('src').replace('cart.png', 'cart_hover.png'));
		},
		function () {
			var img = jQuery(this).find('img');
			img.attr('src', img.attr('src').replace('cart_hover.png', 'cart.png'));
		}
	).click(function(){
		jQuery('#mk_artprint_form').submit();
		return false;
	});
	
	jQuery('.mail_link').each(function(){
		var this_link = jQuery(this).attr('rel').replace('||', '@');
		jQuery(this).attr('href', 'mailto:'+this_link);
	}); 

});

