$(function() {
	$('.cart_item').change(function(){
		var id = $(this).attr('id').replace('item_','');
		var new_id = $(this).attr('value');
		var old = $('#hidden_item_' + id).attr('value');
		frontEndBasket.modify(id, new_id, old);
		window.location.reload();	
	});
	
	$("a.popup").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	false
	});
	
	$('.menu1').hover(function(){
		$(this).find('.top_submenu').show();
	},function(){
		$(this).find('.top_submenu').hide(); 
	});


  $(".text_input").cleditor({
          width:        500, // width not including margins, borders or padding
          height:       250, // height not including margins, borders or padding
          controls:     // controls to add to the toolbar
                        "bold italic  | bullets numbering " +
                        "alignleft center alignright justify | undo redo | ",   
          useCSS:       false, // use CSS to style HTML when possible (not supported in ie)
          docType:      // Document type contained within the editor
                        '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
          docCSSFile:   // CSS file used to style the document contained within the editor
                        "", 
          bodyStyle:    // style to assign to document body contained within the editor
                        "margin:0px; font:10pt Arial,Verdana; cursor:text"
        });

});
