function createSortable(id, itemsClass, action){
	$("#"+id).sortable({ 
        items: "."+itemsClass,
        delay: 10,
        distance: 0,
		update: function(e, ui){
            $.ajax({
                type: "POST",
                url: webroot+action,
                data: "itemId=&newOrder="+$("#"+id).sortable('toArray'),
                error: function(msg){
                    $(".JQresult").html(msg);
                },
                success: function(msg){
                    $(".JQresult").html(msg);
                }
            });
		}
    });
}


$(document).ready(function(){
	$.sifrSettings({path: webroot+'files/sifr/'});
	
	$("h1").sifr({
	    font:'cinemamf',
	    height: 30,
	    lineHeight: 30,
	    absoluteOffsetX: 100,
	    absoluteOffsetY: 100
	});
	
	$(".product_item").hover(
        function () {
            $(this).addClass('active');
        }, 
        function () {
            $(this).removeClass('active');
        }
    );
    $(".product_item").click(function () { 
        if ($(this).attr("title")){
            location.href=webroot+$(this).attr("title");
        }
    });
	
	
});