jQuery.noConflict();
jQuery(document).ready(function($) {
	
	
	// Email spam protect
	$('body').find('.' + 'email').each(function() {
		var $this = $(this);
		var s = $this.text().replace('[at]', '&#64;');
		$(this).html('<a href="mailto:' + s + '">' + s + '</a>');
	});
	
	// Lomakkeet
	$('input[type="text"], textarea').focus(function() {
        if (this.value == this.defaultValue){
            this.value = '';
        }
        if(this.value != this.defaultValue){
            this.select();
        }
		});
		$('input[type="text"], textarea').blur(function() {
			if (this.value == ''){
				this.value = this.defaultValue;
			}
	});
		
	// Taulukon solut
	$("ul li:odd, .productTable tr:odd,").addClass ("odd");
	
	// Luokan lisäys listan viimeiselle elementille
	$('ul li:last-child').addClass( 'last_item' );
		
	// Footer
	/*$(window).bind("load", function() { 
	
		var footerHeight = 0,
			footerTop = 0,
			$footer = $("#footer");
		
		positionFooter();
		
		function positionFooter() {
			if ( ($(document.body).height()) < $(window).height()) {
				$footer.css({
					position: "absolute",
					bottom: "0"
				})
			} else {
				$footer.css({
					position: "static"
				})
			}
		}
	
		$(window)
		.scroll(positionFooter)
		.resize(positionFooter)

	});*/
	
	
});
