jQuery(document).ready(function(){
var loginform =  jQuery("form.login");
jQuery("#exitlogin").click(function(){
	loginform.hide();
	return false;
});
jQuery("#showlogin").click(function(){
	loginform.show();
	return false;
});
loginform.draggable();
jQuery("#tabs").tabs().tabs('rotate' ,4000).show();

 jQuery('#ajax_prods').live("change",function(){
     var prodhref = jQuery(this).attr("value");
     if(prodhref != -1)
     {
         window.location.href = prodhref;
     }
     return false;
 });

jQuery("#ajax_cats").bind("change",function(){
    var catid = jQuery(this).attr("value");
    if(catid>0)
    {
	jQuery('#ajax_prods').addClass("loading");
	jQuery('#ajax_prods').attr("disabled", "disabled");
       jQuery.get('/ajaxhelpers/ProductsBycategoryId.php?id='+catid, function(data) {
            jQuery("option:gt(0)",jQuery('#ajax_prods')).remove();
            if(data)
                jQuery('#ajax_prods').append(jQuery(data));
				jQuery('#ajax_prods').removeClass("loading");
				jQuery('#ajax_prods').attr("disabled", "");				

        });

    }
    return false;
});
//jQuery(".data-table th:last-child").css("background", "none");
var offset = jQuery(".head:first",jQuery("#overhead")).offset();
jQuery("#leftcont").css("width", 252 + offset.left);
jQuery("#rightcont").css("margin-left", 281 + offset.left);
jQuery("#rightcont").css("margin-right", offset.left);


// action form review
     
            jQuery('.olink span').click(function() {
            jQuery('.actform').toggle('slow');
                return false;
            });





});


