function initInput(){
	var _field = jQuery('.search-area .decorated-field');
	var _hold = _field.parents('div.search-area');
	_field.keyup(function(){
		if (jQuery(this).val().length > 0) {
			_hold.addClass('active');
		}
		if (jQuery(this).val().length == 0 ) {
			_hold.removeClass('active');
		}
	});
}
function initClick(){
	var _btn = jQuery('.top-nav li .compare, .top-nav .b .close');
	var _bttn = jQuery('.basket .txt-basket, .basket-area .b .close');
	var _active = jQuery('.inform-list li, .size-list li');
	_btn.click(function(){
		_btn.parents('.top-nav li').toggleClass('active');
		return false;
	});
	_bttn.click(function(){
		_bttn.parents("div.basket-area").toggleClass('active');
		return false;
	});
	_active.click(function(){
		jQuery(this).toggleClass('active');
		return false;
	});
}
function initHeight(){
	var _block = jQuery('.txt-box');
	var _blockheight = jQuery('.box-text').height();
	_block.height(_blockheight);
}
jQuery(document).ready(function(){
	initInput();
//	initClick();
	initHeight();
});

/*
 * ScrollToElement 1.0
 * Copyright (c) 2009 Lauri Huovila, Neovica Oy
 *  lauri.huovila@neovica.fi
 *  http://www.neovica.fi
 *  
 * Dual licensed under the MIT and GPL licenses.
 */

(function($) {
    $.scrollToElement = function( $element, speed ) {

        speed = speed || 750;

        $("html, body").animate({
            scrollTop: $element.offset().top,
            scrollLeft: $element.offset().left
        }, speed);
        return $element;
    };

    $.fn.scrollTo = function( speed ) {
        speed = speed || "normal";
        return $.scrollToElement( this, speed );
    };
})(jQuery);
